Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GL_INVALID_OPERATION and glTexImage2D

477 views
Skip to first unread message

wpr

unread,
Nov 28, 2006, 9:14:04 AM11/28/06
to
Hi all,

I'm getting GL_INVALID_OPERATION sometimes (really randomly) in a call
to glTexImage2D.
I inserted an assert there and I checked if the call was somehow
between glBegin and glEnd but it's not.

Then I thought it could be a threading problem, I checked if the thread
calling the code is still the drawing thread: Yes it is.

So now I have a problem since I don't know what is happening. The bug
only occurs when I switch from displaying a video using PBO and going
to normal texture. If i only use normal textures it does not happen.

The buggy call to glTexImage2D is in the "normal texture". Somehow the
PBO influences the call I guess.

Any ideas?

Marco

Jim Lahue

unread,
Nov 28, 2006, 1:12:59 PM11/28/06
to

I've seen a GL_INVALID_OPERATION get generated on a glTexImage2D if
there is a problem where the type parameter conflicts with the format
parameter.

Jim Lahue

wpr

unread,
Dec 28, 2006, 4:57:46 AM12/28/06
to
Hi,

My mistake, I forgot to call glUnmap is some cases.

wpr.

jeromef

unread,
Dec 28, 2012, 2:53:30 PM12/28/12
to
Hello,

For the record: you post REALLY helped me sorting out a similar bug in my code. In my case, I did not forget the glUnmapBuffer, BUT I forgot the glBindBuffer(..., 0). It was a really tricky race condition.
BTW, the apitrace tool (https://github.com/apitrace/apitrace) also helped a lot to confirm the scenario. The tool would log the following error:
"glDebugOutputCallback: High severity API error 1282, GL_INVALID_OPERATION error generated. Cannot access buffer data."

--
Jerome


--http://compgroups.net/comp.graphics.api.opengl/gl_invalid_operation-and-glteximage2/76133


0 new messages