diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-05-18 10:31:33 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-05-23 08:59:14 +0000 |
commit | cab7e7858ae97eedc122fdfa7df082cbdb590d7c (patch) | |
tree | fcbb972506722b3443cd4cbb62c5a7169e08fc5c /examples/opengl/legacy/hellogl/glwidget.cpp | |
parent | 4476966e0469dfdf372f6b1c119407acef37a6f2 (diff) |
Make OpenGL legacy examples hellogl and overpainting work with Dynamic GL.
Call GL functions using QOpenGLFunctions_1_1.
Task-number: QTBUG-46103
Change-Id: I1cbacf9c192c17d96d96aa861bb16e2918a0c053
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'examples/opengl/legacy/hellogl/glwidget.cpp')
-rw-r--r-- | examples/opengl/legacy/hellogl/glwidget.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/opengl/legacy/hellogl/glwidget.cpp b/examples/opengl/legacy/hellogl/glwidget.cpp index 02501cd99e..122f7ddfe1 100644 --- a/examples/opengl/legacy/hellogl/glwidget.cpp +++ b/examples/opengl/legacy/hellogl/glwidget.cpp @@ -128,6 +128,8 @@ void GLWidget::setZRotation(int angle) //! [6] void GLWidget::initializeGL() { + initializeOpenGLFunctions(); + qglClearColor(qtPurple.dark()); logo = new QtLogo(this, 64); @@ -153,7 +155,7 @@ void GLWidget::paintGL() glRotatef(xRot / 16.0, 1.0, 0.0, 0.0); glRotatef(yRot / 16.0, 0.0, 1.0, 0.0); glRotatef(zRot / 16.0, 0.0, 0.0, 1.0); - logo->draw(); + logo->draw(static_cast<QOpenGLFunctions_1_1 *>(this)); } //! [7] |