Re: [PyOpenGL-Users] bug in glDrawBuffers?
Brought to you by:
mcfletch
From: Gijs <in...@bs...> - 2009-02-18 15:14:39
|
On 2/18/09 4:04 PM, Gijs wrote: > On 2/18/09 3:28 PM, Mike C. Fletcher wrote: >> Gijs wrote: >> ... >>> Hello Mike, >>> >>> Thanks for your reply. I needed to cast some arguments (img, fbo) to >>> int and after that the code ran just fine, but the error remains >>> (pasted below). Also, I made a Python-C module to see whether the same >>> error would occur there. But with the exact same code in C, I could >>> call glDrawBuffers to draw to multiple buffers without any problems. >>> So even though the Python code should not really do much with the >>> call, it does something to mess it up. >> Hmm, you *shouldn't* have to cast arguments, that code ran without >> errors on my machine. Can you confirm that you're running PyOpenGL >> 3.0.0c1? Also, do you have numpy installed? (Default array return >> value is numpy arrays). If you can print or pdb at the failing point >> and tell me precisely what types the values are, it may be that on your >> platform we're hitting a different code-path than on amd64-linux. >> >> Thanks, >> Mike >> > I was running 3.0.0b8 and after I upgraded to the latest version, > 3.0.0c1, the glDrawBuffers call worked perfectly :). The casting was > however still required. The type fbo was<type 'numpy.uint32'>. It > failed with: > Traceback (most recent call last): > File "./test-buffers.py", line 35, in<module> > test_glDrawBuffers_list_valid() > File "./test-buffers.py", line 20, in test_glDrawBuffers_list_valid > glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo) > File > "/Library/Python/2.5/site-packages/OpenGL/platform/baseplatform.py", > line 275, in __call__ > return self( *args, **named ) > ctypes.ArgumentError: argument 2:<type 'exceptions.TypeError'>: wrong type > > I tend to cast everything that needs to be passed to OpenGL and is > returned from OpenGL functions (like the genTextures and genFramebuffers > function). Guess I kinda got used to it but I knew it wasn't normal. > > Regards, > > Gijs Oh, and yes, I have numpy installed. |