您的位置:首页 > 运维架构

动态库更新支持OpenGL 3.0

2017-01-18 14:15 239 查看
下载链接: https://sourceforge.net/project/downloading.php?group_id=67586&filename=glew-1.5.1-win32.zip 点击上面的链接下载最新的GLEW(支持OpenGL 3.0),解压,将 /bin/glew32.dll 拷贝到 c:/windows/system32 下面,将 /lib/glew32.lib 拷贝到VC安装目录下的 lib 目录下(如:/Microsoft Visual Studio 9.0/VC/lib/下),将 /include/glew.h 和 /include/wglew.h 拷贝到 VC 安装目录下的 /include/gl/ 目录下(如:/Microsoft Visual Studio 9.0/VC/include/gl/下)。在程序中我们只需要在包含gl,glu 或 glut.h 之前包含 glew.h就可以了(注意:一定要先包含
glew.h),在在代码中加上这么一句:

#pragma comment (lib, "glew32.lib")
示例:
#include <GL/glew.h>
#include <GL/glut.h>
#progrma comment(lib, "glew32.lib")
在创建OpenGL渲染context之后,调用 glewInit(); 初始化glew就可以了。

本文出处: http://blog.csdn.net/todayq/article/details/5925233
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  OpenGL