Cinder  0.9.1
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cinder::gl::Vao Class Referenceabstract

#include <Vao.h>

Inherits enable_shared_from_this< Vao >.

Inherited by cinder::gl::VaoImplCore, and cinder::gl::VaoImplSoftware.

Classes

struct  Layout
 
struct  VertexAttrib
 

Public Member Functions

virtual ~Vao ()
 
void bind ()
 
void unbind () const
 
virtual void reassignContext (Context *context)=0
 
GLuint getId () const
 
const LayoutgetLayout () const
 
void replacementBindBegin ()
 
void replacementBindEnd ()
 
const std::string & getLabel () const
 
void setLabel (const std::string &label)
 

Static Public Member Functions

static VaoRef create ()
 

Protected Member Functions

 Vao ()
 
void setContext (Context *context)
 
virtual void bindImpl (class Context *context)=0
 
virtual void unbindImpl (class Context *context)=0
 
virtual void enableVertexAttribArrayImpl (GLuint index)=0
 
virtual void disableVertexAttribArrayImpl (GLuint index)=0
 
virtual void vertexAttribPointerImpl (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)=0
 
virtual void vertexAttribIPointerImpl (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)=0
 
virtual void vertexAttribDivisorImpl (GLuint index, GLuint divisor)=0
 
virtual void reflectBindBufferImpl (GLenum target, GLuint buffer)=0
 

Protected Attributes

GLuint mId
 
ContextmCtx
 
Layout mLayout
 
Layout mReplacementBindPrevious
 
std::string mLabel
 
friend Context
 

Friends

std::ostream & operator<< (std::ostream &lhs, const VaoRef &rhs)
 
std::ostream & operator<< (std::ostream &lhs, const Vao &rhs)
 

Constructor & Destructor Documentation

cinder::gl::Vao::~Vao ( )
virtual
cinder::gl::Vao::Vao ( )
protected

Member Function Documentation

VaoRef cinder::gl::Vao::create ( )
static
void cinder::gl::Vao::bind ( )
void cinder::gl::Vao::unbind ( ) const
virtual void cinder::gl::Vao::reassignContext ( Context context)
pure virtual

Changes the GL context the VAO is associated with.

GLuint cinder::gl::Vao::getId ( ) const
const Layout& cinder::gl::Vao::getLayout ( ) const
void cinder::gl::Vao::replacementBindBegin ( )

An efficiency to prevent creating new VAOs. Call this, then operate as if a new VAO has been bound, and then before drawing against the VAO, call replacementBindEnd().

void cinder::gl::Vao::replacementBindEnd ( )

Assumes replacementBindBegin() was called previously and that this is the currently bound VAO.

const std::string& cinder::gl::Vao::getLabel ( ) const

Returns the debugging label associated with the VAO.

void cinder::gl::Vao::setLabel ( const std::string &  label)

Sets the debugging label associated with the VAO. Calls glObjectLabel() when available.

void cinder::gl::Vao::setContext ( Context context)
protected

only necessary when VAO is created without

virtual void cinder::gl::Vao::bindImpl ( class Context context)
protectedpure virtual
virtual void cinder::gl::Vao::unbindImpl ( class Context context)
protectedpure virtual
virtual void cinder::gl::Vao::enableVertexAttribArrayImpl ( GLuint  index)
protectedpure virtual
virtual void cinder::gl::Vao::disableVertexAttribArrayImpl ( GLuint  index)
protectedpure virtual
virtual void cinder::gl::Vao::vertexAttribPointerImpl ( GLuint  index,
GLint  size,
GLenum  type,
GLboolean  normalized,
GLsizei  stride,
const GLvoid *  pointer 
)
protectedpure virtual
virtual void cinder::gl::Vao::vertexAttribIPointerImpl ( GLuint  index,
GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  pointer 
)
protectedpure virtual
virtual void cinder::gl::Vao::vertexAttribDivisorImpl ( GLuint  index,
GLuint  divisor 
)
protectedpure virtual
virtual void cinder::gl::Vao::reflectBindBufferImpl ( GLenum  target,
GLuint  buffer 
)
protectedpure virtual

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  lhs,
const VaoRef rhs 
)
friend
std::ostream& operator<< ( std::ostream &  lhs,
const Vao rhs 
)
friend

Member Data Documentation

GLuint cinder::gl::Vao::mId
protected
Context* cinder::gl::Vao::mCtx
protected
Layout cinder::gl::Vao::mLayout
protected
Layout cinder::gl::Vao::mReplacementBindPrevious
protected
std::string cinder::gl::Vao::mLabel
protected
friend cinder::gl::Vao::Context
protected

The documentation for this class was generated from the following files: