Re: [PyOpenGL-Users] second call to glGenFramebuffersEXT() crashes
Brought to you by:
mcfletch
From: Joshua R. D. <jd...@ca...> - 2009-02-15 20:13:28
|
----- Original Message ----- From: "Mike C. Fletcher" <mcf...@vr...> To: "Joshua R. Davis" <jd...@ca...> Cc: pyo...@li... Sent: Saturday, February 14, 2009 5:10:59 PM GMT -06:00 US/Canada Central Subject: Re: [PyOpenGL-Users] second call to glGenFramebuffersEXT() crashes Joshua R. Davis wrote: > > I am trying to cast shadows from multiple lights using shaders. I use one framebuffer object per light. When I have just one light, it works. When I try two lights, the program survives the first call to glGenFramebuffersEXT() but crashes ("Bus error") upon the second call to it. [snip] > If you can run the script above instead of directly accessing the functions from the DLL we may be able to track down the problem further. Thanks a lot, Mike. I no longer crash when making multiple calls to glGenFramebuffersEXT(). However, I now crash on the first call to glBindFramebufferEXT(). This demo... #! /usr/bin/env python from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * from OpenGL.GL.EXT.framebuffer_object import * def main(): glutInit(0) glutInitDisplayMode(GLUT_RGB|GLUT_DOUBLE|GLUT_DEPTH) glutCreateWindow('test') framebuffer = glGenFramebuffersEXT(1) print framebuffer glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer) if __name__ == "__main__": main() ...produces this error: > python fbotest.py 1 Traceback (most recent call last): File "fbotest.py", line 14, in <module> main() File "fbotest.py", line 12, in main glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PyOpenGL-3.0.0b6-py2.5.egg/OpenGL/platform/baseplatform.py", line 275, in __call__ return self( *args, **named ) ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: wrong type This kind of code used to work, when I was using the DLL. Can anyone help? Joshua Davis |