Win7下OpenGL配置(64位或32位),需要配置的文件较多,下面简单介绍一下如何配置。
工具/原料
glut包(OpenGL_Env.rar)
VS2008
方法/步骤
下载并且解压glut包
Windows 7下OpenGL如何配置
glut.h放入文件夹C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\gl
Windows 7下OpenGL如何配置
glut.dll,glut32.dll放入文件夹C:\Windows\SysWOW64(32位放在C:\Windows\System32)
Windows 7下OpenGL如何配置
glut.lib,glut32.lib放入文件夹C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib
Windows 7下OpenGL如何配置
5
选择工程(project)->右键选择属性(project property)->配置属性(Configuration Properties)->链接器(Linker)->输入(Input)->附加依赖项(Additional Dependencies)
Windows 7下OpenGL如何配置步骤阅读
6
添加opengl32.lib glu32.lib glut32.lib
Windows 7下OpenGL如何配置
7
在VS2010中新建一个空工程,选择Win32控制台应用程序,添加如下代码test
Windows 7下OpenGL如何配置
Windows 7下OpenGL如何配置
8
改变颜色,在代码里面添加代码:glColor3f(0.0f,1.0f,0.0f);
Windows 7下OpenGL如何配置
END