Chronos 0.0
A advanced 2D rendering and animation system
|
#include <TexturedRectangle.hpp>
Public Member Functions | |
void | init (Chronos::Engine::Device *device, VkCommandPool commandPool, Chronos::Engine::SwapChain *swapChain, VkSampler textureSampler, Chronos::Engine::Texture texture, VkRenderPass *renderPass) |
void | update (uint32_t currentFrame) override |
Updates the object for the current frame. | |
void | destroy () override |
Destroys the object and releases associated resources. | |
void | render (uint32_t currentFrame, uint32_t imageIndex, float bgColor[3], VkViewport &viewport, VkRect2D &scissor, std::vector< VkCommandBuffer > &commandBuffers) override |
![]() | |
void | init (Chronos::Engine::Device *device, VkCommandPool commandPool, SwapChain *swapChain, VkSampler textureSampler, VkRenderPass *renderPass, ObjectType objectType, unsigned char *vertShaderCode, int vertShaderCodeSize, unsigned char *fragShaderCode, int fragShaderCodeSize) |
Initializes the object. | |
void | recreateGraphicsPipeline () |
Recreates the graphics pipeline for the object. | |
Public Attributes | |
const std::vector< uint16_t > | indices = std::vector<uint16_t> { 0, 1, 2, 2, 3, 0 } |
const std::vector< TexturedVertex > | vertices |
Chronos::Engine::Texture | texture |
Chronos::Manager::ShapeParams | params |
Chronos::Engine::Buffer | vertexBuffer |
The vertex buffer that is used to store the vertices. | |
Chronos::Engine::Buffer | indexBuffer |
The index buffer that is used to store the indices. | |
![]() | |
VkPipeline | graphicsPipeline |
VkPipelineLayout | pipelineLayout |
std::vector< VkDescriptorSet > | descriptorSets |
Chronos::Engine::ObjectType | objectType |
Private Member Functions | |
void | createDescriptorSets () override |
std::vector< VkDescriptorType > | getDescriptorTypes () override |
std::vector< VkShaderStageFlagBits > | getDescriptorStages () override |
PipelineAttributes | getPipelineAttributes () override |
Additional Inherited Members | |
![]() | |
void | createGraphicsPipeline () |
Creates the graphics pipeline for the object. | |
void | createDescriptorPool () |
Creates the Vulkan descriptor pool for the object. | |
void | createDescriptorSetLayout () |
Creates the Vulkan descriptor set layout for the object. | |
![]() | |
Chronos::Engine::Device * | device |
Chronos::Engine::SwapChain * | swapChain |
VkCommandPool | commandPool |
VkSampler | textureSampler |
VkRenderPass * | renderPass |
VkDescriptorSetLayout | descriptorSetLayout |
VkDescriptorPool | descriptorPool |
std::vector< Chronos::Engine::UniformBuffer > | uniformBuffers |
Definition at line 34 of file TexturedRectangle.hpp.
|
overrideprivatevirtual |
Implements Chronos::Engine::Object.
Definition at line 67 of file TexturedRectangle.cpp.
References MAX_FRAMES_IN_FLIGHT.
|
overridevirtual |
Destroys the object and releases associated resources.
This method is responsible for cleaning up the object's resources, including uniform buffers, descriptor pool, descriptor set layout, graphics pipeline, and pipeline layout.
Implements Chronos::Engine::Object.
Definition at line 60 of file TexturedRectangle.cpp.
References Chronos::Engine::Object::destroy().
|
overrideprivatevirtual |
Implements Chronos::Engine::Object.
Definition at line 125 of file TexturedRectangle.cpp.
|
overrideprivatevirtual |
Implements Chronos::Engine::Object.
Definition at line 118 of file TexturedRectangle.cpp.
|
overrideprivatevirtual |
Implements Chronos::Engine::Object.
Definition at line 132 of file TexturedRectangle.cpp.
References Chronos::Engine::PipelineAttributes::attributeDescriptions, Chronos::Engine::PipelineAttributes::bindingDescriptions, Chronos::Engine::PipelineAttributes::colorBlendAttachment, Chronos::Engine::PipelineAttributes::frontFace, Chronos::Engine::TexturedVertex::getAttributeDescriptions(), Chronos::Engine::TexturedVertex::getBindingDescription(), and Chronos::Engine::PipelineAttributes::topology.
void Chronos::Engine::TexturedRectangle::init | ( | Chronos::Engine::Device * | device, |
VkCommandPool | commandPool, | ||
Chronos::Engine::SwapChain * | swapChain, | ||
VkSampler | textureSampler, | ||
Chronos::Engine::Texture | texture, | ||
VkRenderPass * | renderPass | ||
) |
Definition at line 28 of file TexturedRectangle.cpp.
References Chronos::Engine::Object::commandPool, Chronos::Engine::Buffer::copy(), Chronos::Engine::Buffer::create(), Chronos::Engine::Object::device, indexBuffer, indices, Chronos::Engine::Object::init(), Chronos::Engine::Object::renderPass, Chronos::Engine::Buffer::size, Chronos::Engine::Object::swapChain, texture, Chronos::Engine::Object::textureSampler, Chronos::Engine::TypeTexturedRectangle, vertexBuffer, and vertices.
|
overridevirtual |
Implements Chronos::Engine::Object.
Definition at line 171 of file TexturedRectangle.cpp.
|
overridevirtual |
Updates the object for the current frame.
This pure virtual method must be implemented by derived classes to perform any updates required for the object during each frame. The currentFrame
parameter represents the index of the current frame in the application.
currentFrame | Index of the current frame. |
Implements Chronos::Engine::Object.
Definition at line 54 of file TexturedRectangle.cpp.
Chronos::Engine::Buffer Chronos::Engine::TexturedRectangle::indexBuffer |
The index buffer that is used to store the indices.
Definition at line 64 of file TexturedRectangle.hpp.
const std::vector<uint16_t> Chronos::Engine::TexturedRectangle::indices = std::vector<uint16_t> { 0, 1, 2, 2, 3, 0 } |
Definition at line 41 of file TexturedRectangle.hpp.
Chronos::Manager::ShapeParams Chronos::Engine::TexturedRectangle::params |
Definition at line 52 of file TexturedRectangle.hpp.
Chronos::Engine::Texture Chronos::Engine::TexturedRectangle::texture |
Definition at line 51 of file TexturedRectangle.hpp.
Chronos::Engine::Buffer Chronos::Engine::TexturedRectangle::vertexBuffer |
The vertex buffer that is used to store the vertices.
Definition at line 56 of file TexturedRectangle.hpp.
const std::vector<TexturedVertex> Chronos::Engine::TexturedRectangle::vertices |
Definition at line 44 of file TexturedRectangle.hpp.