Vuo  0.4.3
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
VuoSceneRenderer.cc File Reference

Description

VuoSceneRenderer implementation.

Classes

struct  VuoSceneRendererInternal_vertices
 GL Objects corresponding with a VuoVertices instance. More...
 
struct  VuoSceneRendererInternal
 Internal state data for a VuoSceneRenderer instance. More...
 

Macros

#define glGenVertexArrays   glGenVertexArraysAPPLE
 
#define glBindVertexArray   glBindVertexArrayAPPLE
 
#define glDeleteVertexArrays   glDeleteVertexArraysAPPLE
 

Functions

VuoSceneRenderer VuoSceneRenderer_create (void)
 Creates an 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_draw (VuoSceneRenderer sr)
 Renders the scene.
 
void VuoSceneRenderer_drawElement (VuoSceneRenderer sr, int element, double length)
 Draws all vertex normals in sceneRenderer-rootSceneObject.
 
void VuoSceneRenderer_setRootSceneObject (VuoSceneRenderer sr, VuoSceneObject rootSceneObject)
 Changes the scenegraph to be rendered.
 
void VuoSceneRenderer_destroy (VuoSceneRenderer sr)
 Destroys and deallocates the scene renderer.
 

Class Documentation

struct VuoSceneRendererInternal_vertices
Class Members
GLuint bitangentBuffer
GLuint elementBuffer
GLuint normalBuffer
GLuint positionBuffer
GLuint tangentBuffer
GLuint textureCoordinateBuffer
GLuint vertexArray
struct VuoSceneRendererInternal
Class Members
float projectionMatrix[16] Column-major 4x4 matrix.
VuoSceneObject rootSceneObject
bool scenegraphChanged
dispatch_semaphore_t scenegraphSemaphore Serializes access to rootSceneObject.
bool scenegraphValid
VuoSceneRendererInternal_vertices * vertices

Macro Definition Documentation

#define glGenVertexArrays   glGenVertexArraysAPPLE

Function Documentation

VuoSceneRenderer VuoSceneRenderer_create ( void  )

Creates an object for rendering a scenegraph.

May be called from any thread (doesn't require a GL Context).

void VuoSceneRenderer_destroy ( VuoSceneRenderer  sr)

Destroys and deallocates the scene renderer.

May be called from any thread (doesn't require 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_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_setRootSceneObject ( VuoSceneRenderer  sr,
VuoSceneObject  rootSceneObject 
)

Changes the scenegraph to be rendered.

May be called from any thread (doesn't require a GL Context).