From b2d5f886b36b4f4d317024db7cfd6668e2895cd4 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 16 Nov 2009 08:38:59 +1000 Subject: Make pbuffers example compile under OpenGL/ES 1.1 Reviewed-by: Sarah Smith --- examples/opengl/pbuffers/glwidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'examples/opengl') diff --git a/examples/opengl/pbuffers/glwidget.cpp b/examples/opengl/pbuffers/glwidget.cpp index 56ba65b73d..d843a73219 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); } -- cgit v1.2.3