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

Gui: Fix render order of datum planes #18878

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

kadet1090
Copy link
Member

@kadet1090 kadet1090 commented Jan 5, 2025

This PR Fixes rendering order of datum planes. It achieves it by modifying So3DAnnotation to include separate delayed render queue that is rendered after the scene with cleared depth buffer. Depth buffer was previously cleared for every So3DAnnotation instance independently. Basically it introduces ability to draw annotations on separate layer.

This PR does NOT fix picking order - as far as I know it is not possible to do without modifying coin itself as it would require to introduce not only rendering, but also picking layers (or priorities) into SoRayPickAction.

Someone more knowledgeable in the area (@wwmayer) may know some way - if we would be able to extract all shapes intersected with ray and their priorities we could in theory implement it on our side.

The way that it is implemented is poor, and I am fully aware of it - but without modifying coin code it is hard to implement stuff like that.

Before After
image image

@PaddleStroke FYI

@github-actions github-actions bot added the Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Jan 5, 2025
@kadet1090 kadet1090 force-pushed the fix-render-order-of-datum-planes branch 4 times, most recently from 9a42fdf to 53bb64e Compare January 6, 2025 00:14
@kadet1090 kadet1090 force-pushed the fix-render-order-of-datum-planes branch from 53bb64e to 74179e0 Compare January 6, 2025 00:14
@maxwxyz
Copy link
Collaborator

maxwxyz commented Jan 9, 2025

@kadet1090 so just to be sure, it changes the appearance order but when clicking on overlapping areas, you select the object which was previously rendered on top and is now on the back (so selecting the not the one as you would think)?

@kadet1090
Copy link
Member Author

Kinda, it works really strange with and without this modification so it is not a regression

@maxwxyz
Copy link
Collaborator

maxwxyz commented Jan 9, 2025

Is the preselection style different enough to show what plane will be selected or is currently focused?

@kadet1090
Copy link
Member Author

Yes. I'll probably update the style of planes to expand on hover in later PR.

@chennes chennes merged commit 8380782 into FreeCAD:main Jan 20, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants