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

Allow setting scissor rectangle on RenderView #28

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

jayrulez
Copy link
Contributor

@jayrulez jayrulez commented Nov 2, 2024

Add scissor to dynamic states in vulkan backend.

Set initial scissor in begin pass

Set scissor in WorldRendererShared::setupLightPass to match viewport

@jayrulez jayrulez force-pushed the scissor branch 6 times, most recently from 275a146 to 034e79f Compare November 4, 2024 18:30
code/Render/Context/RenderBlock.h Show resolved Hide resolved
{
}

bool operator==(const Rectangle& other) const
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these operators? Doesn't seem to be necessary and if necessary should be using "= default".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using it in the RmlUi implementation. I'm caching the last set scissor. When RmlUi wants me to set set the scissor, I check the last set scissor against the new one to avoid unnecessary calls to the vulkan backend.
I updated to use the default implementation, but if you would prefer to not have it here, then I can just do a more verbose check in the RmlUi integration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll remove the equality operator, rebase, and squash the fix up commits. I’m not sure if I remember right, but we may lost the review comments after a force push

code/Render/Types.h Show resolved Hide resolved
code/Render/Vulkan/RenderViewVk.cpp Outdated Show resolved Hide resolved
code/Render/Vulkan/RenderViewVk.cpp Outdated Show resolved Hide resolved
code/World/Shared/WorldRendererShared.cpp Outdated Show resolved Hide resolved
@apistol78 apistol78 merged commit bf9caa0 into apistol78:master Nov 20, 2024
2 checks passed
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