[PyOpenGL-Users] glGenLists returns 0
Brought to you by:
mcfletch
From: Astan C. <st...@al...> - 2008-05-17 07:02:09
|
Hi, Im trying to do glGenLists while a program is running and it keeps returning 0 and whenever I try to do a glCallList, it fails with a 'invalid value' error. Is this a known issue? why would my program give valid glGenList while being initialized but not while it is running? Im using wx to create a new pygame thread that uses pyopengl. This is the glGenList snippet: dlBody = glGenLists(1) glNewList(dlBody,GL_COMPILE) SphereT = gluNewQuadric() gluSphere(SphereT, 0.5, 32, 32) gluQuadricNormals(SphereT, GLU_SMOOTH) gluQuadricDrawStyle(SphereT, GLU_FILL) glEndList() and here is how I init: glShadeModel(GL_SMOOTH) glClearColor(0.0, 0.0, 0.0, 0.0) glClearDepth(1.0) glEnable(GL_DEPTH_TEST) glDepthFunc(GL_LEQUAL) glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST) glEnable (GL_LIGHT0) glEnable (GL_LIGHTING) glEnable(GL_TEXTURE_2D) LightAmbient = ( (0., 0., 0., 0.,1.) ) glLightModelfv( GL_LIGHT_MODEL_AMBIENT, LightAmbient ) glEnable(GL_COLOR_MATERIAL) glViewport(0, 0, width, height) glMatrixMode(GL_PROJECTION) glLoadIdentity() gluPerspective(45, 1.0*width/height, 1.0, 10000.0) glMatrixMode(GL_MODELVIEW) glLoadIdentity() -- "Formulations of number theory: Complete, Consistent, Non-trivial. Choose two." Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. |