Vuo  0.6.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Typedefs | Functions
VuoSceneRenderer.h File Reference

Description

VuoSceneRenderer interface.

Typedefs

typedef void * VuoSceneRenderer
 An object for rendering a scenegraph.
 

Functions

VuoSceneRenderer VuoSceneRenderer_make (VuoGlContext glContext)
 Creates a reference-counted object for rendering a scenegraph.
 
void VuoSceneRenderer_switchContext (VuoSceneRenderer sceneRenderer, VuoGlContext newGlContext)
 Changes the OpenGL context on which the scenegraph can be rendered.
 
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, 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)
 Changes the name of the camera to look for.
 

Typedef Documentation

typedef void* VuoSceneRenderer

An object for rendering a scenegraph.

Function Documentation

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)

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,
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 
)

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.

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.)

void VuoSceneRenderer_switchContext ( VuoSceneRenderer  sr,
VuoGlContext  newGlContext 
)

Changes the OpenGL context on which the scenegraph can be rendered.

Requires use of both the old and new OpenGL contexts.

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.)