#include <Batch.h>
Builds a Batch from a VboMesh and a GlslProg. Attributes defined in attributeMapping override the default mapping between AttributeSemantics and GlslProg attribute names.
void cinder::gl::Batch::draw |
( |
GLint |
first = 0 , |
|
|
GLsizei |
count = -1 |
|
) |
| |
Draws the Batch. Optionally specify a first vertex/element and a count. Otherwise the entire geometry will be drawn.
void cinder::gl::Batch::bind |
( |
| ) |
|
GLenum cinder::gl::Batch::getPrimitive |
( |
| ) |
const |
Returns OpenGL primitive type (GL_TRIANGLES, GL_TRIANGLE_STRIP, etc)
size_t cinder::gl::Batch::getNumVertices |
( |
| ) |
const |
Returns the total number of vertices in the associated geometry.
size_t cinder::gl::Batch::getNumIndices |
( |
| ) |
const |
Returns the number of element indices in the associated geometry; 0 for non-indexed geometry.
GLenum cinder::gl::Batch::getIndexDataType |
( |
| ) |
const |
Returns the data type for indices; GL_UNSIGNED_INT or GL_UNSIGNED_SHORT.
const GlslProgRef& cinder::gl::Batch::getGlslProg |
( |
| ) |
const |
Returns the shader associated with the Batch.
void cinder::gl::Batch::replaceGlslProg |
( |
const GlslProgRef & |
glsl | ) |
|
Replaces the shader associated with the Batch. Issues a warning if not all attributes were able to match.
const VaoRef cinder::gl::Batch::getVao |
( |
| ) |
const |
Returns the VAO mapping the Batch's geometry to its shader.
VboMeshRef cinder::gl::Batch::getVboMesh |
( |
| ) |
const |
void cinder::gl::Batch::replaceVboMesh |
( |
const VboMeshRef & |
vboMesh | ) |
|
Replaces the VboMesh associated with the Batch. Issues a warning if not all attributes were able to match.
void cinder::gl::Batch::reassignContext |
( |
Context * |
context | ) |
|
Changes the GL context the Batch is associated with.
friend class BatchGeomTarget |
|
friend |
VaoRef cinder::gl::Batch::mVao |
|
protected |
The documentation for this class was generated from the following files: