Vuo
1.0.0
|
VuoSceneRenderer interface.
Typedefs | |
typedef void * | VuoSceneRenderer |
An object for rendering a scenegraph. | |
Functions | |
VuoSceneRenderer | VuoSceneRenderer_make (VuoGlContext glContext, float backingScaleFactor) |
Creates a reference-counted object for rendering a scenegraph. | |
void | VuoSceneRenderer_regenerateProjectionMatrix (VuoSceneRenderer sceneRenderer, unsigned int width, unsigned int height) |
Using the first camera found in the scene (or VuoSceneObject_makeDefaultCamera() if there is no camera in the scene), recalculates the projection matrix based on the specified viewport width and height . | |
void | VuoSceneRenderer_draw (VuoSceneRenderer sceneRenderer) |
Renders the scene. | |
void | VuoSceneRenderer_renderToImage (VuoSceneRenderer sceneRenderer, VuoImage *image, VuoImageColorDepth imageColorDepth, VuoImage *depthImage) |
Creates an OpenGL Framebuffer Object, and uses it to render the scene to image and depthImage . | |
void | VuoSceneRenderer_setRootSceneObject (VuoSceneRenderer sceneRenderer, VuoSceneObject rootSceneObject) |
Changes the scenegraph to be rendered. | |
void | VuoSceneRenderer_setCameraName (VuoSceneRenderer sceneRenderer, VuoText cameraName, VuoBoolean useLeftCamera) |
Changes the name of the camera to look for. | |
typedef void* VuoSceneRenderer |
An object for rendering a scenegraph.
void VuoSceneRenderer_draw | ( | VuoSceneRenderer | sr | ) |
Renders the scene.
This function may be called from any thread. (However, the caller is responsible for ensuring that the GL context is not used simultaneously on multiple threads.)
VuoSceneRenderer VuoSceneRenderer_make | ( | VuoGlContext | glContext, |
float | backingScaleFactor | ||
) |
Creates a reference-counted object for rendering a scenegraph.
This function may be called from any thread.
void VuoSceneRenderer_regenerateProjectionMatrix | ( | VuoSceneRenderer | sr, |
unsigned int | width, | ||
unsigned int | height | ||
) |
Using the first camera found in the scene (or VuoSceneObject_makeDefaultCamera() if there is no camera in the scene), recalculates the projection matrix based on the specified viewport width
and height
.
This function may be called from any thread.
void VuoSceneRenderer_renderToImage | ( | VuoSceneRenderer | sceneRenderer, |
VuoImage * | image, | ||
VuoImageColorDepth | imageColorDepth, | ||
VuoImage * | depthImage | ||
) |
Creates an OpenGL Framebuffer Object, and uses it to render the scene to image
and depthImage
.
void VuoSceneRenderer_setCameraName | ( | VuoSceneRenderer | sr, |
VuoText | cameraName, | ||
VuoBoolean | useLeftCamera | ||
) |
Changes the name of the camera to look for.
The first camera whose name contains cameraName
will be rendered (next time VuoSceneRenderer_draw()
is called), or, if no camera matches, VuoSceneObject_makeDefaultCamera()
will be used.
If cameraName
is stereoscopic, useLeftCamera
selects between the left and right cameras in the stereo pair.
This function may be called from any thread.
void VuoSceneRenderer_setRootSceneObject | ( | VuoSceneRenderer | sr, |
VuoSceneObject | rootSceneObject | ||
) |
Changes the scenegraph to be rendered.
This function may be called from any thread. (However, the caller is responsible for ensuring that the GL context is not used simultaneously on multiple threads.)