11 #ifndef __RE_WINDOWDRAWABLE_H_INCLUDED__
12 #define __RE_WINDOWDRAWABLE_H_INCLUDED__
24 #include <QtOpenGLWidgets/QOpenGLWidget>
26 #include <QtWidgets/QOpenGLWidget>
28 #include <QtWidgets/QStylePainter>
37 #define RE_WINDOW_DRAWABLE_OBJ_NAME "RE_WindowDrawable"
38 #define RE_WINDOW_DRAWABLE_SURFACE_OBJ_NAME \
39 RE_WINDOW_DRAWABLE_OBJ_NAME "Window"
40 #define RE_WINDOW_DRAWABLE_WRAPPER_OBJ_NAME \
41 RE_WINDOW_DRAWABLE_OBJ_NAME "Wrapper"
66 void endPaintSession();
72 void beginOpenGLPainting();
78 void endOpenGLPainting();
102 int paint_area_x,
int paint_area_y,
int paint_area_w,
int paint_area_h);
115 int paint_area_x,
int paint_area_y,
116 int paint_area_w,
int paint_area_h);
129 void toPainterPosition(
int &
x,
int &
y,
int w=0,
int h=0)
const;
136 void toUIPosition(
int &x,
int &y,
int w=0,
int h=0)
const;
157 {
return myPaintState; }
161 {
return myPaintState->painter(); }
165 {
return myPaintState->paintArea(); }
170 { myPaintState->toPainterPosition(x, y,
w,
h); }
175 { myPaintState->toUIPosition(x, y,
w,
h); }
190 const QSurfaceFormat &format, QWidget *parent,
191 QOpenGLContext *sharedContext);
211 static bool shouldDrawNewUI();
217 void initializeGL()
override;
218 void paintGL()
override;
219 void resizeGL(
int w,
int h)
override;
223 const QSurfaceFormat *format, QOpenGLContext *shared_context=
nullptr);
225 QOpenGLContext *myInitializedContext =
nullptr;
228 bool myIsPainting =
false;
234 #endif // __RE_WINDOWDRAWABLE_H_INCLUDED__
void toUIPosition(int &x, int &y, int w=0, int h=0) const
==========================================================================
IFDmantra you can see code vm_image_mplay_direction endcode When SOHO starts a render
static const char * widgetTag()
static const char * widgetWrapperTag()
GLint GLint GLsizei GLint GLenum format
const UT_DimRect & paintArea() const
Convenience method to access the paint state's paint area.
RE_WindowDrawablePainter * painter() const
Convenience method to access the paint state's painter.
GLfloat GLfloat GLfloat GLfloat h
#define RE_WINDOW_DRAWABLE_WRAPPER_OBJ_NAME
LeafData & operator=(const LeafData &)=delete
void toPainterPosition(int &x, int &y, int w=0, int h=0) const
GLubyte GLubyte GLubyte GLubyte w
#define RE_WINDOW_DRAWABLE_OBJ_NAME
static const char * drawableSurfaceTag()
RE_WindowDrawablePaintState * paintState()
Return the underlying paint state.
#define RE_WINDOW_DRAWABLE_SURFACE_OBJ_NAME