Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another (simple) 3D question
#1
I'm trying to use OpenGL lists instead of creating objects every frame, using the following code:

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?
Reply


Messages In This Thread
Another (simple) 3D question - by Zip - 04-15-2005, 10:12 AM
Another (simple) 3D question - by Zip - 04-15-2005, 10:20 AM
Another (simple) 3D question - by Zip - 04-15-2005, 10:58 AM
Another (simple) 3D question - by Zip - 04-15-2005, 12:29 PM
Another (simple) 3D question - by lillo - 04-15-2005, 01:16 PM
Another (simple) 3D question - by Zip - 04-15-2005, 01:40 PM
Another (simple) 3D question - by lillo - 04-15-2005, 01:50 PM
Another (simple) 3D question - by Neo - 04-15-2005, 01:52 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)