Vuo  0.5.3
 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 (void)
 Creates a reference-counted object for rendering a scenegraph.
 
void VuoSceneRenderer_prepareContext (VuoSceneRenderer sceneRenderer, VuoGlContext glContext)
 Sets up OpenGL state on the current GL Context.
 
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, VuoGlContext glContext)
 Renders the scene.
 
void VuoSceneRenderer_setRootSceneObject (VuoSceneRenderer sceneRenderer, VuoGlContext glContext, VuoSceneObject rootSceneObject)
 Changes the scenegraph to be rendered.
 
void VuoSceneRenderer_setCameraName (VuoSceneRenderer sceneRenderer, VuoText cameraName)
 Changes the name of the camera to look for.
 
void VuoSceneRenderer_drawElement (VuoSceneRenderer sceneRenderer, VuoGlContext glContext, int element, float length)
 Draws all vertex normals in sceneRenderer-rootSceneObject.
 

Typedef Documentation

typedef void* VuoSceneRenderer

An object for rendering a scenegraph.

Function Documentation

void VuoSceneRenderer_draw ( VuoSceneRenderer  sr,
VuoGlContext  glContext 
)

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

void VuoSceneRenderer_drawElement ( VuoSceneRenderer  sr,
VuoGlContext  glContext,
int  element,
float  length 
)

Draws all vertex normals in sceneRenderer-rootSceneObject.

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

Todo:
update VuoSceneRenderer_draw() to call this for each VuoSceneObject when debugging
VuoSceneRenderer VuoSceneRenderer_make ( void  )

Creates a reference-counted object for rendering a scenegraph.

This function may be called from any thread.

void VuoSceneRenderer_prepareContext ( VuoSceneRenderer  sceneRenderer,
VuoGlContext  glContext 
)

Sets up OpenGL state on the current GL Context.

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_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_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,
VuoGlContext  glContext,
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.)