Browse Source

Fix wrong height used when using scissor mode with render texture of different height from window (#1272)

Chang Si Yuan 5 năm trước cách đây
mục cha
commit
6264c4901b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/core.c

+ 1 - 1
src/core.c

@@ -1536,7 +1536,7 @@ void BeginScissorMode(int x, int y, int width, int height)
     rlglDraw(); // Force drawing elements
 
     rlEnableScissorTest();
-    rlScissor(x, GetScreenHeight() - (y + height), width, height);
+    rlScissor(x, CORE.Window.currentFbo.height - (y + height), width, height);
 }
 
 // End scissor mode