Geogram Version 1.8.5
A programming library of geometric algorithms
|
Stores all the buffers used to implement the immediate-mode interface. More...
#include <geogram_gfx/GLUP/GLUP_context.h>
Public Types | |
enum | { NB_IMMEDIATE_BUFFERS = 4 } |
Public Member Functions | |
ImmediateState () | |
ImmediateState constructor. | |
~ImmediateState () | |
ImmediateState destructor. | |
GLuint & | VAO () |
Gets the Vertex Array Object. | |
void | copy_element (index_t to, index_t from) |
Copies an element, i.e. all the attributes attached to a vertex. | |
void | begin (GLUPprimitive primitive) |
Configures the immediate state for rendering primitives of a given type. | |
void | next_vertex () |
Advances to the next vertex. | |
bool | buffers_are_full () |
Tests whether the buffers are full. | |
void | reset () |
Resets the current vertex index to zero. | |
GLUPprimitive | primitive () const |
Gets the primitive currently rendered, i.e. the argument to the latest invocation of begin() | |
index_t | nb_vertices () const |
Gets the number of vertices stored in the buffers. | |
index_t | nb_primitives () const |
Gets the number of primitives stored in the buffers. | |
index_t | max_current_vertex () const |
Gets the maximum number of vertices in the buffer before the buffer is flushed. | |
void | set_current_vertex (index_t v) |
Sets the current vertex. | |
Public Attributes | |
ImmediateBuffer | buffer [NB_IMMEDIATE_BUFFERS] |
Stores all the buffers used to implement the immediate-mode interface.
Definition at line 526 of file GLUP_context.h.
anonymous enum |
Definition at line 668 of file GLUP_context.h.
|
inline |
ImmediateState constructor.
Definition at line 531 of file GLUP_context.h.
|
inline |
ImmediateState destructor.
Definition at line 549 of file GLUP_context.h.
|
inline |
Configures the immediate state for rendering primitives of a given type.
[in] | primitive | type of the primitives to be rendered |
Definition at line 584 of file GLUP_context.h.
|
inline |
Tests whether the buffers are full.
When buffers are fulled, their contents need to be sent to OpenGL before calling reset(). These operations are done by the Context.
Definition at line 612 of file GLUP_context.h.
Copies an element, i.e. all the attributes attached to a vertex.
[in] | to | index of the destination vertex |
[in] | from | index of the source vertex |
Only attributes that are enabled are copied.
Definition at line 572 of file GLUP_context.h.
|
inline |
Gets the maximum number of vertices in the buffer before the buffer is flushed.
This number depends on the number of vertices per primitive.
Definition at line 653 of file GLUP_context.h.
|
inline |
Gets the number of primitives stored in the buffers.
Definition at line 641 of file GLUP_context.h.
|
inline |
Gets the number of vertices stored in the buffers.
Definition at line 634 of file GLUP_context.h.
|
inline |
Advances to the next vertex.
This copies all the current values of all enabled attributes to the current vertex position.
Definition at line 599 of file GLUP_context.h.
|
inline |
Gets the primitive currently rendered, i.e. the argument to the latest invocation of begin()
Definition at line 627 of file GLUP_context.h.
|
inline |
Resets the current vertex index to zero.
Definition at line 619 of file GLUP_context.h.
|
inline |
Sets the current vertex.
This defines the number of stored vertices in this buffer.
[in] | v | the index of the current vertex. |
Definition at line 663 of file GLUP_context.h.
|
inline |
Gets the Vertex Array Object.
Definition at line 561 of file GLUP_context.h.
ImmediateBuffer GLUP::ImmediateState::buffer[NB_IMMEDIATE_BUFFERS] |
Definition at line 669 of file GLUP_context.h.