-
Notifications
You must be signed in to change notification settings - Fork 304
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
[Documentation] Not clear how to implement scissor command #87
Comments
Think of it as cutting a square out of a piece of paper. You only render things inside the square, not outside. |
Are the commands nested? Do I need to keep a stack of masks? |
I have not seen "nesting" but also my examples are trivial. I'm evaluating the current scissor if it's active. The raylib provided renderer does not handle a stack based approach and due to how Clay orders the commands i would expect it to be fine. |
In the current implementation, yes it is technically possible that these commands will be nested. It's not too common though, so you can probably delay the implementation of it until you see a specific use case. In future, I will likely build this in as a feature of clay (automatically generate extra scissor start / end commands to "flatten" nested) |
Apparently I cannot do this under opengl directly, which would mean that extra work would have to be done to be able to actually implement the nesting in opengl renderers. |
I have multiple opengl and opengl-like renderers and have gone with simple scissoring. Is there an example layout that produces an incorrect result with doing scissoring this way? |
The
CLAY_RENDER_COMMAND_TYPE_SCISSOR_START
andCLAY_RENDER_COMMAND_TYPE_SCISSOR_END
commands are explained as:But I don't understand how to map that to drawing operations. There should be a document that defines what each command means IMO.
The text was updated successfully, but these errors were encountered: