opengl开发环境搭建
一,下载Virtual Studio Community 2017
https://my.visualstudio.com/Downloads/Featured?mkt=zh-cn
二,下载GLFW(32-bits Windows binaries)
https://www.glfw.org/download.html
三,下载GLEW(Binaries Windows 32 bits and 64 bits)
http://glew.sourceforge.net/
四,用VS新建一个控制台的工程
配置项目熟悉
- 配置属性 --> C/C++ --> 常规 --> 附加包含目录
- 配置属性 --> 链接器 --> 常规 --> 附加库目录
- 配置属性 --> 链接器 --> 输入 --> 附加依赖项
opengl32.lib
glfw3.lib
glew32s.lib
main.cpp
// ConsoleApplication2.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #define GLEW_STATIC #include<GL/glew.h> #include <GLFW/glfw3.h> int main() { std::cout << "Hello World!\n"; } // Run program: Ctrl + F5 or Debug > Start Without Debugging menu // Debug program: F5 or Debug > Start Debugging menu // Tips for Getting Started: // 1. Use the Solution Explorer window to add/manage files // 2. Use the Team Explorer window to connect to source control // 3. Use the Output window to see build output and other messages // 4. Use the Error List window to view errors // 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project // 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架