diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-03-30 07:47:04 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-03-30 10:31:14 +0200 |
commit | a9ba05936f9f78bd2e6294f356fe1ae37042ef33 (patch) | |
tree | 3407f3c03e1966a3c49007507aa2c7b1ab965d9e /examples/activeqt/opengl/glbox.h | |
parent | 1fb1936afb00a408799c3f8a4755da21450289b8 (diff) |
OpenGL example: Use double in GL functions
This eliminates warnings about float truncation and increases
readibility of the code.
Change-Id: I9fcae5a556128a31a508613289772128a908a3bb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/activeqt/opengl/glbox.h')
-rw-r--r-- | examples/activeqt/opengl/glbox.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/activeqt/opengl/glbox.h b/examples/activeqt/opengl/glbox.h index 6d73997..6197b3a 100644 --- a/examples/activeqt/opengl/glbox.h +++ b/examples/activeqt/opengl/glbox.h @@ -90,11 +90,11 @@ protected: virtual GLuint makeObject(); private: - GLuint m_object; - GLfloat m_xRot; - GLfloat m_yRot; - GLfloat m_zRot; - GLfloat m_scale; + GLuint m_object = 0; + GLdouble m_xRot = 0; + GLdouble m_yRot = 0; + GLdouble m_zRot = 0; + GLdouble m_scale = 1.25; }; #endif // GLBOX_H |