Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- add stencil buffer support for 2d drawing #1660

Merged
merged 2 commits into from
Jul 16, 2022
Merged

Conversation

Gutawer
Copy link
Contributor

@Gutawer Gutawer commented Jul 7, 2022

This adds the ZScript methods Screen.EnableStencil(bool on), Screen.SetStencil(int offs, int op, int flags = -1) and Screen.ClearStencil(), mimicking the internal drawing APIs.

This allows for drawing commands to be clipped by significantly more complicated shapes than just axis-aligned rectangles, which is all the current clipping rectangle system can support. As such, this is sort of a companion PR to #1659, as it can be used along with that to create linearly transformed and clipped 2D elements, for example a rotated menu item (which is what my interest is with this).

@coelckers coelckers merged commit ee0d90a into ZDoom:master Jul 16, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants