Skip to content

Commit 0b1b1c7

Browse files
committed
move zoom to view matrix
1 parent 78ab4df commit 0b1b1c7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Source/Renderer/RenderTarget.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,11 @@ void RenderTarget::Begin(bool clear, float zoom) {
6565
rlMatrixMode(RL_PROJECTION);
6666
rlLoadIdentity();
6767
rlOrtho(0.0f, m_Size.w, m_Size.h, 0.0f, c_NearDepth, c_FarDepth);
68+
rlMatrixMode(RL_MODELVIEW);
69+
rlLoadIdentity();
6870
rlTranslatef(m_Size.w / 2, m_Size.h / 2, 0.0f);
6971
rlScalef(zoom, zoom, 1.0f);
7072
rlTranslatef(-m_Size.w / 2, -m_Size.h / 2, 0.0f);
71-
rlMatrixMode(RL_MODELVIEW);
72-
rlMatrixMode(RL_MODELVIEW);
73-
rlLoadIdentity();
7473

7574
if (clear) {
7675
rlClearScreenBuffers();

0 commit comments

Comments
 (0)