Transforming sizes by m_matrix is a bad idea...

I also forgot m_matrix in the filled rectangle routine...
This commit is contained in:
Thomas Muller 2021-08-01 21:52:19 -04:00
parent 39d055f5d6
commit 27af3a586d
Signed by: thomas
GPG key ID: AF006EB730564952

View file

@ -14,6 +14,7 @@ void Render::rectangle(Vector2<int> start, Vector2<int> end, Color color) {
void Render::rectangle_sz(Vector2<int> start, Vector2<int> size, Color color) {
auto screen_start = m_matrix * m_view_matrix * Vector3<float>(start, 1);
// auto screen_size = m_matrix * Vector3<float>(size, 1);
m_pge->DrawRect(
screen_start.x(),
screen_start.y(),
@ -36,7 +37,8 @@ void Render::fill_rectangle(Vector2<int> start, Vector2<int> end, Color color) {
}
void Render::fill_rectangle_sz(Vector2<int> start, Vector2<int> size, Color color) {
auto screen_start = m_view_matrix * Vector3<float>(start, 1);
auto screen_start = m_matrix * m_view_matrix * Vector3<float>(start, 1);
// auto screen_size = m_matrix * Vector3<float>(size, 1);
m_pge->FillRect(
screen_start.x(),
screen_start.y(),