summaryrefslogtreecommitdiffhomepage
path: root/pose-widget/glwidget.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-21 14:26:10 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-23 11:05:33 +0200
commit6a0ead2849c9e0dc3bbefeecf3e36d4f187624ae (patch)
tree7d6e7549d214a56f60a66185242c2d1834995267 /pose-widget/glwidget.h
parent9fec162fd5ac3f94850653c63f45ed0a83c5a9d0 (diff)
pose-widget: don't display when window hidden
When the opentrack window isn't displayed (minimized or hidden by some other window), don't bother with refreshing the image.
Diffstat (limited to 'pose-widget/glwidget.h')
-rw-r--r--pose-widget/glwidget.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/pose-widget/glwidget.h b/pose-widget/glwidget.h
index 0d48ede9..96187856 100644
--- a/pose-widget/glwidget.h
+++ b/pose-widget/glwidget.h
@@ -12,6 +12,7 @@
#include <QPixmap>
#include "opentrack/plugin-api.hpp"
#include "opentrack/simple-mat.hpp"
+#include "opentrack-compat/timer.hpp"
#ifdef BUILD_pose_widget
# define POSE_WIDGET_EXPORT Q_DECL_EXPORT
@@ -37,9 +38,12 @@ private:
vec3 project2(const vec3& point);
void project_quad_texture();
static inline vec3 normal(const vec3& p1, const vec3& p2, const vec3& p3);
+
rmat rotation;
vec3 translation;
QImage front;
QImage back;
QImage image;
+ Timer visible_timer;
+ bool visible;
};