|
|
#include <gl/gl.h>
#include <gl/glut.h>
void RenderScene(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}
void SetupRC(void)
{
glClearColor(0.0f,0.0f,1.0f,1.0f);
}
int main(int argc, char* argv[])
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("simple");
glutDisplayFunc(RenderScene);
SetupRC();
glutMainLoop();
return 0;
}
出现一下错误:
f:\program files\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing ';' before type 'void'
f:\program files\vc98\include\gl\gl.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
f:\program files\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found
按理说gl.h应该没错 我运行另外个OpenGL程序没错啊 不过那是用的MFC框架.
还有谁能传我个《OpenGL超级宝典(第三版)》的示例程序光盘啊 |
|