You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 18, 2026. It is now read-only.
0x3C50 edited this page Mar 15, 2023
·
3 revisions
Scissoring can be used to limit rendering to a specific area of the screen. This is implemented by the ClipStack class.
Defining a new scissor area
To add a new scissor window, use ClipStack.addWindow(matrixStack, new Rectangle(fromX, fromY, toX, toY));. This will automatically transform the provided area with matrixStack, as to not break when transforms are applied.
Removing a scissor area
To remove a previously added scissor window, use ClipStack.popWindow();. If you don't want to watch out for possible window remains, use ClipStack.use(matrixStack, rectangle, runnable); instead, which will automatically make a new window specified with matrixStack and rectangle, run your render code in runnable, and pop the previously added window off the stack again.