diff --git a/src/util/render.cpp b/src/util/render.cpp index dce478a..e3d2991 100644 --- a/src/util/render.cpp +++ b/src/util/render.cpp @@ -100,10 +100,10 @@ void Render::pop_matrix() { void Render::translate(Vector2 trans) { switch(m_matrix_mode) { case MODEL: - m_matrix *= translation_matrix(trans); + m_matrix = translation_matrix(trans) * m_matrix; break; case PROJECTION: - m_view_matrix *= translation_matrix(trans); + m_view_matrix = translation_matrix(trans) * m_view_matrix; break; } } @@ -111,10 +111,10 @@ void Render::translate(Vector2 trans) { void Render::rotate(float theta) { switch(m_matrix_mode) { case MODEL: - m_matrix *= rotation_matrix(theta); + m_matrix = rotation_matrix(theta) * m_matrix; break; case PROJECTION: - m_view_matrix *= rotation_matrix(theta); + m_view_matrix = rotation_matrix(theta) * m_view_matrix; break; } } @@ -122,10 +122,10 @@ void Render::rotate(float theta) { void Render::scale(Vector2 scale) { switch(m_matrix_mode) { case MODEL: - m_matrix *= scale_matrix(scale); + m_matrix = scale_matrix(scale) * m_matrix; break; case PROJECTION: - m_view_matrix *= scale_matrix(scale); + m_view_matrix = scale_matrix(scale) * m_view_matrix; } }