diff options
-rw-r--r-- | demos/boxes/qtbox.cpp | 4 | ||||
-rw-r--r-- | demos/boxes/scene.cpp | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/demos/boxes/qtbox.cpp b/demos/boxes/qtbox.cpp index 54882fb..7134d63 100644 --- a/demos/boxes/qtbox.cpp +++ b/demos/boxes/qtbox.cpp @@ -319,6 +319,8 @@ void QtBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWi 0.5f * (right + left), 0.5f * (bottom + top), 0.0f, 1.0f }; + painter->beginNativePainting(); + glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadMatrixf(moveToRectMatrix); @@ -392,6 +394,8 @@ void QtBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWi glMatrixMode(GL_PROJECTION); glPopMatrix(); + painter->endNativePainting(); + ItemBase::paint(painter, option, widget); } diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp index 016ba17..2a7ca0e 100644 --- a/demos/boxes/scene.cpp +++ b/demos/boxes/scene.cpp @@ -894,6 +894,7 @@ void Scene::drawBackground(QPainter *painter, const QRectF &) float width = float(painter->device()->width()); float height = float(painter->device()->height()); + painter->beginNativePainting(); setStates(); if (m_dynamicCubemap) @@ -913,6 +914,8 @@ void Scene::drawBackground(QPainter *painter, const QRectF &) defaultStates(); ++m_frame; + + painter->endNativePainting(); } QPointF Scene::pixelPosToViewPos(const QPointF& p) |