10#include <utility/graphic/mesh.hpp>
12#include <utility/logging/loggable.hpp>
13#include <utility/logging/default_logger.hpp>
17#include "DeviceContext.hpp"
30 protected utility::logging::Loggable<RenderObject,
31 utility::logging::DefaultLogger>
55 std::shared_ptr<DeviceContext> deviceContext,
56 const std::map<uint32_t, utility::graphic::Mesh> &
rawObjects,
108 const std::map<uint32_t, utility::graphic::Mesh> &
rawObjects);
121 [[
nodiscard]]
const std::vector<std::shared_ptr<GPUMesh>> &
139 std::vector<std::shared_ptr<GPUMesh>>
A Renderable object. It is a simple interface between our core renderer and on-top built objects (suc...
~RenderObject()
Destructor for the RenderObject.
std::vector< std::shared_ptr< GPUMesh > > _meshes
std::string _pipelineLayer
RenderObject(std::shared_ptr< DeviceContext > deviceContext, const std::map< uint32_t, utility::graphic::Mesh > &rawObjects, const std::string &pipelineLayer)
Constructor: creates a single renderable object using its meshes and its associated material ID.
void destroy(VkDevice device)
Destroys the GPU resources associated with this RenderObject, such as the GPUMesh instances....
void setTransform(const glm::mat4 &transform)
Sets the model transform on every mesh of this object.
bool updateMeshes(const std::map< uint32_t, utility::graphic::Mesh > &rawObjects)
Updates the meshes of this object in place.
std::string getPipelineLayer() const
Retrieves the pipeline layer associated with this RenderObject. The pipeline layer is a string that c...
const std::vector< std::shared_ptr< GPUMesh > > & getMeshes() const
Retrieves the vector of GPUMesh instances associated with this RenderObject. Each GPUMesh represents ...
Small result wrapper used by helpers that must return both a status and a value (e....