diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 5e41cc1..4720c05 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -502,12 +502,19 @@ void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& s
     glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
 }
 
+bool QGL2PaintEngineEx::isNativePaintingActive()
+{
+    return nativePaintingActive;
+}
+
 void QGL2PaintEngineEx::beginNativePainting()
 {
     Q_D(QGL2PaintEngineEx);
     ensureActive();
     d->transferMode(BrushDrawingMode);
 
+    nativePaintingActive = true;
+
     QGLContext *ctx = d->ctx;
     glUseProgram(0);
 
@@ -569,6 +576,7 @@ void QGL2PaintEngineEx::endNativePainting()
 {
     Q_D(QGL2PaintEngineEx);
     d->needsSync = true;
+    nativePaintingActive = false;
 }
 
 void QGL2PaintEngineExPrivate::transferMode(EngineMode newMode)
@@ -1083,7 +1091,8 @@ void QGL2PaintEngineExPrivate::drawVertexArrays(const float *data, int *stops, i
 /////////////////////////////////// Public Methods //////////////////////////////////////////
 
 QGL2PaintEngineEx::QGL2PaintEngineEx()
-    : QPaintEngineEx(*(new QGL2PaintEngineExPrivate(this)))
+    : QPaintEngineEx(*(new QGL2PaintEngineExPrivate(this))),
+      nativePaintingActive(false)
 {
 }
 
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index e3d0bfc..8aff372 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -152,8 +152,10 @@ public:
 
     void setRenderTextActive(bool);
 
+    bool isNativePaintingActive();
 private:
     Q_DISABLE_COPY(QGL2PaintEngineEx)
+    bool nativePaintingActive;
 };
 
 
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 0433a3d..df59be5 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2770,6 +2770,19 @@ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum text
         return;
     }
 #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()";
+            QRectF src = QRectF(0, 0, target.width(), target.height());
+            QSize size = QSize(target.width(), target.height());
+            eng->drawTexture(target, textureId, size, src);
+            return;
+        }
+     } 
+
     const bool wasEnabled = glIsEnabled(GL_TEXTURE_2D);
     GLint oldTexture;
     glGetIntegerv(GL_TEXTURE_BINDING_2D, &oldTexture);
@@ -2820,6 +2833,7 @@ void QGLContext::drawTexture(const QPointF &point, GLuint textureId, GLenum text
     Q_UNUSED(textureTarget);
     qWarning("drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget) not supported with OpenGL ES, use rect version instead");
 #else
+
     const bool wasEnabled = glIsEnabled(GL_TEXTURE_2D);
     GLint oldTexture;
     glGetIntegerv(GL_TEXTURE_BINDING_2D, &oldTexture);
@@ -2833,6 +2847,19 @@ 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) {
+        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);
+            eng->drawTexture(dest, textureId, size, src);
+            return;
+        }
+    } 
+
     qDrawTextureRect(QRectF(point, QSizeF(textureWidth, textureHeight)), textureWidth, textureHeight, textureTarget);
 
     if (!wasEnabled)
