summaryrefslogtreecommitdiffstats
path: root/examples/qtgl/myqgl.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qtgl/myqgl.h')
-rw-r--r--examples/qtgl/myqgl.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/examples/qtgl/myqgl.h b/examples/qtgl/myqgl.h
new file mode 100644
index 0000000..be4707f
--- /dev/null
+++ b/examples/qtgl/myqgl.h
@@ -0,0 +1,40 @@
+#ifndef GLWIDGET_H
+#define GLWIDGET_H
+
+#include <qgl.h>
+
+#include <csetjmp>
+
+#include "ksquirrel-libs/fmt_types.h"
+#include "ksquirrel-libs/fileio.h"
+#include "ksquirrel-libs/fmt_codec_base.h"
+
+class MyQGL : public QGLWidget
+{
+ Q_OBJECT
+
+ public:
+ MyQGL(QWidget *parent = 0, const char *name = 0);
+ ~MyQGL();
+
+ public slots:
+ void bind();
+
+ protected:
+ void initializeGL();
+ void paintGL();
+ void resizeGL(int,int);
+ void loadImage();
+
+ private:
+ void *bits;
+ unsigned int tex;
+ int w, h;
+ fmt_codec_base* (*codec_create)();
+ void (*codec_destroy)(fmt_codec_base*);
+
+ fmt_codec_base *codeK;
+
+};
+
+#endif