Vuo  1.0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Instance Methods | Protected Attributes | Properties | List of all members
VuoWindowOpenGLView Class Reference

Description

Helper for VuoWindowOpenGLInternal.

Instance Methods

(id) - initWithFrame:initCallback:resizeCallback:drawCallback:drawContext:
 Creates an OpenGL view that calls the given callbacks for rendering.
 
(void) - enableTriggers
 Sets up the view to call trigger functions.
 
(void) - disableTriggers
 Stops the view from calling trigger functions.
 
(void) - setFullScreen:onScreen:
 Switches between full-screen and windowed mode.
 
(BOOL) - isFullScreen
 Returns YES if this window is currently fullscreen.
 
(void) - scheduleRedraw
 Schedules the OpenGL view to be redrawn.
 

Protected Attributes

void(* initCallback )(VuoGlContext glContext, float backingScaleFactor, void *)
 Initializes the OpenGL context.
 
bool initCallbackCalled
 Has the init callback already been called?
 
void(* resizeCallback )(VuoGlContext glContext, void *, unsigned int width, unsigned int height)
 Updates the OpenGL context when the view is resized.
 
void(* drawCallback )(VuoGlContext glContext, void *)
 Draws onto the OpenGL context.
 
void * drawContext
 Argument to pass to callbacks (e.g. node instance data).
 
bool callerRequestedRedraw
 True if an external caller (i.e., not resize or setFullScreen) requested that the GL view be redrawn.
 
VuoDisplayRefresh displayRefresh
 Handles redrawing at the display refresh rate. Only draws if callerRequestedRedraw.
 
NSImage * circleImage
 The touch-circle mouse cursor.
 
NSRect circleRect
 The bounding box of circleImage.
 

Properties

VuoWindowOpenGLInternalglWindow
 The parent window; allows the view to access it while full-screen.
 
NSOpenGLContext * windowedGlContext
 The OpenGL context from Vuo's context pool; allows the windw to access it while the view is full-screen.
 
dispatch_queue_t drawQueue
 Queue to ensure that multiple threads don't attempt to draw to the same window simultaneously.
 
NSRect viewport
 The viewport in which we're rendering (it might not match the view's dimensions), relative to the parent view. In points (not pixels).
 

Method Documentation

- (void) disableTriggers

Stops the view from calling trigger functions.

This function may be called from any thread.

- (void) enableTriggers

Sets up the view to call trigger functions.

This function may be called from any thread.

- (id) initWithFrame: (NSRect)  frame
initCallback: (VuoGlContext glContext, float backingScaleFactor, void *)  _initCallback
resizeCallback: (VuoGlContext glContext, void *, unsigned int width, unsigned int height)  _resizeCallback
drawCallback: (VuoGlContext glContext, void *)  _drawCallback
drawContext: (void *)  _drawContext 

Creates an OpenGL view that calls the given callbacks for rendering.

This function may only be called on the main thread.

- (BOOL) isFullScreen

Returns YES if this window is currently fullscreen.

Use this instead of -[NSView isInFullScreenMode], since that method doesn't exist on 10.6.

- (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) setFullScreen: (BOOL)  wantsFullScreen
onScreen: (NSScreen *)  screen 

Switches between full-screen and windowed mode.

This function may only be called on the main thread.

Member Data Documentation

- (bool) callerRequestedRedraw
protected

True if an external caller (i.e., not resize or setFullScreen) requested that the GL view be redrawn.

- (NSImage*) circleImage
protected

The touch-circle mouse cursor.

- (NSRect) circleRect
protected

The bounding box of circleImage.

- (VuoDisplayRefresh) displayRefresh
protected

Handles redrawing at the display refresh rate. Only draws if callerRequestedRedraw.

- (void(* drawCallback)(VuoGlContext glContext, void *))
protected

Draws onto the OpenGL context.

- (void*) drawContext
protected

Argument to pass to callbacks (e.g. node instance data).

- (void(* initCallback)(VuoGlContext glContext, float backingScaleFactor, void *))
protected

Initializes the OpenGL context.

- (bool) initCallbackCalled
protected

Has the init callback already been called?

- (void(* resizeCallback)(VuoGlContext glContext, void *, unsigned int width, unsigned int height))
protected

Updates the OpenGL context when the view is resized.

Property Documentation

- (dispatch_queue_t) drawQueue
readwriteatomicassign

Queue to ensure that multiple threads don't attempt to draw to the same window simultaneously.

- (VuoWindowOpenGLInternal*) glWindow
readwriteatomicretain

The parent window; allows the view to access it while full-screen.

- (NSRect) viewport
readwriteatomic

The viewport in which we're rendering (it might not match the view's dimensions), relative to the parent view. In points (not pixels).

- (NSOpenGLContext*) windowedGlContext
readwriteatomicretain

The OpenGL context from Vuo's context pool; allows the windw to access it while the view is full-screen.


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