Vuo  0.5.5
 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

(void) - enableTriggersWithMovedMouseTo:scrolledMouse:usedMouseButton:
 Sets up the view to call trigger functions.
 
(void) - disableTriggers
 Stops the view from calling trigger functions.
 
(void) - toggleFullScreen
 Switches between full-screen and windowed mode.
 
(void) - scheduleRedraw
 Schedules the OpenGL view to be redrawn.
 

Protected Attributes

void(* resizeCallback )(VuoGlContext glContext, void *, unsigned int width, unsigned int height)
 Updates the OpenGL context when the view is resized.
 
void(* switchContextCallback )(VuoGlContext oldGlContext, VuoGlContext newGlContext, void *)
 Allows the caller to free resources on the old GL context and initialize the new GL context.
 
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 toggleFullScreen) requested that the GL view be redrawn.
 
VuoDisplayRefresh displayRefresh
 Handles redrawing at the display refresh rate. Only draws if callerRequestedRedraw.
 
bool togglingFullScreen
 If true, code that requires drawQueue will be skipped (to avoid deadlock).
 
void(* movedMouseTo )(VuoPoint2d)
 Trigger function, fired when the mouse moves.
 
void(* scrolledMouse )(VuoPoint2d)
 Trigger function, fired when the mouse is scrolled.
 
void(* usedMouseButton )(VuoMouseButtonAction)
 Trigger function, fired when a mouse button is used.
 
dispatch_queue_t clickQueue
 Queue for processing mouse button clicks.
 
int pendingClickCount
 The number of clicks elapsed so far.
 

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.
 

Method Documentation

- (void) disableTriggers

Stops the view from calling trigger functions.

This function may be called from any thread.

- (void) enableTriggersWithMovedMouseTo: (VuoPoint2d _movedMouseTo
scrolledMouse: (VuoPoint2d _scrolledMouse
usedMouseButton: (VuoMouseButtonAction _usedMouseButton 

Sets up the view to call trigger functions.

This function may be called from any 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) toggleFullScreen

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 toggleFullScreen) requested that the GL view be redrawn.

- (dispatch_queue_t) clickQueue
protected

Queue for processing mouse button clicks.

- (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(* movedMouseTo)(VuoPoint2d))
protected

Trigger function, fired when the mouse moves.

- (int) pendingClickCount
protected

The number of clicks elapsed so far.

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

Updates the OpenGL context when the view is resized.

- (void(* scrolledMouse)(VuoPoint2d))
protected

Trigger function, fired when the mouse is scrolled.

- (void(* switchContextCallback)(VuoGlContext oldGlContext, VuoGlContext newGlContext, void *))
protected

Allows the caller to free resources on the old GL context and initialize the new GL context.

- (bool) togglingFullScreen
protected

If true, code that requires drawQueue will be skipped (to avoid deadlock).

- (void(* usedMouseButton)(VuoMouseButtonAction))
protected

Trigger function, fired when a mouse button is used.

Property Documentation

- (dispatch_queue_t) drawQueue
readwriteatomic

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.

- (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: