安装并运行opengl [英] install and run opengl
本文介绍了安装并运行opengl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在visual 2010中安装了opengl(我的系统是64位),但是当我编写程序时却出错了....
此错误是标识#include
你能帮我吗?
我写这个程序:
i install opengl in visual 2010 (my system is 64 bit) but when i write program it was error ....
this error is identify #include
can you help me?
i write this program :
#include <GL/glut.h>
int Height=400, Width=400;
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glutSwapBuffers();
}
int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE);
glutInitWindowSize(Width, Height);
glutCreateWindow("Hello OpenGL World");
glutDisplayFunc(display);
glutMainLoop();
}
推荐答案
语句#include
并不代表任何含义,您需要包括要包括的头文件的名称.
The statement #include
does not mean anything, you need to include the name of the header file that you wish to include.
如果要在Windows上打开gl开发,则需要OpenGL扩展Wrangler库:
http://glew.sourceforge.net/ [ ^ ]
MS不会更新/保持OpenGL支持,因此您需要使用wrangler来访问1.1版以外的功能.
在此处下载OpenGL实用工具包(GLUT): http://user.xmission.com/~nate/glut.html [^ ]
最好的问候
Espen Harlinn
If you are going to do open gl development on windows you need the The OpenGL Extension Wrangler Library:
http://glew.sourceforge.net/[^]
MS is not updating/maintaining the OpenGL support, so you need the wrangler to access features beyond 1.1
Download the OpenGL Utility Toolkit (GLUT) here: http://user.xmission.com/~nate/glut.html[^]
Best regards
Espen Harlinn
这篇关于安装并运行opengl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文