Vuo
1.2.2
|
VuoGlContext interface.
Macros | |
#define | VuoGlContext_disuse(glContext) VuoGlContext_disuseF(glContext, __FILE__, __LINE__, __func__) |
Throws the specified VuoGlContext back in the pool. | |
#define | VGL() _VGL(cgl_ctx, __FILE__, __LINE__, __func__); |
If there's an OpenGL error, prints info about it. | |
Typedefs | |
typedef void * | VuoGlContext |
A framebuffer and state for GL rendering. | |
Functions | |
int | VuoGlContext_getMaximumSupportedMultisampling (VuoGlContext context) |
Returns the maximum supported multisampling level for this GPU. | |
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. | |
void * | VuoGlContext_makePlatformPixelFormat (bool hasDepthBuffer) |
Returns a platform-specific OpenGL pixelformat description. | |
void | _VGL (CGLContextObj cgl_ctx, const char *file, const unsigned int line, const char *func) |
Helper for VGL() . | |
#define VGL | ( | ) | _VGL(cgl_ctx, __FILE__, __LINE__, __func__); |
If there's an OpenGL error, prints info about it.
Useful for debugging.
#define VuoGlContext_disuse | ( | glContext | ) | VuoGlContext_disuseF(glContext, __FILE__, __LINE__, __func__) |
Throws the specified VuoGlContext
back in the pool.
This function may be called from any thread.
typedef void* VuoGlContext |
A framebuffer and state for GL rendering.
void _VGL | ( | CGLContextObj | cgl_ctx, |
const char * | file, | ||
const unsigned int | line, | ||
const char * | func | ||
) |
Helper for VGL()
.
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.
void* VuoGlContext_makePlatformPixelFormat | ( | bool | hasDepthBuffer | ) |
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.