|
The Vish Visualization Shell 0.3
Vish
|
Base class for OpenGL buffer id's. More...
#include <ocean/GLvish/BufferID.hpp>
Public Types | |
| enum | type |
| Possible types of buffer ID's. More... | |
Public Member Functions | |
| bool | bindBuffer () const |
| const version of bind(), does not create a buffer ID. | |
| bool | bindBufferWithPossibleCreation () |
| Non-const version of bind(). | |
| BufferID (const type bufferType) noexcept | |
| The constructor does not yet create openGL buffers yet. | |
| GLuint | createId () noexcept |
| If no valid ID yet, call glCreateBuffers(). | |
| GLuint | getId () const noexcept |
| Get an Id without attempting to generate it. | |
| bool | isbound () const throw () |
| Verification function: buffer is bound? | |
| bool | isIndexBuffer () const |
| Check whether this is an index buffer. | |
| bool | isVertexArray () const |
| Check whether this is a vertex array. | |
| GLuint | makeId () |
| On first access, OpenGL buffers will be generated. This function must be called from within a valid OpenGL context. | |
| GLuint | operator() () |
| On first access, OpenGL buffers will be generated. This function must be called from within a valid OpenGL context. | |
| ~BufferID () noexcept | |
| Deletion of created OpenGL buffers. Note that this might be problematic here if called outside a valid OpenGL context. | |
Public Attributes | |
| const type | target |
| The target type of this buffer ID. | |
Base class for OpenGL buffer id's.
| enum Wizt::BufferID::type |
Possible types of buffer ID's.
|
inlinenoexcept |
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.
|
noexcept |
Deletion of created OpenGL buffers. Note that this might be problematic here if called outside a valid OpenGL context.
| bool Wizt::BufferID::bindBuffer | ( | ) | const |
const version of bind(), does not create a buffer ID.
Calls glBindBuffer(), but does not create ID.
References Wizt::RequireGLContext().
Referenced by Wizt::TypedBufferArray< Type >::activate(), Wizt::TypedBufferArray< Type >::deactivate(), Wizt::IndexBuffer< Type >::draw(), Wizt::BufferArray::load_subset(), and Wizt::BufferArray::load_untyped().
| bool Wizt::BufferID::bindBufferWithPossibleCreation | ( | ) |
Non-const version of bind().
Calls glBindBuffer(), creating a buffer ID if required.
References bindBufferWithPossibleCreation(), and target.
Referenced by bindBufferWithPossibleCreation().
|
noexcept |
If no valid ID yet, call glCreateBuffers().
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glCreateBuffers.xhtml
References Wizt::RequireGLContext().
Referenced by Wizt::BufferArray::load_untyped().
|
noexcept |
Get an Id without attempting to generate it.
This function is safe to be called from a non-OpenGL context.
Referenced by Wizt::GLMapMemory::setSubData().