goat3d
annotate goatview/src/opengl.h @ 103:45a9d493e98c
fixed the input latency issue by calling QWidget::update() instead of QGLWidget::updateGL()
update schedules an update instead of redrawing immediately.
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 12 Sep 2015 17:40:02 +0300 |
parents | c1871707c678 |
children |
rev | line source |
---|---|
nuclear@93 | 1 #ifndef OPENGL_H_ |
nuclear@93 | 2 #define OPENGL_H_ |
nuclear@93 | 3 |
nuclear@93 | 4 #include <GL/glew.h> |
nuclear@93 | 5 #define QT_NO_OPENGL_ES_2 |
nuclear@93 | 6 |
nuclear@93 | 7 #ifdef WIN32 |
nuclear@93 | 8 #define WIN32_LEAN_AND_MEAN 1 |
nuclear@93 | 9 #include <windows.h> |
nuclear@93 | 10 #undef min |
nuclear@93 | 11 #endif |
nuclear@93 | 12 |
nuclear@93 | 13 #ifdef __APPLE__ |
nuclear@93 | 14 #include <OpenGL/gl.h> |
nuclear@93 | 15 #include <OpenGL/glu.h> |
nuclear@93 | 16 #else |
nuclear@93 | 17 #include <GL/gl.h> |
nuclear@93 | 18 #include <GL/glu.h> |
nuclear@93 | 19 #endif |
nuclear@93 | 20 |
nuclear@93 | 21 #ifdef __cplusplus |
nuclear@93 | 22 extern "C" { |
nuclear@93 | 23 #endif |
nuclear@93 | 24 |
nuclear@93 | 25 int init_opengl(void); |
nuclear@93 | 26 |
nuclear@93 | 27 #ifdef __cplusplus |
nuclear@93 | 28 } |
nuclear@93 | 29 #endif |
nuclear@93 | 30 |
nuclear@93 | 31 #endif /* OPENGL_H_ */ |