HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE_OpenGLDrawable Class Reference

#include <RE_OpenGLDrawable.h>

+ Inheritance diagram for RE_OpenGLDrawable:

Public Member Functions

 RE_OpenGLDrawable (const QSurfaceFormat &format)
 
 RE_OpenGLDrawable (const QSurfaceFormat &format, QWidget *parent, QOpenGLContext *sharedContext)
 
 ~RE_OpenGLDrawable () override
 
void setREWindow (RE_Window *window)
 
const RE_Window * getREWindow () const
 Return the window that the drawable is currently assigned to. More...
 
QOpenGLContext * context ()
 
void makeCurrent ()
 Make this drawable's context the current OpenGL context. More...
 
void doneCurrent ()
 
void swapBuffers ()
 Swap the front and back buffers in the drawable's OpenGL context. More...
 
QPaintDevice * stylePaintDevice ()
 
QPaintEngine * paintEngine () const override
 
int samples () const
 Multisample sample count this drawable was created with (-1 if none). More...
 
RE_WindowDrawablePainter & painter ()
 Return the Painter used to paint the contents of the drawable. More...
 
void initializeGL ()
 

Static Public Member Functions

static const char * widgetTag ()
 
static const char * drawableSurfaceTag ()
 
static const char * widgetWrapperTag ()
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 
void resizeEvent (QResizeEvent *event) override
 
void showEvent (QShowEvent *event) override
 

Detailed Description

Window drawable that uses OpenGL and QPainter for the new UI path. The drawable is a QWidget that manages its own OpenGL context and is backed by a QWindow with a OpenGL surface type.

Definition at line 49 of file RE_OpenGLDrawable.h.

Constructor & Destructor Documentation

RE_OpenGLDrawable::RE_OpenGLDrawable ( const QSurfaceFormat &  format)
RE_OpenGLDrawable::RE_OpenGLDrawable ( const QSurfaceFormat &  format,
QWidget *  parent,
QOpenGLContext *  sharedContext 
)
RE_OpenGLDrawable::~RE_OpenGLDrawable ( )
override

Member Function Documentation

QOpenGLContext* RE_OpenGLDrawable::context ( )

Return the OpenGL context tied to this drawable. If the context has not yet been initialized, then return nullptr.

void RE_OpenGLDrawable::doneCurrent ( )

Clear this drawable's context as the current context. Do nothing if the drawable's context is not the current context.

static const char* RE_OpenGLDrawable::drawableSurfaceTag ( )
inlinestatic

Return the string tag used to identify whether a QWindow is used a drawable surface for Houdini.

Definition at line 92 of file RE_OpenGLDrawable.h.

const RE_Window* RE_OpenGLDrawable::getREWindow ( ) const
inline

Return the window that the drawable is currently assigned to.

Definition at line 63 of file RE_OpenGLDrawable.h.

void RE_OpenGLDrawable::initializeGL ( )
void RE_OpenGLDrawable::makeCurrent ( )

Make this drawable's context the current OpenGL context.

QPaintEngine* RE_OpenGLDrawable::paintEngine ( ) const
inlineoverride

Definition at line 83 of file RE_OpenGLDrawable.h.

RE_WindowDrawablePainter& RE_OpenGLDrawable::painter ( )

Return the Painter used to paint the contents of the drawable.

void RE_OpenGLDrawable::paintEvent ( QPaintEvent *  event)
overrideprotected
void RE_OpenGLDrawable::resizeEvent ( QResizeEvent *  event)
overrideprotected
int RE_OpenGLDrawable::samples ( ) const
inline

Multisample sample count this drawable was created with (-1 if none).

Definition at line 86 of file RE_OpenGLDrawable.h.

void RE_OpenGLDrawable::setREWindow ( RE_Window *  window)

Assign the drawable to the given window. The given drawable will be used to render the contents of the window.

void RE_OpenGLDrawable::showEvent ( QShowEvent *  event)
overrideprotected
QPaintDevice* RE_OpenGLDrawable::stylePaintDevice ( )

Return the drawable's paint device that QPainter objects should paint to.

void RE_OpenGLDrawable::swapBuffers ( )

Swap the front and back buffers in the drawable's OpenGL context.

static const char* RE_OpenGLDrawable::widgetTag ( )
inlinestatic

Definition at line 88 of file RE_OpenGLDrawable.h.

static const char* RE_OpenGLDrawable::widgetWrapperTag ( )
inlinestatic

Return the string tag used to identify whether a QWidget is the wrapper widget of a drawable in Houdini.

Definition at line 97 of file RE_OpenGLDrawable.h.


The documentation for this class was generated from the following file: