39 Image(
const std::string &name =
"Image");
51 inline void set_texture(std::shared_ptr<renderer::Texture> texture) { m_texture = texture; }
58 inline std::shared_ptr<renderer::Texture>
get_texture()
const {
return m_texture; }
65 inline void set_tint(
const glm::vec4 &color) { m_tint = color; }
72 inline const glm::vec4 &
get_tint()
const {
return m_tint; }
81 void render(
float canvas_width,
float canvas_height,
const glm::mat4 &projection)
override;
85 std::shared_ptr<renderer::Texture> m_texture;
88 glm::vec4 m_tint{1.0f, 1.0f, 1.0f, 1.0f};
91 static std::shared_ptr<renderer::Shader> s_shader;
94 static std::shared_ptr<renderer::VertexArray> s_vao;
97 static void initialize_resources();
100 static bool s_initialized;
Texture class for managing OpenGL textures.