Base class holding a certain number of OpenGL buffer id's.
More...
#include </home/werner/origo/vish/ocean/GLvish/BufferID.hpp>
List of all members.
Public Types
- enum type { ARRAY_BUFFER = GL_ARRAY_BUFFER,
ELEMENT_ARRAY_BUFFER = GL_ELEMENT_ARRAY_BUFFER
}
- Possible types of buffer ID's.
Public Member Functions
-
bool bind (type target, unsigned id=0) throw ()
- Non-const version of bind()
-
bool bind_const (type target, unsigned id=0) const throw ()
- const version of bind(), does not create a buffer ID
-
BufferID () throw ()
- The constructor does not yet create openGL buffers yet. It is just a placeholder for deferred construction. Buffers are created by the () access operator. As such, a BufferID object can be created outside of an OpenGL context, but the access operator must be called within a valid one.
-
void clear () throw ()
-
GLuint operator() (unsigned i=0) throw ()
- On first access, OpenGL buffers will be generated. This function must be called from within a valid OpenGL context.
-
GLuint operator() (unsigned i=0) const throw ()
- ~BufferID () throw ()
- Deletion of created OpenGL buffers. Note that this might be problematic here if called outside a valid OpenGL context.
Static Public Member Functions
-
static void unbind (type target) throw ()
Detailed Description
Base class holding a certain number of OpenGL buffer id's.
- Parameters:
-
N | must be a positive integer. |
Constructor & Destructor Documentation
Wizt::BufferID::~BufferID |
( |
| ) |
throw () [inline] |
Deletion of created OpenGL buffers. Note that this might be problematic here if called outside a valid OpenGL context.
- Todo:
- Need to investigate when OpenGL buffers may be deleted. Might need an explicit cleanup function.
The documentation for this class was generated from the following file:
- ocean/GLvish/BufferID.hpp