summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpixmapdata_gl.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-05-13 12:47:54 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-05-13 13:15:49 (GMT)
commitc8c5becc81679eb8a9a0f8baa454bc43fd3cccf9 (patch)
tree357b605e0fa6cdf3b98916ffce9ebb3e051c33fc /src/opengl/qpixmapdata_gl.cpp
parentb352b0e637ca19591ee122c47ce4a6ab0a26c06b (diff)
downloadQt-c8c5becc81679eb8a9a0f8baa454bc43fd3cccf9.zip
Qt-c8c5becc81679eb8a9a0f8baa454bc43fd3cccf9.tar.gz
Qt-c8c5becc81679eb8a9a0f8baa454bc43fd3cccf9.tar.bz2
Reverted use of GL 2 engine as default on desktop.
Using GL 2 as default engine breaks the use cases where OpenGL commands are inter-mixed with QPainter commands, such as when using raw OpenGL in graphicsview. For now we'll use the old OpenGL engine for QGLWidget, QGLPixelBuffer, and QGLFramebufferObject on desktop, and the OpenGL 2 paint engine when the OpenGL graphics system is used. Reviewed-by: Trond
Diffstat (limited to 'src/opengl/qpixmapdata_gl.cpp')
-rw-r--r--src/opengl/qpixmapdata_gl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index 89e6749..e3af864 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -160,7 +160,7 @@ void QGLPixmapData::ensureCreated() const
m_ctx = ctx;
const GLenum format = qt_gl_preferredTextureFormat();
- const GLenum target = qt_gl_preferredTextureTarget();
+ const GLenum target = GL_TEXTURE_2D;
if (!m_textureId) {
glGenTextures(1, &m_textureId);
@@ -252,7 +252,7 @@ QImage QGLPixmapData::toImage() const
QGLShareContextScope ctx(qt_gl_share_widget()->context());
extern QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha);
- glBindTexture(qt_gl_preferredTextureTarget(), m_textureId);
+ glBindTexture(GL_TEXTURE_2D, m_textureId);
return qt_gl_read_texture(QSize(m_width, m_height), true, true);
}
@@ -280,7 +280,7 @@ void QGLPixmapData::copyBackFromRenderFbo(bool keepCurrentFboBound) const
glBindFramebuffer(GL_FRAMEBUFFER_EXT, ctx->d_ptr->fbo);
glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
- qt_gl_preferredTextureTarget(), m_textureId, 0);
+ GL_TEXTURE_2D, m_textureId, 0);
const int x0 = 0;
const int x1 = m_width;
@@ -398,7 +398,7 @@ GLuint QGLPixmapData::bind(bool copyBack) const
ensureCreated();
GLuint id = m_textureId;
- glBindTexture(qt_gl_preferredTextureTarget(), id);
+ glBindTexture(GL_TEXTURE_2D, id);
return id;
}