Fixed build error in tst_qopengl

QOpenGLFramebufferObject must be wrapped in a QOpenGLPaintDevice
before being passed to QPainter::begin().

Change-Id: Ic82f8f17b2ea18a3790de7e75f0dd6c9092528ed
Reviewed-on: http://codereview.qt-project.org/4541
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
Jo Asplin 2011-09-09 14:35:13 +02:00 committed by Samuel Rødal
parent 78fd865391
commit 8eb5ba3b9c

View File

@ -346,7 +346,8 @@ void tst_QOpenGL::fboRendering()
}
QPainter fboPainter;
bool painterBegun = fboPainter.begin(fbo);
QOpenGLPaintDevice device(fbo->width(), fbo->height());
bool painterBegun = fboPainter.begin(&device);
QVERIFY(painterBegun);
qt_opengl_draw_test_pattern(&fboPainter, fbo->width(), fbo->height());