OpenGL(Ⅰ):OpenGL + VS2015环境搭建

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_24990189/article/details/89631111

目录

1.相关库扩展下载

2.解压到某个固定目录下

3.VS2015相关配置

(1)新建项目 - > VIsual C ++ -> 空项目

(2)右键OpenGLExercise  -> 添加 -> 新建项 -> Visual C++ -> C++文件(cpp)

(3)右键OpenGLExercise -> 属性 -> C/C++ -> 常规 -> 附加包含目录 && 所有配置、所有平台

(4)右键OpenGLExercise -> 属性 -> C/C++ -> 链接 -> 附加库目录

(5)右键OpenGLExercise -> 属性 -> C/C++ -> 链接 -> 附加依赖项

4.相关测试


1.相关库扩展下载

https://www.glfw.org/download.html

http://glew.sourceforge.net/

2.解压到某个固定目录下

3.VS2015相关配置

(1)新建项目 - > VIsual C ++ -> 空项目

(2)右键OpenGLExercise  -> 添加 -> 新建项 -> Visual C++ -> C++文件(cpp)

(3)右键OpenGLExercise -> 属性 -> C/C++ -> 常规 -> 附加包含目录 && 所有配置、所有平台

具体附加包含目录如下图所示

(4)右键OpenGLExercise -> 属性 -> C/C++ -> 链接 -> 附加库目录

具体附加库如下图所示。注意:lib-vs2015、WIN32

(5)右键OpenGLExercise -> 属性 -> C/C++ -> 链接 -> 附加依赖项

opengl已经存在

4.相关测试

 #include <iostream>
 #define GLEW_STATIC
 #include <GL/glew.h>
 #include <GLFW/glfw3.h>

 int main(){
	printf("111");
	while(true)
	{
		//do nothing
	}
 }

猜你喜欢

转载自blog.csdn.net/qq_24990189/article/details/89631111