Re: [PyOpenGL-Users] GLerror: [Errno 1281]
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@ro...> - 2003-02-18 23:24:51
|
Lothar Birk wrote: >Hi, > >first of all thanks, for the quick help on the "terminating >the examples question" from last week. Updating my wxPython >distribution to the newest one, restored the expected windows behavior. > >May be someone also has an idea on the following >questions / problems. > >How can I set the background of the OpenGL Window to white >in the > >OpenGLContext\tests\indexedfaceset_lit_npf.py > >example? > > You could add the following to the TestingContext class: def Background( self, mode): if mode.passCount == 0: glClearColor( 1.0,1.0,1.0,1.0 ) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) Afraid there isn't a run-time way in the testing contexts to do it. >When running some of the tests in the above directory, like > >python selectrendermode_threads.py > >a lot of errors of the follwoing nature are reported: > > >Traceback (most recent call last): > File >"/usr/local/lib/python2.2/site-packages/OpenGLContext/visitor.py", line >224, in visit > token = method( node ) > File >"/usr/local/lib/python2.2/site-packages/OpenGLContext/rendervisitor.py", >line 205, in Rendering > return node.Render( self ) > File >"/usr/local/lib/python2.2/site-packages/OpenGLContext/scenegraph/shape.py", line 47, in Render > glDisable(GL_LIGHTING) >GLerror: [Errno 1281] invalid value >ERR :OpenGLContext.visitor:method <bound method >OpaqueRenderPass.Rendering of <OpenGLContext.renderpass.OpaqueRenderPass >object at 0x87fd394>> for node Shape( DEF='' ) > > ... Sounds as though we've got some sort of compilation error in PyOpenGL. AFAIK GL_LIGHTING should always be available, so calling glDisable with it should always work. Could you file a bug report on it with your OS information, and attach the results of running OpenGL/scripts/info.py (which reports the versions of all the various PyOpenGL modules (and related stuff, such as PIL and Numeric)). http://sourceforge.net/tracker/?group_id=5988&atid=105988 It would be really helpful if you could identify all of the failing tests to see if there's any commonality there. Enjoy yourself, Mike |