summaryrefslogtreecommitdiffstats
path: root/examples/opengl/hellogles3/main.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-07-22 13:38:26 +0200
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-07-24 10:18:16 +0000
commit80dbdf0de3bfe5f0710a1c37932ef81cbdb5fbff (patch)
tree10a1afa3047f23a4efd3a98d0f6da4b77725be45 /examples/opengl/hellogles3/main.cpp
parent906ad92fbfb20e1665d55bb6c447bbf67c66ee27 (diff)
Make the gles3 example more impressive
Add some extra rotations and offsets, to show off the power of what you can do with a single draw call. Also use QGLWindow instead of QGLWidget. This improves performance from 23 FPS to 30 FPS on a 4k monitor with integrated Intel graphics. Change-Id: Iedac1c14cc6057959aa15faaacdf29da91f36ab1 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'examples/opengl/hellogles3/main.cpp')
-rw-r--r--examples/opengl/hellogles3/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/opengl/hellogles3/main.cpp b/examples/opengl/hellogles3/main.cpp
index 3125623395..f0de28bdc4 100644
--- a/examples/opengl/hellogles3/main.cpp
+++ b/examples/opengl/hellogles3/main.cpp
@@ -38,11 +38,11 @@
**
****************************************************************************/
-#include <QApplication>
+#include <QGuiApplication>
#include <QSurfaceFormat>
#include <QOpenGLContext>
-#include "mainwindow.h"
+#include "glwindow.h"
// This example demonstrates easy, cross-platform usage of OpenGL ES 3.0 functions via
// QOpenGLExtraFunctions in an application that works identically on desktop platforms
@@ -69,10 +69,10 @@ int main(int argc, char *argv[])
QSurfaceFormat::setDefaultFormat(fmt);
- QApplication app(argc, argv);
+ QGuiApplication app(argc, argv);
- MainWindow mainWindow;
- mainWindow.showMaximized();
+ GLWindow glWindow;
+ glWindow.showMaximized();
return app.exec();
}