Vuo  0.4.8
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
VuoWindowOpenGLInternal Class Reference

Description

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.
 
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 resizeEvent (QResizeEvent *event)
 Render when the window is resized.
 

Constructor & Destructor Documentation

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.

Member Function Documentation

void VuoWindowOpenGLInternal::enableTriggers ( VuoOutputTrigger(frameRequested, VuoInteger ,
VuoOutputTrigger(mouseMoved, VuoPoint2d ,
VuoOutputTrigger(mouseLeftPressed, VuoPoint2d  
)

Sets up the window to call trigger functions and other callbacks when events occur.

Todo:
change to struct...
Todo:
actually fire these triggers
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.


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