diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /apps/openmb/renderer/DirectionalLight.hpp | |
Diffstat (limited to 'apps/openmb/renderer/DirectionalLight.hpp')
| -rw-r--r-- | apps/openmb/renderer/DirectionalLight.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/openmb/renderer/DirectionalLight.hpp b/apps/openmb/renderer/DirectionalLight.hpp new file mode 100644 index 0000000..31e914e --- /dev/null +++ b/apps/openmb/renderer/DirectionalLight.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "Shader.hpp" +#include <glm/glm.hpp> + +namespace renderer { + +class DirectionalLight { + public: + DirectionalLight(); + + void setDirection( const glm::vec3& dir ); + void setColor( const glm::vec3& c ); + void setIntensity( float i ); + + const glm::vec3& getDirection() const; + const glm::vec3& getColor() const; + float getIntensity() const; + + void applyToShader( const Shader& shader, const std::string& uniformName = "dirLight" ) const; + + private: + glm::vec3 mDirection; + glm::vec3 mColor; + float mIntensity; +}; + +} // namespace renderer |