summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl_x11.cpp')
-rw-r--r--src/opengl/qgl_x11.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index 0399b48..d8af4d5 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -1630,22 +1630,10 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pm, const qi
void QGLTexture::deleteBoundPixmap()
{
if (boundPixmap) {
- // Although glXReleaseTexImage is a glX call, it must be called while there
- // is a current context - the context the pixmap was bound to a texture in.
- // Otherwise the relese doesn't do anything and you get BadDrawable errors
- // when you come to delete the context.
-
- QGLContext *oldContext = const_cast<QGLContext*>(QGLContext::currentContext());
- if (oldContext != context)
- context->makeCurrent();
glXReleaseTexImageEXT(QX11Info::display(), boundPixmap, GLX_FRONT_LEFT_EXT);
- if (oldContext && oldContext != context)
- oldContext->makeCurrent();
-
glXDestroyPixmap(QX11Info::display(), boundPixmap);
+ boundPixmap = 0;
}
-
- boundPixmap = 0;
}