Minor - Rework skysphere from Object to Entity - V14.2.0
Introduces a skysphere entity to the scene. Creates the skysphere during application initialization and manages its visibility via Z-buffer enabling/disabling in the render system. The skysphere is now an ECS entity. The culling thread skips the skybox entity to avoid unnecessary calculations since it's always visible. The position of the skybox is updated with the active camera.
This commit is contained in:
@@ -178,6 +178,9 @@ public:
|
||||
ID3D11Device* GetDevice() const { return device; }
|
||||
ID3D11DeviceContext* GetContext() const { return context; }
|
||||
|
||||
int GetSkyID() const { return sky_id_; }
|
||||
void SetSkyID(int id) { sky_id_ = id; }
|
||||
|
||||
private:
|
||||
EntityID m_NextEntityID;
|
||||
std::unordered_map<EntityID, std::shared_ptr<Entity>> m_Entities;
|
||||
@@ -186,6 +189,7 @@ private:
|
||||
FMOD::System* sound_system_ = nullptr;
|
||||
ID3D11Device* device;
|
||||
ID3D11DeviceContext* context;
|
||||
int sky_id_ = -1;
|
||||
};
|
||||
|
||||
} // namespace ecs
|
||||
|
||||
Reference in New Issue
Block a user