X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fglwidget.h;fp=src%2Fgui%2Fglwidget.h;h=7c8f9955e4f55e487eb811c34be52762b0830972;hb=94e1e961b57f253b760298ab0bae96a7de6d20fa;hp=0000000000000000000000000000000000000000;hpb=f95620384355f3db89f779e1e7be59260ecfc6ff;p=virtualjaguar diff --git a/src/gui/glwidget.h b/src/gui/glwidget.h new file mode 100644 index 0000000..7c8f995 --- /dev/null +++ b/src/gui/glwidget.h @@ -0,0 +1,43 @@ +// Implementation of OpenGL widget using Qt +// +// by James L. Hammons +// (C) 2010 Underground Software + +#ifndef __GLWIDGET_H__ +#define __GLWIDGET_H__ + +#include +#include + +class GLWidget: public QGLWidget +{ + Q_OBJECT + + public: + GLWidget(QWidget * parent = 0); + ~GLWidget(); + +// QSize minimumSizeHint() const; +// QSize sizeHint() const; + +// signals: +// void clicked(); + + protected: + void initializeGL(); + void paintGL(); + void resizeGL(int width, int height); + +// private: + public: + GLuint texture; + int textureWidth, textureHeight; + + uint32_t * buffer; + unsigned rasterWidth, rasterHeight; + + bool synchronize; + unsigned filter; +}; + +#endif // __GLWIDGET_H__