summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.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/qgl.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/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 779ed9a..12f781e 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1366,7 +1366,7 @@ QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alp
int w = size.width();
int h = size.height();
#if !defined(QT_OPENGL_ES_2) //### glGetTexImage not in GL ES 2.0, need to do something else here!
- glGetTexImage(qt_gl_preferredTextureTarget(), 0, GL_RGBA, GL_UNSIGNED_BYTE, img.bits());
+ glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.bits());
#endif
convertFromGLImage(img, w, h, alpha_format, include_alpha);
return img;
@@ -1971,7 +1971,7 @@ GLuint QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, GLin
{
Q_Q(QGLContext);
QPixmapData *pd = pixmap.pixmapData();
- if (target == qt_gl_preferredTextureTarget() && pd->classId() == QPixmapData::OpenGLClass) {
+ if (target == GL_TEXTURE_2D && pd->classId() == QPixmapData::OpenGLClass) {
const QGLPixmapData *data = static_cast<const QGLPixmapData *>(pd);
if (data->isValidContext(q))