representation d'un buffer d'indexation. More...
#include <TPBuffer.h>
Public Member Functions | |
GLIndexBuffer (const unsigned int count, const unsigned int length, const void *data, const GLenum usage=GL_STATIC_DRAW) | |
int | clear () |
int | update (const unsigned long int offset, const unsigned long int length, const void *data) |
void * | map (const unsigned long int offset, const unsigned long int length, const GLbitfield access) |
int | unmap () |
int | flush (const unsigned long int offset, const unsigned long int length) |
int | bindAsFeedbackAttribute (const ProgramFeedback &attribute) |
utilise le buffer comme destination du feedback pour le varying 'index' declare dans le shader, cf glTransformFeedbackVaryings(). | |
int | bindAsIndirect () |
utilise le buffer comme tableau de draw calls, cf. opengl4 glDrawElementsIndirect(), glDrawArraysIndirect(). | |
int | bindAsIndex () |
utilise le contenu du buffer comme tableau d'index pour un affichage avec sommets partages. cf. glDrawElements(). | |
int | createGLResource () |
creation de la ressource openGL. | |
int | releaseGLResource () |
destruction de la ressource openGL. | |
GLuint | name () const |
renvoie le nom openGL (l'identifiant) du buffer. | |
unsigned int | count () const |
renvoie le nombre de vecteurs alloues (valeur passee au contructeur, cf GLBuffer()). | |
Static Public Member Functions | |
static void | unbindIndex () |
static void | unbindVertexAttribute (const ProgramAttribute &attribute) |
static void | unbindInstanceAttribute (const ProgramAttribute &attribute) |
static void | unbindFeedbackAttribute (const ProgramFeedback &attribute) |
static void | unbindIndirect () |
Protected Member Functions | |
int | clear (const int state) |
efface le contenu du buffer. | |
int | update (const int state, const unsigned long int offset, const unsigned long int length, const void *data) |
modifie le contenu d'une partie du buffer. | |
void * | map (const int state, const unsigned long int offset, const unsigned int length, const GLbitfield access) |
mappe le contenu du buffer en memoire host | |
int | unmap (const int state) |
int | flush (const int state, const unsigned long int offset, const unsigned int length) |
Protected Attributes | |
GLuint | m_name |
GLenum | m_usage |
unsigned int | m_length |
unsigned int | m_count |
representation d'un buffer d'indexation.
int gk::GLBuffer::update | ( | const int | state, | |
const unsigned long int | offset, | |||
const unsigned long int | length, | |||
const void * | data | |||
) | [inline, protected, inherited] |
modifie le contenu d'une partie du buffer.
offset | position du premier octet a modifier, | |
length | nombre d'octets a modifier. |