SimpleGL
1.1.0
A framework for platform independent rendering
|
This class wraps a Vulkan vertex buffer. More...
#include <vertex_buffer.hpp>
Public Member Functions | |
VertexBuffer (uint32_t size) | |
Creates a new vertex buffer. More... | |
~VertexBuffer (void) | |
Destroys the vertex buffer. More... | |
VkBuffer | getHandle () |
Returns the handle of the vertex buffer. More... | |
void | upload (std::vector< float > data) |
Uploads data to the vertex buffer. More... | |
void | upload (std::vector< glm::vec2 > data) |
Uploads data to the vertex buffer. More... | |
void | upload (std::vector< glm::vec3 > data) |
Uploads data to the vertex buffer. More... | |
void | upload (std::vector< glm::vec4 > data) |
Uploads data to the vertex buffer. More... | |
This class wraps a Vulkan vertex buffer.
Definition at line 26 of file vertex_buffer.hpp.
sgl::VertexBuffer::VertexBuffer | ( | uint32_t | size | ) |
Creates a new vertex buffer.
size | The size of the buffer in bytes. |
Definition at line 21 of file vertex_buffer.cpp.
sgl::VertexBuffer::~VertexBuffer | ( | void | ) |
Destroys the vertex buffer.
Definition at line 71 of file vertex_buffer.cpp.
VkBuffer sgl::VertexBuffer::getHandle | ( | ) |
Returns the handle of the vertex buffer.
Definition at line 79 of file vertex_buffer.cpp.
void sgl::VertexBuffer::upload | ( | std::vector< float > | data | ) |
Uploads data to the vertex buffer.
data | The data to upload. |
Definition at line 83 of file vertex_buffer.cpp.
void sgl::VertexBuffer::upload | ( | std::vector< glm::vec2 > | data | ) |
Uploads data to the vertex buffer.
data | The data to upload. |
Definition at line 93 of file vertex_buffer.cpp.
void sgl::VertexBuffer::upload | ( | std::vector< glm::vec3 > | data | ) |
Uploads data to the vertex buffer.
data | The data to upload. |
Definition at line 103 of file vertex_buffer.cpp.
void sgl::VertexBuffer::upload | ( | std::vector< glm::vec4 > | data | ) |
Uploads data to the vertex buffer.
data | The data to upload. |
Definition at line 113 of file vertex_buffer.cpp.