Vuo
1.2.5
|
VuoGlContext implementation.
Classes | |
class | VuoGlContextPool |
A process-wide set of mutually-shared OpenGL contexts. More... | |
Macros | |
#define | VuoGlCheckBinding(pname) |
Check whether the specified attachment point pname is still bound. | |
#define | VuoGlCheckTextureBinding(pname, unit) |
Check whether the specified attachment point pname is still bound. | |
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, and returns it. | |
void | VuoGlContext_disuseF (VuoGlContext glContext, const char *file, const unsigned int line, const char *func) |
Helper for VuoGlContext_disuse. | |
const char * | VuoGlContext_getRenderer (VuoGlContext context) |
Returns a string describing the context's renderer. | |
int | VuoGlContext_getMaximumSupportedMultisampling (VuoGlContext context) |
Returns the maximum supported multisampling level for this GPU. | |
void * | VuoGlContext_makePlatformPixelFormat (bool hasDepthBuffer, bool openGL32Core) |
Returns a platform-specific OpenGL pixelformat description. | |
void | _VGL_describe (GLenum error, CGLContextObj cgl_ctx, const char *file, const unsigned int line, const char *func) |
Logs text describing the specified OpenGL error. | |
void | _VGL (CGLContextObj cgl_ctx, const char *file, const unsigned int line, const char *func) |
Helper for VGL() . | |
Variables | |
static dispatch_once_t | VuoGlContextPoolCreated = 0 |
Make sure this process only has a single GL Context Pool. | |
#define VuoGlCheckBinding | ( | pname | ) |
Check whether the specified attachment point pname
is still bound.
(This is defined as a macro in order to stringify the argument.)
#define VuoGlCheckTextureBinding | ( | pname, | |
unit | |||
) |
Check whether the specified attachment point pname
is still bound.
(This is defined as a macro in order to stringify the argument.)
void _VGL | ( | CGLContextObj | cgl_ctx, |
const char * | file, | ||
const unsigned int | line, | ||
const char * | func | ||
) |
Helper for VGL()
.
void _VGL_describe | ( | GLenum | error, |
CGLContextObj | cgl_ctx, | ||
const char * | file, | ||
const unsigned int | line, | ||
const char * | func | ||
) |
Logs text describing the specified OpenGL error.
void VuoGlContext_disuseF | ( | VuoGlContext | glContext, |
const char * | file, | ||
const unsigned int | line, | ||
const char * | func | ||
) |
Helper for VuoGlContext_disuse.
int VuoGlContext_getMaximumSupportedMultisampling | ( | VuoGlContext | context | ) |
Returns the maximum supported multisampling level for this GPU.
Multisampling is known to break point rendering on some GPUs, so we intentionally disable it on those.
const char* VuoGlContext_getRenderer | ( | VuoGlContext | context | ) |
Returns a string describing the context's renderer.
This is a separate function in order to clean up the log message.
void* VuoGlContext_makePlatformPixelFormat | ( | bool | hasDepthBuffer, |
bool | openGL32Core | ||
) |
Returns a platform-specific OpenGL pixelformat description.
On Mac OS X, this is a CGLPixelFormatObj
.
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
. The CGLContext
must be unlocked when calling this function, but after that you may lock it at any time (Vuo doesn't require it to be locked or unlocked).
Must be called before any Vuo composition is loaded, and before any other VuoGlContext_*
methods.
This function may be called from any thread.
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, and returns it.
This function may be called from any thread.
|
static |
Make sure this process only has a single GL Context Pool.