diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 12 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 7 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 0534233..c89d34f 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -516,7 +516,7 @@ void QGL2PaintEngineEx::beginNativePainting() ensureActive(); d->transferMode(BrushDrawingMode); - nativePaintingActive = true; + d->nativePaintingActive = true; QGLContext *ctx = d->ctx; glUseProgram(0); @@ -585,7 +585,12 @@ void QGL2PaintEngineEx::endNativePainting() { Q_D(QGL2PaintEngineEx); d->needsSync = true; - nativePaintingActive = false; + d->nativePaintingActive = false; +} + +bool QGL2PaintEngineEx::isNativePaintingActive() const { + Q_D(const QGL2PaintEngineEx); + return d->nativePaintingActive; } void QGL2PaintEngineExPrivate::transferMode(EngineMode newMode) @@ -1104,8 +1109,7 @@ void QGL2PaintEngineExPrivate::drawVertexArrays(const float *data, int *stops, i /////////////////////////////////// Public Methods ////////////////////////////////////////// QGL2PaintEngineEx::QGL2PaintEngineEx() - : QPaintEngineEx(*(new QGL2PaintEngineExPrivate(this))), - nativePaintingActive(false) + : QPaintEngineEx(*(new QGL2PaintEngineExPrivate(this))) { } diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 0538107..2ac2ca4 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -157,13 +157,8 @@ public: bool isNativePaintingActive() const; private: Q_DISABLE_COPY(QGL2PaintEngineEx) - bool nativePaintingActive; }; -inline bool QGL2PaintEngineEx::isNativePaintingActive() const { - return nativePaintingActive; -} - class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate { Q_DECLARE_PUBLIC(QGL2PaintEngineEx) @@ -183,6 +178,7 @@ public: elementIndicesVBOId(0), snapToPixelGrid(false), addOffset(false), + nativePaintingActive(false), inverseScale(1), lastMaskTextureUsed(0) { } @@ -285,6 +281,7 @@ public: bool snapToPixelGrid; bool addOffset; // When enabled, adds a 0.49,0.49 offset to matrix in updateMatrix + bool nativePaintingActive; GLfloat pmvMatrix[3][3]; GLfloat inverseScale; |