[Mesa-dev] GL_INVALID_OPERATION in glFramebufferTexture2D(textarget=0x3)
Kenneth Graunke
kenneth at whitecape.org
Fri Feb 1 10:52:23 PST 2013
On 01/31/2013 11:45 PM, Ramesh Reddy Emmadi wrote:
> Hi,
>
> I am getting the following error while using glFramebufferTexture2D in mesa es2 demos in mesa-9.0.2 and mesa-8.0.4 code . Can you please let me know, how to resolve this error.
>
> "GL_INVALID_OPERATION in glFramebufferTexture2D(textarget=0x3)"
>
> Thanks and Regards,
> Ramesh
Whenever you get a GL error, the easiest way to track it down is to use
gdb and set a breakpoint on the "_mesa_error" function. That way, it
will stop as soon as the error is raised and you can go "up" a few
frames to see the exact line of code that's failing.
That said, textarget of 0x3 is a nonsenical value. According to the
glFramebufferTexture2D man page,
"For glFramebufferTexture2D, if texture is not zero, textarget must
be one of GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE,
GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or
GL_TEXTURE_2D_MULTISAMPLE."
According to glext.h, those are all values in the 0x8xxx or 0x9xxx range.
Presumably, though, if you're running an unmodified Mesa demo program,
it's not going to intentionally call glFramebuffertexture2D with
textarget of 0x3. My guess is that somehow your Mesa build's dispatch
tables are broken, and the application meant to call one function, and
somehow landed in another. gdb with "bt" or "up" repeatedly can reveal
that too. I assume you've tried a clean build?
--Ken
More information about the mesa-dev
mailing list