utilisation interne. representation d'un buffer openGL. More...
#include <TPBuffer.h>
Public Member Functions | |
| 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(). | |
| virtual | ~GLBuffer () |
| destructeur. | |
| 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 | |
| GLBuffer (const GLBuffer &) | |
| GLBuffer & | operator= (const GLBuffer &) |
| GLBuffer (const int state, const unsigned int count, const unsigned int length, const void *data, const GLenum usage=GL_STATIC_DRAW) | |
| constructeur d'un buffer, un tableau de vecteurs de 'count' elements. | |
| 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 |
utilisation interne. representation d'un buffer openGL.
| gk::GLBuffer::GLBuffer | ( | const int | state, | |
| const unsigned int | count, | |||
| const unsigned int | length, | |||
| const void * | data, | |||
| const GLenum | usage = GL_STATIC_DRAW | |||
| ) | [inline, protected] |
constructeur d'un buffer, un tableau de vecteurs de 'count' elements.
| count | nombre de vecteurs, | |
| length | longueur totale du buffer en OCTETS, | |
| data | pointeur sur les donnees a transferer dans le buffer, ou NULL pour initialiser un buffer vide, | |
| usage | decrit le type d'utilisation du buffer. |
| int gk::GLBuffer::update | ( | const int | state, | |
| const unsigned long int | offset, | |||
| const unsigned long int | length, | |||
| const void * | data | |||
| ) | [inline, protected] |
modifie le contenu d'une partie du buffer.
| offset | position du premier octet a modifier, | |
| length | nombre d'octets a modifier. |
1.6.3