Vuo  0.5.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
VuoGlContext.cc File Reference

Description

VuoGlContext implementation.

Classes

class  VuoGlContextPool
 A process-wide set of mutually-shared OpenGL contexts. More...
 

Functions

void VuoGlContext_setGlobalRootContext (void *rootContext)
 Specifies a platform-specific context to be used as the base for all of Vuo's shared GL contexts.
 
VuoGlContext VuoGlContext_use (void)
 Finds an unused GL context in the process-wide shared context pool (or creates one if none is available), marks it used, activates it on the current thread, and returns it.
 
void VuoGlContext_useSpecific (VuoGlContext glContext)
 Activates the specified VuoGlContext on the current thread.
 
void VuoGlContext_disuse (void)
 Deactivates the current thread's GL context, and throws it back in the pool.
 
void VuoGlContext_disuseSpecific (VuoGlContext glContext)
 Throws the specified VuoGlContext back in the pool.
 
void _VGL (const char *file, const unsigned int line, const char *func)
 Helper for VGL().
 

Function Documentation

void _VGL ( const char *  file,
const unsigned int  line,
const char *  func 
)

Helper for VGL().

void VuoGlContext_disuse ( void  )

Deactivates the current thread's GL context, and throws it back in the pool.

void VuoGlContext_disuseSpecific ( VuoGlContext  glContext)

Throws the specified VuoGlContext back in the pool.

Can be called from any thread.

void VuoGlContext_setGlobalRootContext ( void *  rootContext)

Specifies a platform-specific context to be used as the base for all of Vuo's shared GL contexts.

On Mac, this should be a CGLContext.

Must be called before any Vuo composition is loaded, and before any other VuoGlContext_* methods.

VuoGlContext VuoGlContext_use ( void  )

Finds an unused GL context in the process-wide shared context pool (or creates one if none is available), marks it used, activates it on the current thread, and returns it.

Can be called from any thread.

void VuoGlContext_useSpecific ( VuoGlContext  glContext)

Activates the specified VuoGlContext on the current thread.

Can be called from any thread.