3#include <Common/primitive_type.h>
4#include <Common/assertion.h>
5#include <Math/math_fwd.h>
22 virtual void setInt32(std::string_view name, int32 value) = 0;
23 virtual void setFloat32(std::string_view name, float32 value) = 0;
24 virtual void setVector3F(std::string_view name,
const math::Vector3F& value) = 0;
25 virtual void setVector4F(std::string_view name,
const math::Vector4F& value) = 0;
26 virtual void setMatrix4F(std::string_view name,
const math::Matrix4F& value) = 0;
28 std::string_view
getName()
const;
31 void setUniform(std::string_view name,
const T& value);
45 if constexpr(std::is_same_v<T, int32>)
49 else if constexpr(std::is_same_v<T, float32>)
53 else if constexpr(std::is_same_v<T, math::Vector3F>)
57 else if constexpr(std::is_same_v<T, math::Vector4F>)
61 else if constexpr(std::is_same_v<T, math::Matrix4F>)
67 PH_ASSERT_UNREACHABLE_SECTION();
Definition ShaderProgram.h:15
ShaderProgram(std::string name)
Definition ShaderProgram.cpp:8
virtual void setFloat32(std::string_view name, float32 value)=0
virtual void setVector3F(std::string_view name, const math::Vector3F &value)=0
virtual void setVector4F(std::string_view name, const math::Vector4F &value)=0
void setUniform(std::string_view name, const T &value)
Definition ShaderProgram.h:43
virtual void setMatrix4F(std::string_view name, const math::Matrix4F &value)=0
virtual void setInt32(std::string_view name, int32 value)=0
std::string_view getName() const
Definition ShaderProgram.h:37
Definition PlatformDisplay.h:13