Mercurial > hg > dmlib
diff edview.h @ 391:28a74940f2b6
More work on the editor.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 19 Oct 2012 04:30:24 +0300 |
parents | eb5b793c8867 |
children | 8660c6005032 |
line wrap: on
line diff
--- a/edview.h Fri Oct 19 04:30:01 2012 +0300 +++ b/edview.h Fri Oct 19 04:30:24 2012 +0300 @@ -2,26 +2,46 @@ #define EDVIEW_H #include <QtOpenGL> +#include <QImage> +#include "dmengine.h" -class DemoView : public QGLWidget + +class GLDemoView : public QGLWidget { Q_OBJECT public: - DemoView(QWidget *parent); - ~DemoView(); + GLDemoView(QWidget *parent); + ~GLDemoView(); + virtual void setEngineData(DMEngineData *mengine); + virtual void render(int frameTime); + void paintEvent(QPaintEvent *); + +private: void saveGLState(); void restoreGLState(); - void paintEvent(QPaintEvent *); +protected: + DMEngineData *engine; +}; + -public slots: - void draw(); +class SWDemoView : public GLDemoView +{ + Q_OBJECT + +public: + SWDemoView(QWidget *parent); + ~SWDemoView(); + + void setEngineData(DMEngineData *mengine); + void render(int frameTime); + void paintEvent(QPaintEvent *); private: - QGLFramebufferObject *render_fbo; - QGLFramebufferObject *texture_fbo; + QImage *img; }; + #endif