Chronos 0.0
A advanced 2D rendering and animation system
|
This is a buffer for storing and updating the color of the shape. More...
#include <buffers.hpp>
Public Member Functions | |
void | create (Chronos::Engine::Device device) |
Creates the buffer and maps the memory. | |
void | update (glm::vec3 color) |
Updates the buffer with the new color. | |
![]() | |
void | create (Chronos::Engine::Device device, VkBufferUsageFlags flags, VkMemoryPropertyFlags properties) |
This is used to initialize the buffer. | |
void | copy (void *data, VkCommandPool commandPool) |
Copies the data to the buffer. | |
void | destroy () |
Destroys the buffer and frees the memory. | |
Private Attributes | |
void * | data |
Additional Inherited Members | |
![]() | |
VkBuffer | buffer |
The buffer. | |
VkDeviceSize | size |
The size of the buffer. | |
VkDeviceMemory | memory |
The device memory of the buffer. | |
This is a buffer for storing and updating the color of the shape.
It is used to store the color of the shape and update it on the fly.
Definition at line 149 of file buffers.hpp.
void Chronos::Engine::ColorBuffer::create | ( | Chronos::Engine::Device | device | ) |
Creates the buffer and maps the memory.
It uses the inherited function create to create the buffer
device | The device on which the buffer should be stored. |
Definition at line 105 of file buffers.cpp.
References Chronos::Engine::Buffer::create(), Chronos::Engine::Device::device, and LOG.
void Chronos::Engine::ColorBuffer::update | ( | glm::vec3 | color | ) |
Updates the buffer with the new color.
color | The new color of the shape. |
Definition at line 118 of file buffers.cpp.
References Chronos::Engine::UniformColorBufferObject::color, and LOG.
|
private |
Definition at line 169 of file buffers.hpp.