VuoSceneObjectRenderer implementation.
Definition in file VuoSceneObjectRenderer.cc.
Go to the source code of this file.
Classes | |
struct | VuoSceneObjectRenderer_Attributes |
OpenGL attribute locations. More... | |
struct | VuoSceneObjectRendererInternal |
Internal state data for a VuoSceneObjectRenderer instance. More... | |
Macros | |
#define | ELEM(i) (elementCount ? elements[i] : i) |
Returns the vertex index to use. More... | |
#define | glGenVertexArrays glGenVertexArraysAPPLE |
Stub. More... | |
#define | glBindVertexArray glBindVertexArrayAPPLE |
Stub. More... | |
#define | glDeleteVertexArrays glDeleteVertexArraysAPPLE |
Stub. More... | |
Functions | |
void | VuoSceneObjectRenderer_destroy (VuoSceneObjectRenderer sor) |
Destroys and deallocates the image renderer. More... | |
VuoSceneObjectRenderer | VuoSceneObjectRenderer_make (VuoShader shader) |
Creates a reference-counted object for applying a shader to a VuoSceneObject. More... | |
static void | VuoSceneObjectRenderer_drawSingle (CGLContextObj cgl_ctx, struct VuoSceneObjectRendererInternal *sceneObjectRenderer, VuoSceneObject sceneObject, float modelviewMatrix[16]) |
Helper for VuoSceneObjectRenderer_draw. More... | |
static void | VuoSceneObjectRenderer_copyElement (VuoMesh mesh, int start, float *source, unsigned int elementCount, unsigned int *elements, VuoMesh_ElementAssemblyMethod elementAssemblyMethod, int verticesPerPrimitive, int floatsPerVertex, float *destination, float *defaultValues) |
Helper for VuoSceneObjectRenderer_drawSingleOnCPU. More... | |
static void | VuoSceneObjectRenderer_drawSingleOnCPU (VuoSceneObject sceneObject, float modelviewMatrix[16], VuoSceneObjectRenderer_CPUGeometryOperator cpuGeometryOperator) |
Helper for VuoSceneObjectRenderer_draw. More... | |
VuoSceneObjectRenderer_CPUGeometryOperator | VuoSceneObjectRenderer_makeDeformer (VuoSceneObjectRenderer_Deformer deform) |
Converts VuoSceneObjectRenderer_Deformer into VuoSceneObjectRenderer_CPUGeometryOperator, to make it easier to implemnet common 3D mesh filters. More... | |
bool | VuoSceneObjectRenderer_usingGPU (void) |
Returns true if this library will be using the GPU for transform feedback. More... | |
VuoSceneObject | VuoSceneObjectRenderer_draw (VuoSceneObjectRenderer sor, VuoSceneObject sceneObject, VuoSceneObjectRenderer_CPUGeometryOperator cpuGeometryOperator) |
Produces a new VuoSceneObject by rendering sceneObject using either: More... | |
struct VuoSceneObjectRenderer_Attributes |
struct VuoSceneObjectRendererInternal |
Class Members | ||
---|---|---|
VuoSceneObjectRenderer_Attributes | lineAttributes | |
VuoSceneObjectRenderer_Attributes | pointAttributes | |
GLuint | query | |
VuoShader | shader | |
GLuint | shamFramebuffer | |
GLuint | shamTexture | |
VuoSceneObjectRenderer_Attributes | triangleAttributes | |
GLuint | vertexArray |
#define ELEM | ( | i | ) | (elementCount ? elements[i] : i) |
Returns the vertex index to use.
Definition at line 343 of file VuoSceneObjectRenderer.cc.
#define glBindVertexArray glBindVertexArrayAPPLE |
Stub.
Definition at line 17 of file VuoSceneObjectRenderer.cc.
#define glDeleteVertexArrays glDeleteVertexArraysAPPLE |
Stub.
Definition at line 18 of file VuoSceneObjectRenderer.cc.
#define glGenVertexArrays glGenVertexArraysAPPLE |
Stub.
Definition at line 16 of file VuoSceneObjectRenderer.cc.
|
inlinestatic |
Helper for VuoSceneObjectRenderer_drawSingleOnCPU.
Definition at line 348 of file VuoSceneObjectRenderer.cc.
void VuoSceneObjectRenderer_destroy | ( | VuoSceneObjectRenderer | sor | ) |
Destroys and deallocates the image renderer.
This function may be called from any thread.
Definition at line 782 of file VuoSceneObjectRenderer.cc.
VuoSceneObject VuoSceneObjectRenderer_draw | ( | VuoSceneObjectRenderer | sor, |
VuoSceneObject | sceneObject, | ||
VuoSceneObjectRenderer_CPUGeometryOperator | cpuGeometryOperator | ||
) |
Produces a new VuoSceneObject by rendering sceneObject
using either:
shader
's GLSL vertex shader (if the current GPU adequately supports transform feedback)cpuGeometryOperator
(if the current GPU has trouble with transform feedback)VuoSubmesh
es are left unchanged if they have an elementAssemblyMethod that differs from the shader's inputElementType.
cpuGeometryOperator
's parameters serve as both input and output. It may decrease (down to 0) or increase (up to VuoSceneObjectRenderer_maxOutputVertices) the number of vertices it outputs.
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.)
cpuGeometryOperator
argument. Definition at line 733 of file VuoSceneObjectRenderer.cc.
|
static |
Helper for VuoSceneObjectRenderer_draw.
Applies a shader to a single sceneObject's
VuoMesh (ignoring its childObjects).
Definition at line 136 of file VuoSceneObjectRenderer.cc.
|
static |
Helper for VuoSceneObjectRenderer_draw.
Applies cpuGeometryOperator
to a single sceneObject
's VuoMesh (ignoring its childObjects).
Definition at line 419 of file VuoSceneObjectRenderer.cc.
VuoSceneObjectRenderer VuoSceneObjectRenderer_make | ( | VuoShader | shader | ) |
Creates a reference-counted object for applying a shader to a VuoSceneObject.
This function may be called from any thread.
Definition at line 79 of file VuoSceneObjectRenderer.cc.
VuoSceneObjectRenderer_CPUGeometryOperator VuoSceneObjectRenderer_makeDeformer | ( | VuoSceneObjectRenderer_Deformer | deform | ) |
Converts VuoSceneObjectRenderer_Deformer into VuoSceneObjectRenderer_CPUGeometryOperator, to make it easier to implemnet common 3D mesh filters.
The caller is responsible for calling Block_release
on the returned block.
Definition at line 543 of file VuoSceneObjectRenderer.cc.
bool VuoSceneObjectRenderer_usingGPU | ( | void | ) |
Returns true if this library will be using the GPU for transform feedback.
Definition at line 682 of file VuoSceneObjectRenderer.cc.