5 #include <unordered_map> 48 void SetMatrix(
const char* name,
const Matrix44& matrix );
67 void SetInt(
const char* name,
int value );
71 void SetFloat(
const char* name,
float value );
83 static std::unordered_map< std::string, RenderTexture* > sTexRTs;
85 std::unordered_map< std::string, float > floats;
86 std::unordered_map< std::string, int > ints;
87 std::unordered_map< std::string, Vec3 > vec3s;
88 std::unordered_map< std::string, Vec4 > vec4s;
89 std::unordered_map< std::string, Texture2D* > tex2ds;
90 std::unordered_map< std::string, TextureCube* > texCubes;
91 std::unordered_map< std::string, RenderTexture* > texRTs;
92 std::unordered_map< std::string, Matrix44 > mat4s;
94 DepthFunction depthFunction = DepthFunction::LessOrEqualWriteOn;
95 bool cullBackFaces =
true;
Material is used to render a mesh.
Definition: Material.hpp:14
void SetVector(const char *name, const Vec3 &vec3)
class Shader * GetShader()
Definition: Material.hpp:26
Definition: AudioClip.hpp:4
bool IsBackFaceCulled() const
Definition: Material.hpp:35
4-component vector.
Definition: Vec3.hpp:351
void Apply()
Applies the uniforms into the shader. Called internally.
3-component vector.
Definition: Vec3.hpp:12
void SetFloat(const char *name, float value)
void SetTexture(const char *name, class Texture2D *texture)
void SetDepthFunction(DepthFunction aDepthFunction)
Definition: Material.hpp:44
Render texture.
Definition: RenderTexture.hpp:12
DepthFunction GetDepthFunction() const
Definition: Material.hpp:41
void SetInt(const char *name, int value)
void SetBackFaceCulling(bool enable)
Definition: Material.hpp:38
static void SetGlobalRenderTexture(const char *name, class RenderTexture *renderTexture)
Cube Map texture.
Definition: TextureCube.hpp:18
Shader program containing a vertex and pixel shader.
Definition: Shader.hpp:26
void SetMatrix(const char *name, const Matrix44 &matrix)
void SetRenderTexture(const char *name, RenderTexture *renderTexture)
bool IsValidShader() const
2D texture.
Definition: Texture2D.hpp:17
DepthFunction
Depth function used when rendering a mesh using material.
Definition: Material.hpp:18
void SetShader(Shader *shader)