From 66a281ab76303074cd9cbb6cd22dcc5f3dbe8454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 1 Jul 2009 14:40:51 +0200 Subject: Made QPainter / OpenGL intermixing in hellogl_es2 work properly again. Need to call syncState() to let the paint engine set depth clipping state parameters back to their OpenGL defaults. Reviewed-by: Trond --- examples/opengl/hellogl_es2/glwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples/opengl') diff --git a/examples/opengl/hellogl_es2/glwidget.cpp b/examples/opengl/hellogl_es2/glwidget.cpp index 6b08662016..bb07b2223e 100644 --- a/examples/opengl/hellogl_es2/glwidget.cpp +++ b/examples/opengl/hellogl_es2/glwidget.cpp @@ -41,6 +41,7 @@ #include "glwidget.h" #include +#include #include #include "bubble.h" @@ -265,6 +266,8 @@ void GLWidget::paintGL() QPainter painter; painter.begin(this); + painter.paintEngine()->syncState(); + glClearColor(0.1f, 0.1f, 0.2f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_TEXTURE_2D); -- cgit v1.2.3