[Qt-interest] bindTexture enters in infinite loop
Paul Wellner Bou
paul at purecodes.org
Tue Jan 11 13:09:36 CET 2011
Hello,
I am trying to bind a texture using Qt's methods to do so. Loading a
QImage or a QPixmap and calling one of the different overloaded methods
of bindTexture().
This causes the program to hang forever. I debugged it and noticed that
it stays in an infinite loop on those lines (2346 to 2349) in qgl.cpp:
#ifndef QT_NO_DEBUG
// Reset the gl error stack...git
while (glGetError() != GL_NO_ERROR) ;
#endif
What does the "git" mean there?
Is this a Qt bug? As far as I know the OpenGL error flag should be reset
to GL_NO_ERROR by calling glGetError(). There is something wrong here.
In addition to that, pausing the program, it gets stopped in line 882 of
qstring.h (using QtCreator):
inline QString::~QString() { if (!d->ref.deref()) free(d); }
This line should not be called at all checking for GL Errors. I assume
this is due to destructing debugging strings or similar?
Checking the error before calling bindTexture, I always get an
GL_INVALID_OPERATION error. Although I did not do any OpenGL relatet
stuff before, and I am not between any glBegin() and glEnd(). So the
error check itself seems to generate this error.
Regards
Paul.
More information about the Qt-interest-old
mailing list