summaryrefslogtreecommitdiff
path: root/tests/OffscreenView.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-07-31 01:12:27 (GMT)
committerMarius Kintel <marius@kintel.net>2011-07-31 01:12:27 (GMT)
commit2b0035175dd3bc5c66a3350cab6e9f7f7b8f01d4 (patch)
tree5bfb1c7f9f37c04d5717c3eec62bd4fb45e947b8 /tests/OffscreenView.h
parent6882228058d313bb7b98fddd90239bdb1a3e25ef (diff)
One step further on a Qt-free offscreen renderer
Diffstat (limited to 'tests/OffscreenView.h')
-rw-r--r--tests/OffscreenView.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/OffscreenView.h b/tests/OffscreenView.h
new file mode 100644
index 0000000..6531bcf
--- /dev/null
+++ b/tests/OffscreenView.h
@@ -0,0 +1,34 @@
+#ifndef OFFSCREENVIEW_H_
+#define OFFSCREENVIEW_H_
+
+#include "OffscreenContext.h"
+#include <stdint.h>
+
+class OffscreenView
+{
+public:
+ OffscreenView(size_t width, size_t height);
+ ~OffscreenView();
+ void setRenderer(class Renderer* r);
+
+ void initializeGL();
+ void resizeGL(int w, int h);
+ void setupPerspective();
+ void setupOrtho(double distance,bool offset=false);
+ void paintGL();
+ bool save(const char *filename);
+
+ GLint shaderinfo[11];
+private:
+ Renderer *renderer;
+ class OffscreenContext *ctx;
+ double w_h_ratio;
+
+ bool orthomode;
+ bool showaxes;
+ bool showfaces;
+ bool showedges;
+ float viewer_distance;
+};
+
+#endif
contact: Jan Huwald // Impressum