Vuo  0.4.7
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Friends | List of all members
VuoGlContextPool Class Reference

Description

A process-wide set of mutually-shared OpenGL contexts.

Public Member Functions

CGLContextObj 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 disuse (CGLContextObj context)
 Throws the specified context back in the pool.
 

Static Public Member Functions

static VuoGlContextPoolgetPool ()
 Returns the process-wide pool singleton instance.
 

Friends

void VuoGlContext_setGlobalRootContext (void *rootContext)
 Specifies a platform-specific context to be used as the base for all of Vuo's shared GL contexts.
 

Member Function Documentation

void VuoGlContextPool::disuse ( CGLContextObj  context)
inline

Throws the specified context back in the pool.

Can be called from any thread.

CGLContextObj VuoGlContextPool::use ( void  )
inline

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.

Friends And Related Function Documentation

void VuoGlContext_setGlobalRootContext ( void *  rootContext)
friend

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.


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