04-15-2005, 10:12 AM
I'm trying to use OpenGL lists instead of creating objects every frame, using the following code:
However, the first line doesn't work. It says "error 9: Expected expression", as though the glNewList function is not supported (even though glEndList works fine). Anyone know what's wrong & how to fix it?
Code:
glNewList u
glBegin GL_TRIANGLES
glNormal3f 0.0, 0.0, 1.0
glColor3f o.p(i).colour, o.p(i).colour, o.p(i).colour
glVertex3f o.p(i).p1.x, o.p(i).p1.y, o.p(i).p1.z
glVertex3f o.p(i).p2.x, o.p(i).p2.y, o.p(i).p2.z
glVertex3f o.p(i).p3.x, o.p(i).p3.y, o.p(i).p3.z
glEnd
glEndList
However, the first line doesn't work. It says "error 9: Expected expression", as though the glNewList function is not supported (even though glEndList works fine). Anyone know what's wrong & how to fix it?