Skip to content
Browse files

Allow querying current scissor without UI layout

Widgets may query the current scissor region to reduce render calls,
e.g. by not rendering children or other elements that are not visible.
During a regular layout and render cycle, the UI framework pushes a
scissor region of the entire screen, so this works fine. When doing
ad-hoc rendering (while we transition to full use of the UI framework),
this is not the case, which caused crashes.
  • Loading branch information...
aidanholm committed Sep 16, 2019
1 parent e6ffb7a commit 3da5d4e088fbd54146bd7e5ed90dbafaddf0d5f0
Showing with 3 additions and 1 deletion.
  1. +3 −1 crawl-ref/source/
@@ -1658,7 +1658,9 @@ void pop_scissor()

i4 get_scissor()
if (scissor_stack.size() > 0)
return {0, 0, INT_MAX, INT_MAX};


0 comments on commit 3da5d4e

Please sign in to comment.
You can’t perform that action at this time.