cubos::core::gl::impl::ConstantBuffer class

Abstract constant buffer.

Public functions

auto map() -> void* pure virtual
Maps the constant buffer to a region in memory. Must be matched with a call to unmap().
void unmap() pure virtual
Unmaps the constant buffer, updating it with data written to the mapped region.
void fill(const void* data, std::size_t size) pure virtual
Fills the buffer with the given data.

Function documentation

void* cubos::core::gl::impl::ConstantBuffer::map() pure virtual

Maps the constant buffer to a region in memory. Must be matched with a call to unmap().

Returns Pointer to the memory region.

void cubos::core::gl::impl::ConstantBuffer::fill(const void* data, std::size_t size) pure virtual

Fills the buffer with the given data.

Parameters
data Pointer to data.
size Data size in bytes.