[Interest] QGLContext::makeCurrent(): Failed. Why?
Guido Seifert
Wargand at gmx.de
Sun Jan 20 16:19:00 CET 2013
Hi, I have a strange warning, which I don't understand.
I try to render an image with OpenGL in a thread. Below the relevant part.
QImage GLWidget::paintGL(QGLPixelBuffer *buffer){
glPushMatrix();
mEndImageTexture = buffer->bindTexture(mEndImage,GL_TEXTURE_2D);
glCallList(mIndex);
glPopMatrix();
glPushMatrix();
float value = pow(1.6,mFactor-10)+1;
glScalef(1.0/value, 1.0/value, 1.0/value);
mStartImageTexture = buffer->bindTexture(mStartImage,GL_TEXTURE_2D);
glCallList(mIndex);
glPopMatrix();
glFlush();
QImage image = buffer->toImage();
#if 0
buffer->deleteTexture(mEndImageTexture);
buffer->deleteTexture(mStartImageTexture);
#endif
return image;
}
So far so good. Nothing special, the OpenGL code will be cleaned up a bit, when I am a little more comfortable with it.
But as can be seen, I bind two textures to a QGLPixelBuffer. Later on I try to delete them again #if 0/#endif. When I activate the deleteTexture functions I get a warning: QGLContext::makeCurrent().
I have no idea why and don't even know what QGLContext is meant. Can someone enlighten me?
Guido
More information about the Interest
mailing list