Vuo
0.9.1
|
A graphics window for use by Vuo node classes.
The graphics window renders onto an OpenGL context shared with Vuo nodes, so that it can render the scenes created by those nodes. A scene is rendered by calling callbacks provided by the Vuo nodes.
Instance Methods | |
(id) | - initWithDepthBuffer:initCallback:resizeCallback:drawCallback:drawContext: |
Creates a window containing an OpenGL view. | |
(void) | - enableTriggers |
Sets up the window to call trigger functions. | |
(void) | - disableTriggers |
Stops the window from calling trigger functions. | |
(void) | - scheduleRedraw |
Schedules the OpenGL view to be redrawn. | |
(void) | - setProperties: |
Applies a list of properties to this window. | |
(void) | - executeWithWindowContext: |
Executes the specifed block on the window's OpenGL context, then returns. | |
(void) | - setAspectRatioToWidth:height: |
Constrains the window's aspect ratio to pixelsWide/pixelsHigh . | |
(void) | - unlockAspectRatio |
Removes the aspect ratio constraint set by VuoWindowOpenGl_setAspectRatio. | |
(void) | - setFullScreen:onScreen: |
Switches between full-screen and windowed mode. | |
(void) | - getWidth:height: |
Outputs the window's current width and height. | |
Protected Attributes | |
BOOL | userResizedWindow |
True if the user has manually resized the window. | |
BOOL | programmaticallyResizingWindow |
True if a programmatic resize of the window is in progress. | |
Properties | |
BOOL | callbacksEnabled |
True if the window can call its trigger callbacks. | |
VuoWindowOpenGLView * | glView |
The OpenGL view inside this window. | |
BOOL | depthBuffer |
Was a depth buffer requested? | |
NSRect | contentRectWhenWindowed |
The position and size of the window's content area, prior to switching to full-screen. In points (not pixels). | |
NSUInteger | styleMaskWhenWindowed |
The window's style mask, prior to switching to full-screen. | |
VuoCursor | cursor |
The current mouse cursor for this window. | |
- (void) disableTriggers |
Stops the window from calling trigger functions.
This function may be called from any thread.
- (void) enableTriggers |
Sets up the window to call trigger functions.
This function may be called from any thread.
- (void) executeWithWindowContext: | (VuoGlContext glContext) | blockToExecute |
Executes the specifed block on the window's OpenGL context, then returns.
Ensures that nobody else is using the OpenGL context at that time (by synchronizing with the window's drawQueue
).
This function may be called from any thread.
- (void) getWidth: | (unsigned int *) | pixelsWide | |
height: | (unsigned int *) | pixelsHigh | |
Outputs the window's current width and height.
- (id) initWithDepthBuffer: | (BOOL) | _depthBuffer | |
initCallback: | (VuoGlContext glContext, void *) | _initCallback | |
resizeCallback: | (VuoGlContext glContext, void *, unsigned int width, unsigned int height) | _resizeCallback | |
drawCallback: | (VuoGlContext glContext, void *) | _drawCallback | |
drawContext: | (void *) | _drawContext | |
Creates a window containing an OpenGL view.
This function may only be called on the main thread.
- (void) scheduleRedraw |
Schedules the OpenGL view to be redrawn.
This can be used in both windowed and full-screen mode.
This function may be called from any thread.
- (void) setAspectRatioToWidth: | (unsigned int) | pixelsWide | |
height: | (unsigned int) | pixelsHigh | |
Constrains the window's aspect ratio to pixelsWide/pixelsHigh
.
Also resizes the window to pixelsWide
by pixelsHigh
, unless the user has manually resized the window (in which case the width is preserved) or the requested size is larger than the window's screen (in which case the window is scaled to fit the screen).
This function may only be called on the main thread.
- (void) setFullScreen: | (BOOL) | fullScreen | |
onScreen: | (NSScreen *) | screen | |
Switches between full-screen and windowed mode.
This function may only be called on the main thread.
- (void) setProperties: | (VuoList_VuoWindowProperty) | properties |
Applies a list of properties to this window.
This function may only be called on the main thread.
- (void) unlockAspectRatio |
Removes the aspect ratio constraint set by VuoWindowOpenGl_setAspectRatio.
This function may only be called on the main thread.
|
protected |
True if a programmatic resize of the window is in progress.
|
protected |
True if the user has manually resized the window.
|
atomicprotected |
True if the window can call its trigger callbacks.
|
readwriteatomic |
The position and size of the window's content area, prior to switching to full-screen. In points (not pixels).
|
readwriteatomic |
The current mouse cursor for this window.
|
readwriteatomic |
Was a depth buffer requested?
|
readwriteatomicretain |
The OpenGL view inside this window.
|
readwriteatomic |
The window's style mask, prior to switching to full-screen.