Re: [PyOpenGL-Users] Odd framebuffer error
Brought to you by:
mcfletch
From: Derakon <de...@gm...> - 2010-12-01 18:29:56
|
Thanks for your response, Alejandro. Answers inline. On Wed, Dec 1, 2010 at 10:11 AM, Alejandro Segovia <as...@gm...> wrote: > Hi Derakon, > > > These are just a couple of things you might want to check (if you haven't > already). From the top of my head, I would expect all of these to trigger > Invalid Operation errors: > 1) Since "megaTileFramebuffer" is a global variable, are you sure you are > calling glGenFramebuffers with a valid OpenGL context? If you make the > assignment at file scope, this is probably running before the context is > created. This could trigger an Invalid Operation. Also, try printing > "megaTileFramebuffer" to the console and make sure it's not 0. I initialize megaTileFramebuffer to None when the module is loaded, and only call glGenFramebuffers the first time the buffer is required. Printing it prints "1". > 2) Has the texture identified by "self.texture" already been created > (glGenTextures) when attempting to bind the FBO? Yes; glGenTextures is called in the class's __init__, well before this point. > 3) Have you tried using GL_FRAMEBUFFER as the first parameter for > glFrameBufferTexture2D? I'm not even making it that far; the program stops at the glBindFramebuffer call. But yes, I've tried GL_FRAMEBUFFER as well as GL_DRAW_FRAMEBUFFER. > 4) This might sound silly, but are you certain this is not being executed > "inside" a glBegin? To the best of my ability, I am -- the code calling my stuff is rather messy, but I don't see anything beforehand that would be setting up a special context. > Good luck! > Alejandro.- Thanks. -Chris |