Transforming sizes by m_matrix is a bad idea...
I also forgot m_matrix in the filled rectangle routine...
This commit is contained in:
parent
39d055f5d6
commit
27af3a586d
1 changed files with 3 additions and 1 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue