30 void addObject(
const std::unique_ptr<Object> &
object) {
m_objects.insert({
object->getId(), std::move(*
object)}); }
31 void addLight(
const std::unique_ptr<Light> &light) {
m_lights.insert({light->getId(), std::move(*light)}); }
35 void destroyEntity(std::vector<unsigned int> *objectsIds, std::vector<unsigned int> *lightsIds);
39 [[nodiscard]] VkDescriptorBufferInfo
getBufferInfoForObject(
const int frameIndex,
const unsigned int objectId)
const {
return m_uboBuffers.at(
static_cast<long unsigned int>(frameIndex))->descriptorInfoForIndex(objectId); }
This file contains the FrameInfo class.
This file contains the Shader class.
std::unordered_map< unsigned int, Light > Map
std::unordered_map< unsigned int, Object > Map
Class for object manager.
unsigned int m_currentObjId
SceneManager(const SceneManager &)=delete
void updateBuffer(GlobalUbo &ubo, unsigned long frameIndex, float frameTime)
std::vector< std::unique_ptr< Buffer > > m_uboBuffers
void setDestroyState(const bool state)
std::shared_ptr< Texture > m_textureDefault
SceneManager & operator=(SceneManager &&)=delete
void addLight(const std::unique_ptr< Light > &light)
SceneManager & operator=(const SceneManager &)=delete
void destroyEntity(std::vector< unsigned int > *objectsIds, std::vector< unsigned int > *lightsIds)
void destroyLight(const unsigned int lightId)
unsigned int m_currentLightId
std::vector< std::unique_ptr< Buffer > > & getUboBuffers()
VkDescriptorBufferInfo getBufferInfoForObject(const int frameIndex, const unsigned int objectId) const
void destroyObject(const unsigned int objectId)
SceneManager(SceneManager &&)=delete
std::shared_ptr< Texture > getTextureDefault()
SceneManager(Device &device)
Object::Map & getObjects()
void addObject(const std::unique_ptr< Object > &object)
bool getDestroyState() const
static constexpr int MAX_FRAMES_IN_FLIGHT