1 #ifndef BLOBS_GRAPHICS_CREATURESKIN_HPP_
2 #define BLOBS_GRAPHICS_CREATURESKIN_HPP_
15 static constexpr int MAX_LIGHTS = 8;
21 CreatureSkin(const CreatureSkin &) = delete;
22 CreatureSkin &operator =(const CreatureSkin &) = delete;
24 CreatureSkin(CreatureSkin &&) = delete;
25 CreatureSkin &operator =(CreatureSkin &&) = delete;
28 void Activate() noexcept;
30 void SetM(const glm::mat4 &m) noexcept;
31 void SetV(const glm::mat4 &v) noexcept;
32 void SetVP(const glm::mat4 &v, const glm::mat4 &p) noexcept;
33 void SetMVP(const glm::mat4 &m, const glm::mat4 &v, const glm::mat4 &p) noexcept;
34 void SetBaseColor(const glm::vec3 &) noexcept;
35 void SetHighlightColor(const glm::vec4 &) noexcept;
36 void SetTexture(ArrayTexture &) noexcept;
37 void SetAmbient(const glm::vec3 &) noexcept;
38 void SetLight(int n, const glm::vec3 &pos, const glm::vec3 &color, float strength) noexcept;
39 void SetNumLights(int n) noexcept;
41 const glm::mat4 &M() const noexcept { return m; }
42 const glm::mat4 &V() const noexcept { return v; }
43 const glm::mat4 &P() const noexcept { return p; }
44 const glm::mat4 &MV() const noexcept { return mv; }
45 const glm::mat4 &MVP() const noexcept { return mvp; }
62 GLuint base_color_handle;
63 GLuint highlight_color_handle;
64 GLuint sampler_handle;
65 GLuint ambient_handle;
66 GLuint num_lights_handle;
67 GLuint light_handle[MAX_LIGHTS * 3];