diff options
author | Carolina Gomes <ext-carolina.s.gomes@nomovok.com> | 2010-03-27 04:06:41 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-14 12:56:54 (GMT) |
commit | 65536764c06200762ea6308703eae7ee3df17b15 (patch) | |
tree | 8580ece8a175ae7b2c34ecbd6c4dcfdafb6cb62c | |
parent | 91976b6bde42dd8c939591c01017208aaa670418 (diff) | |
download | Qt-65536764c06200762ea6308703eae7ee3df17b15.zip Qt-65536764c06200762ea6308703eae7ee3df17b15.tar.gz Qt-65536764c06200762ea6308703eae7ee3df17b15.tar.bz2 |
Adjustments to QTBUG-6800 patch.
Merge-request: 2344
Reviewed-by: Tom Cooksey
-rw-r--r-- | src/opengl/qgl.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 848982d..c20c058 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2768,11 +2768,10 @@ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum text } #else - if (d_ptr->active_engine->type() == QPaintEngine::OpenGL2) { - QGL2PaintEngineEx *eng = static_cast<QGL2PaintEngineEx*>(d_ptr->active_engine); - //qDebug() << "Paint Engine is OpenGL2"; - if (eng->isNativePaintingActive() == false) { - //qDebug() << "No usage of begin/endNativePainting()"; + if (d_ptr->active_engine && + d_ptr->active_engine->type() == QPaintEngine::OpenGL2) { + QGL2PaintEngineEx *eng = static_cast<QGL2PaintEngineEx*>(d_ptr->active_engine); + if (eng->isNativePaintingActive() == false) { QRectF src = QRectF(0, 0, target.width(), target.height()); QSize size = QSize(target.width(), target.height()); eng->drawTexture(target, textureId, size, src); @@ -2844,11 +2843,10 @@ void QGLContext::drawTexture(const QPointF &point, GLuint textureId, GLenum text glGetTexLevelParameteriv(textureTarget, 0, GL_TEXTURE_WIDTH, &textureWidth); glGetTexLevelParameteriv(textureTarget, 0, GL_TEXTURE_HEIGHT, &textureHeight); - if (d_ptr->active_engine->type() == QPaintEngine::OpenGL2) { + if (d_ptr->active_engine && + d_ptr->active_engine->type() == QPaintEngine::OpenGL2) { QGL2PaintEngineEx *eng = static_cast<QGL2PaintEngineEx*>(d_ptr->active_engine); - //qDebug() << "Paint Engine is OpenGL2"; if (eng->isNativePaintingActive() == false) { - //qDebug() << "No usage of begin/endNativePainting()"; QRectF dest = QRectF(point, QSizeF(textureWidth, textureHeight)); QRectF src = QRectF(0, 0, textureWidth, textureHeight); QSize size = QSize(textureWidth, textureHeight); |