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 disableClipStyle to BranchState #7109

Merged
merged 29 commits into from
Oct 9, 2024
Merged

Conversation

andremig-bentley
Copy link
Contributor

@andremig-bentley andremig-bentley commented Aug 26, 2024

This PR is to address this issue: /~https://github.com/iTwin/itwin-graphics-backlog/issues/343

An optional disableClipStyle boolean has been added to GraphicBranchOptions, BranchStateOptions, BranchState, and RealityMeshParams. If set true, any clip in the branch will override the view's DisplayStyleSettings.clipStyle, and instead, no ClipStyle.insideColor or ClipStyle.outsideColor will be applied to the clip. This is accomplished within BranchUniforms every time a new branch is pushed to the stack by setting the alpha values of ClipStack.insideColor, ClipStack.outsideColor, and ClipStack.intersectionStyle to 0 if disableClipStyle is true. Otherwise, it is left to the viewport's DisplayStyleSettings.clipStyle to determine these values.

This is being applied to fix the above bug by overriding the clip style in branches created for rendering map tiles in MapTile.ts, and then passing that information along through RealityMeshParams.

@andremig-bentley andremig-bentley marked this pull request as ready for review August 26, 2024 15:34
andremig-bentley and others added 3 commits August 26, 2024 11:01
Co-authored-by: Ben Polinsky <78756012+ben-polinsky@users.noreply.github.com>
@andremig-bentley
Copy link
Contributor Author

Since this PR is not critical, we will wait until @pmconne returns to office next week and has a chance to look at it before merging it in.

Copy link
Member

@pmconne pmconne left a comment

Choose a reason for hiding this comment

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

Missing tests.

@andremig-bentley
Copy link
Contributor Author

Missing tests.

A unit test has been added to BranchUniforms.test.ts which will test whether or not the clip style is successfully disabled when a branch with disableClipStyle set to true is pushed to the stack.

@andremig-bentley andremig-bentley changed the title Add overrideClipStyle Branch Uniform Add disableClipStyle to BranchState Sep 25, 2024
Copy link
Contributor

mergify bot commented Oct 4, 2024

This pull request is now in conflicts. Could you fix it @andremig-bentley? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

@andremig-bentley
Copy link
Contributor Author

Final step before merging is to figure out why rush cover is consistently failing on the RPCInterface - should set cache-control headers when applicable test and solve that issue if necessary.

@andremig-bentley andremig-bentley enabled auto-merge (squash) October 9, 2024 23:25
@andremig-bentley andremig-bentley merged commit b42bedd into master Oct 9, 2024
16 checks passed
@andremig-bentley andremig-bentley deleted the andremig/clipstyle-bug branch October 9, 2024 23:25
@toddsouthenbentley
Copy link
Contributor

@Mergifyio backport release/4.9.x

Copy link
Contributor

mergify bot commented Oct 10, 2024

backport release/4.9.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 10, 2024
Co-authored-by: andremig-bentley <andremig-bentley@users.noreply.github.com>
Co-authored-by: Ben Polinsky <78756012+ben-polinsky@users.noreply.github.com>
Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com>
(cherry picked from commit b42bedd)

# Conflicts:
#	core/frontend/src/render/webgl/Graphic.ts
pmconne pushed a commit that referenced this pull request Oct 14, 2024
…7254)

Co-authored-by: andremig-bentley <101671244+andremig-bentley@users.noreply.github.com>
Co-authored-by: Todd.Southen <toddsouthenbentley@users.noreply.github.com>
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.

5 participants