summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-09-02 16:26:34 +0200
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-09-02 16:28:58 +0200
commit7421f8234a77f358479099e40ce336d1863fedb1 (patch)
tree201a6b6dbde99bd210e585c9c30d7f024690c8f2 /demos
parent0f06310ad141fb3705cb5180db700aa82a155287 (diff)
Fixed rendering in boxes demo with GL2 paint engine.
Added beginNativePainting() and endNativePainting() calls. Reviewed-by: Samuel
Diffstat (limited to 'demos')
-rw-r--r--demos/boxes/qtbox.cpp4
-rw-r--r--demos/boxes/scene.cpp3
2 files changed, 7 insertions, 0 deletions
diff --git a/demos/boxes/qtbox.cpp b/demos/boxes/qtbox.cpp
index 54882fb04d..7134d6309d 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 016ba170e3..2a7ca0eba7 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)