Class Buffer
Defined in File Buffer.h
Nested Relationships
Nested Types
Class Documentation
-
class Buffer
A wrapper for an OpenGL buffer object (eg Vertex Buffer Object or VBO) Refer to docs for glGenBuffers() and glBufferData().
See also
Note
OpenGL Buffer Objects can be shared among threads.
Public Types
Public Functions
-
inline Buffer()
-
~Buffer() = default
-
inline void createOnce()
Calls create() only if the buffer has not been created yet.
-
inline bool initialized() const
-
inline void destroy()
Automatically called upon destructor, no need for the user to call it in normal situations.
-
inline void bind()
-
inline void unbind()
-
inline unsigned int bufferId() const
-
inline void allocate(const void *data, int byteCount)
Reserves byteCount bytes in the buffer and copy to it the provided data. create() and bind() must be called before using this method.
-
inline Buffer()