Vuo  1.2.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
VuoSceneObjectRenderer.cc File Reference

Description

VuoSceneObjectRenderer implementation.

Classes

struct  VuoSceneObjectRenderer_Attributes
 OpenGL attribute locations. More...
 
struct  VuoSceneObjectRendererInternal
 Internal state data for a VuoSceneObjectRenderer instance. More...
 

Macros

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

Functions

void VuoSceneObjectRenderer_destroy (VuoSceneObjectRenderer sor)
 Destroys and deallocates the image renderer.
 
VuoSceneObjectRenderer VuoSceneObjectRenderer_make (VuoGlContext glContext, VuoShader shader)
 Creates a reference-counted object for applying a shader to a VuoSceneObject.
 
static void VuoSceneObjectRenderer_drawSingle (CGLContextObj cgl_ctx, struct VuoSceneObjectRendererInternal *sceneObjectRenderer, VuoSceneObject *sceneObject, float modelviewMatrix[16])
 Helper for VuoSceneObjectRenderer_draw.
 
VuoSceneObject VuoSceneObjectRenderer_draw (VuoSceneObjectRenderer sor, VuoSceneObject sceneObject)
 Produces a new VuoSceneObject by rendering sceneObject using shader's GLSL vertex shader.
 

Class Documentation

struct VuoSceneObjectRenderer_Attributes
Class Members
GLint bitangent
unsigned int expectedOutputPrimitiveCount
bool mayChangeOutputPrimitiveCount
GLint normal
GLint position
GLint tangent
GLint textureCoordinate
struct VuoSceneObjectRendererInternal
Class Members
VuoGlContext glContext
VuoSceneObjectRenderer_Attributes lineAttributes
VuoSceneObjectRenderer_Attributes pointAttributes
GLuint query
VuoShader shader
GLuint shamFramebuffer
GLuint shamTexture
VuoSceneObjectRenderer_Attributes triangleAttributes
GLuint vertexArray

Function Documentation

void VuoSceneObjectRenderer_destroy ( VuoSceneObjectRenderer  sor)

Destroys and deallocates the image renderer.

This function may be called from any thread.

VuoSceneObject VuoSceneObjectRenderer_draw ( VuoSceneObjectRenderer  sor,
VuoSceneObject  sceneObject 
)

Produces a new VuoSceneObject by rendering sceneObject using shader's GLSL vertex shader.

VuoSubmeshes are left unchanged if they have an elementAssemblyMethod that differs from the shader's inputElementType.

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.) (Additionally, the caller is responsible for ensuring that the same VuoSceneObjectRenderer is not used simultaneously on multiple threads.)

static void VuoSceneObjectRenderer_drawSingle ( CGLContextObj  cgl_ctx,
struct VuoSceneObjectRendererInternal sceneObjectRenderer,
VuoSceneObject sceneObject,
float  modelviewMatrix[16] 
)
static

Helper for VuoSceneObjectRenderer_draw.

Applies a shader to a single sceneObject's VuoMesh (ignoring its childObjects).

VuoSceneObjectRenderer VuoSceneObjectRenderer_make ( VuoGlContext  glContext,
VuoShader  shader 
)

Creates a reference-counted object for applying a shader to a VuoSceneObject.

This function may be called from any thread.