Implement mechanism to push & pop rendering attributes

This commit is contained in:
brunoherbelin
2020-04-05 11:44:01 +02:00
parent 370e680e91
commit 1e70d8f4e2
11 changed files with 139 additions and 100 deletions

View File

@@ -203,11 +203,3 @@ void Shader::reset()
}
void Shader::setModelview(float x, float y, float angle, float scale, float aspect_ratio)
{
glm::mat4 View = glm::translate(glm::identity<glm::mat4>(), glm::vec3(x, y, 0.f));
View = glm::rotate(View, angle, glm::vec3(0.0f, 0.0f, 1.0f));
glm::mat4 Model = glm::scale(glm::identity<glm::mat4>(), glm::vec3(scale * aspect_ratio, scale, scale));
modelview = View * Model;
}