git-svn-id: svn://db.shs.com.ru/libs@537 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
39
qglview/openglwindow.h
Normal file
39
qglview/openglwindow.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <QWindow>
|
||||
#include <QOpenGLFunctions>
|
||||
|
||||
class QPainter;
|
||||
class QOpenGLContext;
|
||||
class QOpenGLPaintDevice;
|
||||
|
||||
|
||||
class OpenGLWindow : public QWindow, protected QOpenGLFunctions
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit OpenGLWindow(QWindow *parent = 0);
|
||||
~OpenGLWindow();
|
||||
|
||||
virtual void render(QPainter *painter);
|
||||
virtual void render();
|
||||
|
||||
virtual void initialize();
|
||||
|
||||
void setAnimating(bool animating);
|
||||
|
||||
QOpenGLContext * context() {return m_context;}
|
||||
|
||||
public slots:
|
||||
void renderLater();
|
||||
void renderNow();
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event) override;
|
||||
|
||||
void exposeEvent(QExposeEvent *event) override;
|
||||
|
||||
private:
|
||||
bool m_animating;
|
||||
QOpenGLContext *m_context;
|
||||
QOpenGLPaintDevice *m_device;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user