11 #ifndef __RE_GLDRAWABLE_H_INCLUDED__
12 #define __RE_GLDRAWABLE_H_INCLUDED__
24 #include <QtGui/QOpenGLContext>
25 #include <QtWidgets/QWidget>
34 #define RE_GL_DRAWABLE_OBJ_NAME "RE_GLDrawable"
35 #define RE_GL_DRAWABLE_SURFACE_OBJ_NAME RE_GL_DRAWABLE_OBJ_NAME "Window"
36 #define RE_GL_DRAWABLE_WRAPPER_OBJ_NAME RE_GL_DRAWABLE_OBJ_NAME "Wrapper"
67 const QSurfaceFormat &format, QWidget *parent,
68 QOpenGLContext *sharedContext);
72 QOpenGLContext *context() {
return myContext.get(); }
77 QPaintEngine *
paintEngine()
const override {
return nullptr; };
92 void paintEvent(QPaintEvent *
event)
override;
93 void resizeEvent(QResizeEvent *
event)
override;
94 void mousePressEvent(QMouseEvent *
event)
override;
99 const QSurfaceFormat *format, QOpenGLContext *shared_context=
nullptr);
112 #endif // __RE_GLDRAWABLE_H_INCLUDED__
void setDrawable(RE_GLDrawable *drawable)
static const char * drawableSurfaceTag()
static const char * widgetWrapperTag()
#define RE_GL_DRAWABLE_SURFACE_OBJ_NAME
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
GLint GLint GLsizei GLint GLenum format
static const char * widgetTag()
RE_GLDrawable * drawable() const
#define RE_GL_DRAWABLE_OBJ_NAME
QPaintEngine * paintEngine() const override
#define RE_GL_DRAWABLE_WRAPPER_OBJ_NAME