summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-11-15 22:38:59 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-17 05:55:33 (GMT)
commit13bbf3db8c0723327e1cf0f2edd4bae1c02a7df5 (patch)
treec260721d23ef2de77038cd9191463f0614664ad0 /examples
parent7eaba3515234a65e547fc98b341a7495f8bdb7ab (diff)
downloadQt-13bbf3db8c0723327e1cf0f2edd4bae1c02a7df5.zip
Qt-13bbf3db8c0723327e1cf0f2edd4bae1c02a7df5.tar.gz
Qt-13bbf3db8c0723327e1cf0f2edd4bae1c02a7df5.tar.bz2
Make pbuffers example compile under OpenGL/ES 1.1
Reviewed-by: Sarah Smith (cherry picked from commit b2d5f886b36b4f4d317024db7cfd6668e2895cd4)
Diffstat (limited to 'examples')
-rw-r--r--examples/opengl/pbuffers/glwidget.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/opengl/pbuffers/glwidget.cpp b/examples/opengl/pbuffers/glwidget.cpp
index 56ba65b..d843a73 100644
--- a/examples/opengl/pbuffers/glwidget.cpp
+++ b/examples/opengl/pbuffers/glwidget.cpp
@@ -175,7 +175,11 @@ void GLWidget::perspectiveProjection()
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
+#ifdef QT_OPENGL_ES
+ glFrustumf(-aspect, +aspect, -1.0, +1.0, 4.0, 15.0);
+#else
glFrustum(-aspect, +aspect, -1.0, +1.0, 4.0, 15.0);
+#endif
glMatrixMode(GL_MODELVIEW);
}
@@ -183,7 +187,11 @@ void GLWidget::orthographicProjection()
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
+#ifdef QT_OPENGL_ES
+ glOrthof(-1.0, +1.0, -1.0, +1.0, -90.0, +90.0);
+#else
glOrtho(-1.0, +1.0, -1.0, +1.0, -90.0, +90.0);
+#endif
glMatrixMode(GL_MODELVIEW);
}