![]() |
Cinder
0.9.1
|
#include <Vao.h>
Public Member Functions | |
Layout () | |
void | bindBuffer (GLenum target, GLuint buffer) |
bool | isVertexAttribArrayEnabled (GLuint index) const |
void | enableVertexAttribArray (GLuint index) |
void | disableVertexAttribArray (GLuint index) |
void | vertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer) |
void | vertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) |
bool | isVertexAttribEqual (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, VertexAttrib::PointerType pointerType, const GLvoid *pointer, GLuint arrayBufferBinding) const |
void | vertexAttribDivisor (GLuint index, GLuint divisor) |
void | clear () |
bool | findVertexAttribForLocation (GLuint loc, VertexAttrib **result) |
bool | findVertexAttribForLocation (GLuint loc, const VertexAttrib **result) const |
const std::vector< std::pair< GLuint, VertexAttrib > > & | getVertexAttribs () const |
Public Attributes | |
GLuint | mElementArrayBufferBinding |
GLuint | mCachedArrayBufferBinding |
std::vector< std::pair< GLuint, VertexAttrib > > | mVertexAttribs |
Friends | |
class | Vao |
Represent a software-only mirror of the state a VAO records. Can be used directly for efficient swapping (primarily by the gl:: convenience functions)
cinder::gl::Vao::Layout::Layout | ( | ) |
void cinder::gl::Vao::Layout::bindBuffer | ( | GLenum | target, |
GLuint | buffer | ||
) |
The equivalent of glBindBuffer( target, binding )
bool cinder::gl::Vao::Layout::isVertexAttribArrayEnabled | ( | GLuint | index | ) | const |
Returns whether the vertex attribute array at index is enabled or not.
void cinder::gl::Vao::Layout::enableVertexAttribArray | ( | GLuint | index | ) |
The equivalent of glEnableVertexAttribArray( index )
void cinder::gl::Vao::Layout::disableVertexAttribArray | ( | GLuint | index | ) |
The equivalent of glDisableVertexAttribArray( index )
void cinder::gl::Vao::Layout::vertexAttribPointer | ( | GLuint | index, |
GLint | size, | ||
GLenum | type, | ||
GLboolean | normalized, | ||
GLsizei | stride, | ||
const GLvoid * | pointer | ||
) |
Sets the vertex attribute data.
void cinder::gl::Vao::Layout::vertexAttribIPointer | ( | GLuint | index, |
GLint | size, | ||
GLenum | type, | ||
GLsizei | stride, | ||
const GLvoid * | pointer | ||
) |
Sets the integer vertex attribute data.
bool cinder::gl::Vao::Layout::isVertexAttribEqual | ( | GLuint | index, |
GLint | size, | ||
GLenum | type, | ||
GLboolean | normalized, | ||
GLsizei | stride, | ||
VertexAttrib::PointerType | pointerType, | ||
const GLvoid * | pointer, | ||
GLuint | arrayBufferBinding | ||
) | const |
Returns whether the existing attribPointer information at index is equal to the supplied params.
Sets the instancing divisor.
void cinder::gl::Vao::Layout::clear | ( | ) |
Sets to the equivalent of a newly bound VAO (which means it does not overwrite the mCachedArrayBufferBinding value)
bool cinder::gl::Vao::Layout::findVertexAttribForLocation | ( | GLuint | loc, |
VertexAttrib ** | result | ||
) |
Returns true
if found an attribute at loc, and sets result to point to the relevant VertexAttrib in mVertexAttribs.
bool cinder::gl::Vao::Layout::findVertexAttribForLocation | ( | GLuint | loc, |
const VertexAttrib ** | result | ||
) | const |
Returns true
if found an attribute at loc, and sets result to point to the relevant VertexAttrib in mVertexAttribs.
const std::vector<std::pair<GLuint,VertexAttrib> >& cinder::gl::Vao::Layout::getVertexAttribs | ( | ) | const |
|
friend |
GLuint cinder::gl::Vao::Layout::mElementArrayBufferBinding |
GLuint cinder::gl::Vao::Layout::mCachedArrayBufferBinding |
std::vector<std::pair<GLuint,VertexAttrib> > cinder::gl::Vao::Layout::mVertexAttribs |