VuoSceneObjectRenderer interface.
Definition in file VuoSceneObjectRenderer.h.
Go to the source code of this file.
Macros | |
#define | VuoSceneObjectRenderer_maxOutputVertices 9 |
The maximum number of vertices a VuoSceneObjectRenderer_CPUGeometryOperator function can output. More... | |
Typedefs | |
typedef void * | VuoSceneObjectRenderer |
Context data for applying a shader to a VuoSceneObject. More... | |
typedef void(^ | VuoSceneObjectRenderer_CPUGeometryOperator) (float *modelMatrix, float *modelMatrixInverse, int *vertexCount, float *positions, float *normals, float *textureCoordinates, float *colors) |
A function that modifies a primitive (triangle, line, or point). More... | |
typedef VuoPoint3d(^ | VuoSceneObjectRenderer_Deformer) (VuoPoint3d position, VuoPoint3d normal, VuoPoint2d textureCoordinate) |
A function that changes the position of a single vertex. More... | |
Functions | |
VuoSceneObjectRenderer | VuoSceneObjectRenderer_make (VuoShader shader) |
Creates a reference-counted object for applying a shader to a VuoSceneObject. More... | |
VuoSceneObjectRenderer_CPUGeometryOperator | VuoSceneObjectRenderer_makeDeformer (VuoSceneObjectRenderer_Deformer deformer) |
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 sceneObjectRenderer, VuoSceneObject object, VuoSceneObjectRenderer_CPUGeometryOperator cpuGeometryOperator) |
Produces a new VuoSceneObject by rendering sceneObject using either: More... | |
#define VuoSceneObjectRenderer_maxOutputVertices 9 |
The maximum number of vertices a VuoSceneObjectRenderer_CPUGeometryOperator function can output.
Just large enough to support vuo.scene.spike
.
Definition at line 32 of file VuoSceneObjectRenderer.h.
typedef void* VuoSceneObjectRenderer |
Context data for applying a shader to a VuoSceneObject.
Definition at line 21 of file VuoSceneObjectRenderer.h.
typedef void(^ VuoSceneObjectRenderer_CPUGeometryOperator) (float *modelMatrix, float *modelMatrixInverse, int *vertexCount, float *positions, float *normals, float *textureCoordinates, float *colors) |
A function that modifies a primitive (triangle, line, or point).
Roughly equivalent to an OpenGL Vertex Shader + Geometry Shader.
All 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.
Definition at line 43 of file VuoSceneObjectRenderer.h.
typedef VuoPoint3d(^ VuoSceneObjectRenderer_Deformer) (VuoPoint3d position, VuoPoint3d normal, VuoPoint2d textureCoordinate) |
A function that changes the position of a single vertex.
(A simplified version of VuoSceneObjectRenderer_CPUGeometryOperator.)
Definition at line 57 of file VuoSceneObjectRenderer.h.
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 741 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 550 of file VuoSceneObjectRenderer.cc.
bool VuoSceneObjectRenderer_usingGPU | ( | void | ) |
Returns true if this library will be using the GPU for transform feedback.
Definition at line 689 of file VuoSceneObjectRenderer.cc.