adding shaders compilation in makefile

This commit is contained in:
2024-09-22 21:39:20 +02:00
parent ad35eee0b6
commit 99437a6d6a
27 changed files with 415 additions and 241 deletions

View File

@@ -14,15 +14,15 @@ namespace mlx
friend class Render2DPass;
public:
Sprite(NonOwningPtr<Texture> texture);
Sprite(class Renderer& renderer, NonOwningPtr<Texture> texture);
inline void SetColor(Vec4f color) noexcept { m_color = color; }
inline void SetPosition(Vec3f position) noexcept { m_position = position; }
[[nodiscard]] inline const Vec4f& GetColor() const noexcept { return m_color; }
[[nodiscard]] inline const Vec3f& GetPosition() const noexcept { return m_position; }
[[nodiscard]] inline std::shared_ptr<Mesh> GetMesh() const { return p_mesh; }
[[nodiscard]] inline NonOwningPtr<Texture> GetTexture() const { return p_texture; }
[[nodiscard]] MLX_FORCEINLINE const Vec4f& GetColor() const noexcept { return m_color; }
[[nodiscard]] MLX_FORCEINLINE const Vec3f& GetPosition() const noexcept { return m_position; }
[[nodiscard]] MLX_FORCEINLINE std::shared_ptr<Mesh> GetMesh() const { return p_mesh; }
[[nodiscard]] MLX_FORCEINLINE NonOwningPtr<Texture> GetTexture() const { return p_texture; }
~Sprite() = default;