mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
big refactoring ! ci skip
This commit is contained in:
32
runtime/Includes/Graphics/Scene.h
git.filemode.normal_file
32
runtime/Includes/Graphics/Scene.h
git.filemode.normal_file
@@ -0,0 +1,32 @@
|
||||
#ifndef __MLX_SCENE__
|
||||
#define __MLX_SCENE__
|
||||
|
||||
#include <Graphics/Sprite.h>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
struct SceneDescriptor
|
||||
{
|
||||
NonOwningPtr<Renderer> renderer;
|
||||
// More description may come in future
|
||||
};
|
||||
|
||||
class Scene
|
||||
{
|
||||
public:
|
||||
Scene(SceneDescriptor desc);
|
||||
|
||||
Sprite& CreateSprite(std::shared_ptr<class Texture> texture) noexcept;
|
||||
|
||||
[[nodiscard]] inline const std::vector<std::shared_ptr<Sprite>>& GetSprites() const noexcept { return m_sprites; }
|
||||
[[nodiscard]] inline const SceneDescriptor& GetDescription() const noexcept { return m_descriptor; }
|
||||
|
||||
~Scene() = default;
|
||||
|
||||
private:
|
||||
SceneDescriptor m_descriptor;
|
||||
std::vector<std::shared_ptr<Sprite>> m_sprites;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user