Vuo
0.5.0
|
VuoSceneRenderer implementation.
Classes | |
struct | VuoSceneRendererInternal_vertices |
GL Objects corresponding with a VuoVertices instance. More... | |
class | VuoSceneRendererInternal_object |
GL Objects corresponding with a VuoSceneObject instance. More... | |
class | VuoSceneRendererInternal |
Internal state data for a VuoSceneRenderer instance. More... | |
Macros | |
#define | glGenVertexArrays glGenVertexArraysAPPLE |
#define | glBindVertexArray glBindVertexArrayAPPLE |
#define | glDeleteVertexArrays glDeleteVertexArraysAPPLE |
Functions | |
void | VuoSceneRenderer_destroy (VuoSceneRenderer sr) |
Destroys and deallocates the scene renderer. | |
VuoSceneRenderer | VuoSceneRenderer_make (void) |
Creates a reference-counted object for rendering a scenegraph. | |
void | VuoSceneRenderer_prepareContext (VuoSceneRenderer sceneRenderer) |
Sets up OpenGL state on the current GL Context. | |
void | VuoSceneRenderer_regenerateProjectionMatrix (VuoSceneRenderer sr, unsigned int width, unsigned int height) |
Recalculates the projection matrix based on the specified viewport width and height . | |
void | VuoSceneRenderer_drawSceneObject (VuoSceneObject so, VuoSceneRendererInternal_object *soi, float projectionMatrix[16], float modelviewMatrix[16]) |
Draws so (using the uploaded object names in soi ). | |
void | VuoSceneRenderer_drawSceneObjectsRecursively (VuoSceneObject so, VuoSceneRendererInternal_object *soi, float projectionMatrix[16], float modelviewMatrix[16]) |
Draws so and its child objects. | |
void | VuoSceneRenderer_draw (VuoSceneRenderer sr) |
Renders the scene. | |
void | VuoSceneRenderer_drawElement (VuoSceneRenderer sr, int element, double length) |
Draws all vertex normals in sceneRenderer-rootSceneObject. | |
void | VuoSceneRenderer_uploadSceneObject (VuoSceneObject so, VuoSceneRendererInternal_object *soi) |
Uploads so to the GPU, and stores the uploaded object names in soi . | |
void | VuoSceneRenderer_uploadSceneObjectsRecursively (VuoSceneObject so, VuoSceneRendererInternal_object *soi) |
Uploads so and its child objects to the GPU, and stores the uploaded object names in soi . | |
void | VuoSceneRenderer_releaseSceneObject (VuoSceneObject so, VuoSceneRendererInternal_object *soi) |
Releases the GPU objects created by VuoSceneRenderer_uploadSceneObject . | |
void | VuoSceneRenderer_releaseSceneObjectsRecursively (VuoSceneObject so, VuoSceneRendererInternal_object *soi) |
Releases the GPU objects created by VuoSceneRenderer_uploadSceneObjectsRecursively . | |
void | VuoSceneRenderer_retainSceneObjectsRecursively (VuoSceneObject so) |
Deeply retains so . | |
void | VuoSceneRenderer_setRootSceneObject (VuoSceneRenderer sr, VuoSceneObject rootSceneObject) |
Changes the scenegraph to be rendered. | |
struct VuoSceneRendererInternal_vertices |
class VuoSceneRendererInternal_object |
Class Members | ||
---|---|---|
list < VuoSceneRendererInternal_object > |
childObjects | |
list < VuoSceneRendererInternal_vertices > |
vertices |
class VuoSceneRendererInternal |
Class Members | ||
---|---|---|
float | projectionMatrix[16] | Column-major 4x4 matrix. |
VuoSceneObject | rootSceneObject | |
VuoSceneRendererInternal_object | rootSceneObjectInternal | |
dispatch_semaphore_t | scenegraphSemaphore | Serializes access to other data in this structure. |
bool | scenegraphValid |
#define glBindVertexArray glBindVertexArrayAPPLE |
#define glDeleteVertexArrays glDeleteVertexArraysAPPLE |
#define glGenVertexArrays glGenVertexArraysAPPLE |
void VuoSceneRenderer_destroy | ( | VuoSceneRenderer | sr | ) |
Destroys and deallocates the scene renderer.
May be called from any thread (automatically uses and disuses a GL Context).
void VuoSceneRenderer_draw | ( | VuoSceneRenderer | sr | ) |
Renders the scene.
Must be called from a thread with an active GL Context.
void VuoSceneRenderer_drawElement | ( | VuoSceneRenderer | sr, |
int | element, | ||
double | length | ||
) |
Draws all vertex normals in sceneRenderer-rootSceneObject.
Must be called from a thread with an active GL Context.
void VuoSceneRenderer_drawSceneObject | ( | VuoSceneObject | so, |
VuoSceneRendererInternal_object * | soi, | ||
float | projectionMatrix[16], | ||
float | modelviewMatrix[16] | ||
) |
Draws so
(using the uploaded object names in soi
).
Does not traverse child objects.
Must be called from a thread with an active GL Context.
void VuoSceneRenderer_drawSceneObjectsRecursively | ( | VuoSceneObject | so, |
VuoSceneRendererInternal_object * | soi, | ||
float | projectionMatrix[16], | ||
float | modelviewMatrix[16] | ||
) |
Draws so
and its child objects.
Must be called from a thread with an active GL Context.
VuoSceneRenderer VuoSceneRenderer_make | ( | void | ) |
Creates a reference-counted object for rendering a scenegraph.
May be called from any thread (doesn't require a GL Context).
void VuoSceneRenderer_prepareContext | ( | VuoSceneRenderer | sceneRenderer | ) |
Sets up OpenGL state on the current GL Context.
Must be called from a thread with an active GL Context.
void VuoSceneRenderer_regenerateProjectionMatrix | ( | VuoSceneRenderer | sr, |
unsigned int | width, | ||
unsigned int | height | ||
) |
Recalculates the projection matrix based on the specified viewport width
and height
.
May be called from any thread (doesn't require a GL Context).
void VuoSceneRenderer_releaseSceneObject | ( | VuoSceneObject | so, |
VuoSceneRendererInternal_object * | soi | ||
) |
Releases the GPU objects created by VuoSceneRenderer_uploadSceneObject
.
Does not traverse child objects.
Must be called from a thread with an active GL Context.
void VuoSceneRenderer_releaseSceneObjectsRecursively | ( | VuoSceneObject | so, |
VuoSceneRendererInternal_object * | soi | ||
) |
Releases the GPU objects created by VuoSceneRenderer_uploadSceneObjectsRecursively
.
Must be called from a thread with an active GL Context.
void VuoSceneRenderer_retainSceneObjectsRecursively | ( | VuoSceneObject | so | ) |
Deeply retains so
.
May be called from any thread (doesn't require a GL Context).
void VuoSceneRenderer_setRootSceneObject | ( | VuoSceneRenderer | sr, |
VuoSceneObject | rootSceneObject | ||
) |
Changes the scenegraph to be rendered.
May be called from any thread (automatically uses and disuses a GL Context).
void VuoSceneRenderer_uploadSceneObject | ( | VuoSceneObject | so, |
VuoSceneRendererInternal_object * | soi | ||
) |
Uploads so
to the GPU, and stores the uploaded object names in soi
.
Does not traverse child objects.
Must be called from a thread with an active GL Context.
void VuoSceneRenderer_uploadSceneObjectsRecursively | ( | VuoSceneObject | so, |
VuoSceneRendererInternal_object * | soi | ||
) |
Uploads so
and its child objects to the GPU, and stores the uploaded object names in soi
.
Must be called from a thread with an active GL Context.