buffer unique de copie / mise a jour des vertex buffers statiques. singleton. tous les meshs utilisent le meme buffer de copie...
More...
|
GLuint | m_buffer |
|
size_t | m_size |
|
buffer unique de copie / mise a jour des vertex buffers statiques. singleton. tous les meshs utilisent le meme buffer de copie...
Definition at line 524 of file mesh.cpp.
◆ ~UpdateBuffer()
UpdateBuffer::~UpdateBuffer |
( |
| ) |
|
|
inline |
detruit le buffer.
Definition at line 552 of file mesh.cpp.
void release()
detruit le buffer.
◆ UpdateBuffer()
UpdateBuffer::UpdateBuffer |
( |
| ) |
|
|
inlineprotected |
constructeur prive. singleton.
Definition at line 574 of file mesh.cpp.
574 : m_buffer(0), m_size(0) {}
◆ copy()
void UpdateBuffer::copy |
( |
GLenum |
target, |
|
|
const size_t |
offset, |
|
|
const size_t |
length, |
|
|
const void * |
data |
|
) |
| |
|
inline |
transfere les donnees dans un buffer statique.
Definition at line 528 of file mesh.cpp.
531 glGenBuffers(1, &m_buffer);
534 glBindBuffer(GL_COPY_READ_BUFFER, m_buffer);
537 m_size= (
length / (16*1024*1024) + 1) * (16*1024*1024);
541 glBufferData(GL_COPY_READ_BUFFER, m_size,
nullptr, GL_DYNAMIC_DRAW);
542 printf(
"[UpdateBuffer] allocate %dMo staging buffer...\n",
int(m_size / 1024 / 1024));
546 glBufferSubData(GL_COPY_READ_BUFFER, 0,
length, data);
548 glCopyBufferSubData(GL_COPY_READ_BUFFER, target, 0, offset,
length);
void printf(Text &text, const int px, const int py, const char *format,...)
affiche un texte a la position x, y. meme utilisation que printf().
float length(const Vector &v)
renvoie la longueur d'un vecteur.
◆ release()
void UpdateBuffer::release |
( |
| ) |
|
|
inline |
detruit le buffer.
Definition at line 558 of file mesh.cpp.
560 glDeleteBuffers(1, &m_buffer);
◆ manager()
acces au singleton.
Definition at line 566 of file mesh.cpp.
buffer unique de copie / mise a jour des vertex buffers statiques. singleton. tous les meshs utilisen...
The documentation for this class was generated from the following file: