Vuo
0.4.6
|
Private implementation of VuoWindowOpenGL
.
Public Member Functions | |
VuoWindowOpenGLInternal (void(*initCallback)(void *), void(*resizeCallback)(void *, unsigned int width, unsigned int height), void(*drawCallback)(void *), void *drawContext) | |
Creates a window containing an OpenGL view. | |
~VuoWindowOpenGLInternal () | |
Throw this window's OpenGL context back into the pool. | |
void | enableTriggers (VuoOutputTrigger(frameRequested, VuoInteger), VuoOutputTrigger(mouseMoved, VuoPoint2d), VuoOutputTrigger(mouseLeftPressed, VuoPoint2d)) |
Sets up the window to call trigger functions and other callbacks when events occur. | |
void | disableTriggers (void) |
Stops the window from calling trigger functions and other callbacks when events occur. | |
void | scheduleRedraw (void) |
Schedules the GL widget to be redrawn. | |
void | setAspectRatio (unsigned int pixelsWide, unsigned int pixelsHigh) |
Sets the window's current and preferred aspect ratio. | |
Protected Member Functions | |
bool | event (QEvent *event) |
Override handling of certain events. | |
void | exposeEvent (QExposeEvent *event) |
Render when the window is exposed. | |
void | resizeEvent (QResizeEvent *event) |
Render when the window is resized. | |
VuoWindowOpenGLInternal::VuoWindowOpenGLInternal | ( | void(*)(void *) | initCallback, |
void(*)(void *, unsigned int width, unsigned int height) | resizeCallback, | ||
void(*)(void *) | drawCallback, | ||
void * | drawContext | ||
) |
Creates a window containing an OpenGL view.
Must be called on the main thread.
void VuoWindowOpenGLInternal::enableTriggers | ( | VuoOutputTrigger(frameRequested, VuoInteger) | , |
VuoOutputTrigger(mouseMoved, VuoPoint2d) | , | ||
VuoOutputTrigger(mouseLeftPressed, VuoPoint2d) | |||
) |
void VuoWindowOpenGLInternal::setAspectRatio | ( | unsigned int | pixelsWide, |
unsigned int | pixelsHigh | ||
) |
Sets the window's current and preferred aspect ratio.
If necessary, the window is resized to match the specified aspect ratio. After calling this method, when the user resizes the window, its height is adjusted to match the specified aspect ratio.