难道我的OPENGL有问题?
<P><BR>连这个程序我都编译不过去:<BR><BR></P><DIV class=htmlcode>
<P>#include <GL/gl.h><BR>#include <GL/glaux.h></P>
<P>int main(int argc, char **argv)<BR>{<BR>}<BR></P></DIV>
<P><BR><BR>错误警告:<BR>e:\microsoft visual studio\vc98\include\gl\gl.h(1135) : error C2054: expected '(' to follow 'WINGDIAPI'<BR>总共102个错误<BR><BR>错误位置:<BR>GL/gl.h <BR>WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);<BR><BR><BR>这是不是就说明我的gl.h库有问题啊<BR>谁有能用的给我发一个呗<BR></P>
[align=right][color=#000066][此贴子已经被作者于2007-10-11 21:01:08编辑过][/color][/align]
<P>这不是库文件有 问题,而是缺少opengl32.dll</P> <P>与OpenGL相关的 .DLL 文件都要拷贝一份到 C:\WINDOWS\system32 中 </P> 最基本的 有 glu32.dll opengl32.dll glut32.dll glut.dll
[align=right][color=#000066][此贴子已经被作者于2007-10-11 21:17:56编辑过][/color][/align]
<P>加一个#include <windows.h >好了<BR><BR>那我这个程序却通不过<BR><BR>#include <windows.h ><BR>#include <GL/gl.h><BR>#include <GL/glaux.h></P>
<P>int main(int argc, char **argv)<BR>{<BR> auxInitDisplayMode(AUX_SINGLE|AUX_RGBA) ;<BR> auxInitPosition(0, 0, 500, 500) ;<BR> glClearColor(0.0, 0.0, 0.0, 0.0) ;<BR> glClear(GL_COLOR_BUFFER_BIT) ;<BR> glColor3f(1.0, 1.0, 1.0) ;<BR> glMatrixMode(GL_PROJECTION) ;<BR> glLoadIdentity() ;<BR> glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0) ;<BR> glBegin(GL_POLYGON) ;<BR> glVertex2f(-0.5, -0.5) ;<BR> glVertex2f(-0.5, 0.5) ;<BR> glVertex2f(0.5, 0.5) ;<BR> glVertex2f(0.5, -0.5) ;<BR> glEnd() ;<BR> glFlush() ;<BR>}</P>
页:
[1]
