cubos::core::gl::impl::VertexBuffer class

Abstract vertex buffer.

Public functions

auto map() -> void* pure virtual
Maps the vertex buffer to a region in memory. Must be matched with a call to unmap().
auto map(std::size_t offset, std::size_t length, bool synchronized = true) -> void* pure virtual
Maps a region of the vertex buffer to a region in memory. Must be matched with a call to unmap().
void unmap() pure virtual
Unmaps the vertex buffer, updating it with data written to the mapped region.

Function documentation

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

Maps the vertex 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::VertexBuffer::map(std::size_t offset, std::size_t length, bool synchronized = true) pure virtual

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

Parameters
offset Offset in bytes.
length Length in bytes.
synchronized Whether pending operations on the buffer should be synchronized prior to returning from this method.
Returns Pointer to the memory region.