template<class VertexData>
BasicGLLayer class
Layer with OpenGL backend.
Contents
- Reference
Adds OpenGL mesh and buffer management on top of BasicLayer.
Base classes
-
template<class VertexData>class BasicLayer
- Basic layer.
Public functions
- auto buffer() -> GL::Buffer&
- Vertex data buffer.
- auto mesh() -> GL::Mesh&
- Layer mesh.
-
void reset(std::
size_t elementCapacity, std:: size_t dataCapacity, GL:: BufferUsage usage) - Reset the layer.
- void update()
- Update a layer.
- void draw(AbstractUiShader& shader)
- Draw the layer using provided shader.
Function documentation
template<class VertexData>
void Magnum:: Ui:: BasicGLLayer<VertexData>:: reset(std:: size_t elementCapacity,
std:: size_t dataCapacity,
GL:: BufferUsage usage)
Reset the layer.
Allocates CPU and GPU memory to store given elementCapacity
of elements and dataCapacity
of vertices, clearing everything that has been set before. If current memory capacity is larger or equal to elementCapacity/
no reallocation is done.capacity
,
template<class VertexData>
void Magnum:: Ui:: BasicGLLayer<VertexData>:: update()
Update a layer.
Copies all data modified using modifyElement() to GPU memory. Called automatically at the beginning of BasicUserInterface::