[Interest] How to know bindTexture failure
samuel.rodal at digia.com
Fri Oct 5 17:04:10 CEST 2012
On 10/05/2012 04:46 PM, Calogero Mauceri wrote:
> is there a way to know programmatically whether the
> QGLWidget::bindTexture function fails?
> Sometime my bindTexture fails, I can see in the log file there is a line
> reporting the binding failure:
> texture upload failed, error code 0x500, enum: 3553 (de1)
Hmm, looks like the error reporting is a bit lacking. If you have your
own build of Qt you can uncomment the line that says #define
QGL_BIND_TEXTURE_DEBUG in qgl.cpp to get more detailed debug output from
the bind function.
> but the bindTexture returns a valid texture id (> 0) and the
> glGetError() returns 0 (no error).
> How do I know the binding has failed from my code?
Yeah, glGetError() won't return an error since it clears the error state
when it's called from within bindTexture().
Btw, which OS and Qt version are you using?
More information about the Interest