reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

#include <ofVbo.h>

Public Member Functions

 ofVbo ()
 
 ofVbo (const ofVbo &mom)
 
ofVbooperator= (const ofVbo &mom)
 
 ~ofVbo ()
 
void setMesh (const ofMesh &mesh, int usage)
 
void setMesh (const ofMesh &mesh, int usage, bool useColors, bool useTextures, bool useNormals)
 
void setVertexData (const glm::vec3 *verts, int total, int usage)
 
void setVertexData (const glm::vec2 *verts, int total, int usage)
 
void setVertexData (const ofVec3f *verts, int total, int usage)
 
void setVertexData (const ofVec2f *verts, int total, int usage)
 
void setColorData (const ofFloatColor *colors, int total, int usage)
 
void setNormalData (const glm::vec3 *normals, int total, int usage)
 
void setNormalData (const ofVec3f *normals, int total, int usage)
 
void setTexCoordData (const glm::vec2 *texCoords, int total, int usage)
 
void setTexCoordData (const ofVec2f *texCoords, int total, int usage)
 
void setIndexData (const ofIndexType *indices, int total, int usage)
 
void setVertexData (const float *vert0x, int numCoords, int total, int usage, int stride=0)
 
void setColorData (const float *color0r, int total, int usage, int stride=0)
 
void setNormalData (const float *normal0x, int total, int usage, int stride=0)
 
void setTexCoordData (const float *texCoord0x, int total, int usage, int stride=0)
 
void setAttributeData (int location, const float *vert0x, int numCoords, int total, int usage, int stride=0)
 
void setAttributeDivisor (int location, int divisor)
 
void setVertexBuffer (ofBufferObject &buffer, int numCoords, int stride, int offset=0)
 
void setColorBuffer (ofBufferObject &buffer, int stride, int offset=0)
 
void setNormalBuffer (ofBufferObject &buffer, int stride, int offset=0)
 
void setTexCoordBuffer (ofBufferObject &buffer, int stride, int offset=0)
 
void setIndexBuffer (ofBufferObject &buffer)
 
void setAttributeBuffer (int location, ofBufferObject &buffer, int numCoords, int stride, int offset=0)
 
ofBufferObjectgetVertexBuffer ()
 
ofBufferObjectgetColorBuffer ()
 
ofBufferObjectgetNormalBuffer ()
 
ofBufferObjectgetTexCoordBuffer ()
 
ofBufferObjectgetIndexBuffer ()
 
ofBufferObjectgetAttributeBuffer (int location)
 
const ofBufferObjectgetVertexBuffer () const
 
const ofBufferObjectgetColorBuffer () const
 
const ofBufferObjectgetNormalBuffer () const
 
const ofBufferObjectgetTexCoordBuffer () const
 
const ofBufferObjectgetIndexBuffer () const
 
const ofBufferObjectgetAttributeBuffer (int location) const
 
void updateMesh (const ofMesh &mesh)
 
void updateVertexData (const glm::vec3 *verts, int total)
 
void updateVertexData (const glm::vec2 *verts, int total)
 
void updateVertexData (const ofVec3f *verts, int total)
 
void updateVertexData (const ofVec2f *verts, int total)
 
void updateColorData (const ofFloatColor *colors, int total)
 
void updateNormalData (const glm::vec3 *normals, int total)
 
void updateNormalData (const ofVec3f *normals, int total)
 
void updateTexCoordData (const glm::vec2 *texCoords, int total)
 
void updateTexCoordData (const ofVec2f *texCoords, int total)
 
void updateIndexData (const ofIndexType *indices, int total)
 
void updateVertexData (const float *ver0x, int total)
 
void updateColorData (const float *color0r, int total)
 
void updateNormalData (const float *normal0x, int total)
 
void updateTexCoordData (const float *texCoord0x, int total)
 
void updateAttributeData (int location, const float *vert0x, int total)
 
void enableColors ()
 
void enableNormals ()
 
void enableTexCoords ()
 
void enableIndices ()
 
void disableColors ()
 
void disableNormals ()
 
void disableTexCoords ()
 
void disableIndices ()
 
GLuint getVaoId () const
 
GLuint getVertId () const
 
GLuint getColorId () const
 
GLuint getNormalId () const
 
GLuint getTexCoordId () const
 
GLuint getIndexId () const
 
GLuint getAttributeId (int AttrPos_) const
 returns OpenGL memory object id for GL buffer holding attribute data
 
bool getIsAllocated () const
 
bool getUsingVerts () const
 
bool getUsingColors () const
 
bool getUsingNormals () const
 
bool getUsingTexCoords () const
 
bool getUsingIndices () const
 
void draw (int drawMode, int first, int total) const
 
void drawElements (int drawMode, int amt, int offsetelements=0) const
 
void drawInstanced (int drawMode, int first, int total, int primCount) const
 
void drawElementsInstanced (int drawMode, int amt, int primCount) const
 
void bind () const
 
void unbind () const
 
void clear ()
 
void clearVertices ()
 
void clearNormals ()
 
void clearColors ()
 
void clearTexCoords ()
 
void clearIndices ()
 
void clearAttribute (int attributePos_)
 
int getNumVertices () const
 
int getNumIndices () const
 
bool hasAttribute (int attributePos_) const
 

Constructor & Destructor Documentation

◆ ofVbo() [1/2]

ofVbo::ofVbo ( )

◆ ofVbo() [2/2]

ofVbo::ofVbo ( const ofVbo mom)

◆ ~ofVbo()

ofVbo::~ofVbo ( )

Member Function Documentation

◆ bind()

void ofVbo::bind ( ) const

◆ clear()

void ofVbo::clear ( )

◆ clearAttribute()

void ofVbo::clearAttribute ( int  attributePos_)

◆ clearColors()

void ofVbo::clearColors ( )

◆ clearIndices()

void ofVbo::clearIndices ( )

◆ clearNormals()

void ofVbo::clearNormals ( )

◆ clearTexCoords()

void ofVbo::clearTexCoords ( )

◆ clearVertices()

void ofVbo::clearVertices ( )

◆ disableColors()

void ofVbo::disableColors ( )

◆ disableIndices()

void ofVbo::disableIndices ( )

◆ disableNormals()

void ofVbo::disableNormals ( )

◆ disableTexCoords()

void ofVbo::disableTexCoords ( )

◆ draw()

void ofVbo::draw ( int  drawMode,
int  first,
int  total 
) const

◆ drawElements()

void ofVbo::drawElements ( int  drawMode,
int  amt,
int  offsetelements = 0 
) const

◆ drawElementsInstanced()

void ofVbo::drawElementsInstanced ( int  drawMode,
int  amt,
int  primCount 
) const

◆ drawInstanced()

void ofVbo::drawInstanced ( int  drawMode,
int  first,
int  total,
int  primCount 
) const

◆ enableColors()

void ofVbo::enableColors ( )

◆ enableIndices()

void ofVbo::enableIndices ( )

◆ enableNormals()

void ofVbo::enableNormals ( )

◆ enableTexCoords()

void ofVbo::enableTexCoords ( )

◆ getAttributeBuffer() [1/2]

ofBufferObject & ofVbo::getAttributeBuffer ( int  location)

◆ getAttributeBuffer() [2/2]

const ofBufferObject & ofVbo::getAttributeBuffer ( int  location) const

◆ getAttributeId()

GLuint ofVbo::getAttributeId ( int  AttrPos_) const

returns OpenGL memory object id for GL buffer holding attribute data

◆ getColorBuffer() [1/2]

ofBufferObject & ofVbo::getColorBuffer ( )

◆ getColorBuffer() [2/2]

const ofBufferObject & ofVbo::getColorBuffer ( ) const

◆ getColorId()

GLuint ofVbo::getColorId ( ) const

◆ getIndexBuffer() [1/2]

ofBufferObject & ofVbo::getIndexBuffer ( )

◆ getIndexBuffer() [2/2]

const ofBufferObject & ofVbo::getIndexBuffer ( ) const

◆ getIndexId()

GLuint ofVbo::getIndexId ( ) const

◆ getIsAllocated()

bool ofVbo::getIsAllocated ( ) const

◆ getNormalBuffer() [1/2]

ofBufferObject & ofVbo::getNormalBuffer ( )

◆ getNormalBuffer() [2/2]

const ofBufferObject & ofVbo::getNormalBuffer ( ) const

◆ getNormalId()

GLuint ofVbo::getNormalId ( ) const

◆ getNumIndices()

int ofVbo::getNumIndices ( ) const

◆ getNumVertices()

int ofVbo::getNumVertices ( ) const

◆ getTexCoordBuffer() [1/2]

ofBufferObject & ofVbo::getTexCoordBuffer ( )

◆ getTexCoordBuffer() [2/2]

const ofBufferObject & ofVbo::getTexCoordBuffer ( ) const

◆ getTexCoordId()

GLuint ofVbo::getTexCoordId ( ) const

◆ getUsingColors()

bool ofVbo::getUsingColors ( ) const

◆ getUsingIndices()

bool ofVbo::getUsingIndices ( ) const

◆ getUsingNormals()

bool ofVbo::getUsingNormals ( ) const

◆ getUsingTexCoords()

bool ofVbo::getUsingTexCoords ( ) const

◆ getUsingVerts()

bool ofVbo::getUsingVerts ( ) const

◆ getVaoId()

GLuint ofVbo::getVaoId ( ) const

◆ getVertexBuffer() [1/2]

ofBufferObject & ofVbo::getVertexBuffer ( )

◆ getVertexBuffer() [2/2]

const ofBufferObject & ofVbo::getVertexBuffer ( ) const

◆ getVertId()

GLuint ofVbo::getVertId ( ) const

◆ hasAttribute()

bool ofVbo::hasAttribute ( int  attributePos_) const

◆ operator=()

ofVbo & ofVbo::operator= ( const ofVbo mom)

◆ setAttributeBuffer()

void ofVbo::setAttributeBuffer ( int  location,
ofBufferObject buffer,
int  numCoords,
int  stride,
int  offset = 0 
)

◆ setAttributeData()

void ofVbo::setAttributeData ( int  location,
const float *  vert0x,
int  numCoords,
int  total,
int  usage,
int  stride = 0 
)

◆ setAttributeDivisor()

void ofVbo::setAttributeDivisor ( int  location,
int  divisor 
)

used to send an attribute per instance(s) instead of per vertex. will send per vertex if set to 0 or to the number of instances if >0

see textureBufferInstancedExample and https://www.opengl.org/sdk/docs/man4/html/glVertexAttribDivisor.xhtml

◆ setColorBuffer()

void ofVbo::setColorBuffer ( ofBufferObject buffer,
int  stride,
int  offset = 0 
)

◆ setColorData() [1/2]

void ofVbo::setColorData ( const float *  color0r,
int  total,
int  usage,
int  stride = 0 
)

◆ setColorData() [2/2]

void ofVbo::setColorData ( const ofFloatColor colors,
int  total,
int  usage 
)

◆ setIndexBuffer()

void ofVbo::setIndexBuffer ( ofBufferObject buffer)

◆ setIndexData()

void ofVbo::setIndexData ( const ofIndexType indices,
int  total,
int  usage 
)

◆ setMesh() [1/2]

void ofVbo::setMesh ( const ofMesh mesh,
int  usage 
)

◆ setMesh() [2/2]

void ofVbo::setMesh ( const ofMesh mesh,
int  usage,
bool  useColors,
bool  useTextures,
bool  useNormals 
)

◆ setNormalBuffer()

void ofVbo::setNormalBuffer ( ofBufferObject buffer,
int  stride,
int  offset = 0 
)

◆ setNormalData() [1/3]

void ofVbo::setNormalData ( const float *  normal0x,
int  total,
int  usage,
int  stride = 0 
)

◆ setNormalData() [2/3]

void ofVbo::setNormalData ( const glm::vec3 *  normals,
int  total,
int  usage 
)

◆ setNormalData() [3/3]

void ofVbo::setNormalData ( const ofVec3f normals,
int  total,
int  usage 
)

◆ setTexCoordBuffer()

void ofVbo::setTexCoordBuffer ( ofBufferObject buffer,
int  stride,
int  offset = 0 
)

◆ setTexCoordData() [1/3]

void ofVbo::setTexCoordData ( const float *  texCoord0x,
int  total,
int  usage,
int  stride = 0 
)

◆ setTexCoordData() [2/3]

void ofVbo::setTexCoordData ( const glm::vec2 *  texCoords,
int  total,
int  usage 
)

◆ setTexCoordData() [3/3]

void ofVbo::setTexCoordData ( const ofVec2f texCoords,
int  total,
int  usage 
)

◆ setVertexBuffer()

void ofVbo::setVertexBuffer ( ofBufferObject buffer,
int  numCoords,
int  stride,
int  offset = 0 
)

◆ setVertexData() [1/5]

void ofVbo::setVertexData ( const float *  vert0x,
int  numCoords,
int  total,
int  usage,
int  stride = 0 
)

◆ setVertexData() [2/5]

void ofVbo::setVertexData ( const glm::vec2 *  verts,
int  total,
int  usage 
)

◆ setVertexData() [3/5]

void ofVbo::setVertexData ( const glm::vec3 *  verts,
int  total,
int  usage 
)

◆ setVertexData() [4/5]

void ofVbo::setVertexData ( const ofVec2f verts,
int  total,
int  usage 
)

◆ setVertexData() [5/5]

void ofVbo::setVertexData ( const ofVec3f verts,
int  total,
int  usage 
)

◆ unbind()

void ofVbo::unbind ( ) const

◆ updateAttributeData()

void ofVbo::updateAttributeData ( int  location,
const float *  vert0x,
int  total 
)

◆ updateColorData() [1/2]

void ofVbo::updateColorData ( const float *  color0r,
int  total 
)

◆ updateColorData() [2/2]

void ofVbo::updateColorData ( const ofFloatColor colors,
int  total 
)

◆ updateIndexData()

void ofVbo::updateIndexData ( const ofIndexType indices,
int  total 
)

◆ updateMesh()

void ofVbo::updateMesh ( const ofMesh mesh)

◆ updateNormalData() [1/3]

void ofVbo::updateNormalData ( const float *  normal0x,
int  total 
)

◆ updateNormalData() [2/3]

void ofVbo::updateNormalData ( const glm::vec3 *  normals,
int  total 
)

◆ updateNormalData() [3/3]

void ofVbo::updateNormalData ( const ofVec3f normals,
int  total 
)

◆ updateTexCoordData() [1/3]

void ofVbo::updateTexCoordData ( const float *  texCoord0x,
int  total 
)

◆ updateTexCoordData() [2/3]

void ofVbo::updateTexCoordData ( const glm::vec2 *  texCoords,
int  total 
)

◆ updateTexCoordData() [3/3]

void ofVbo::updateTexCoordData ( const ofVec2f texCoords,
int  total 
)

◆ updateVertexData() [1/5]

void ofVbo::updateVertexData ( const float *  ver0x,
int  total 
)

◆ updateVertexData() [2/5]

void ofVbo::updateVertexData ( const glm::vec2 *  verts,
int  total 
)

◆ updateVertexData() [3/5]

void ofVbo::updateVertexData ( const glm::vec3 *  verts,
int  total 
)

◆ updateVertexData() [4/5]

void ofVbo::updateVertexData ( const ofVec2f verts,
int  total 
)

◆ updateVertexData() [5/5]

void ofVbo::updateVertexData ( const ofVec3f verts,
int  total 
)

The documentation for this class was generated from the following files:
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/gl/ofVbo.h
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/gl/ofVbo.cpp