Commit 3f49f3f
authored
Gui: Add hidden anchor object to root for transparency (FreeCAD#26590)
* Gui: Add hidden anchor object to the root for transparency
Image planes with transparency failed to render correctly in empty scenes
because OpenInventor's two-pass transparency rendering requires at least
one opaque object to properly initialize the depth buffer.
The fix adds a zero-scaled cube with no material node (making it use
OpenGL's default opaque material) to each image plane's scene graph.
This hidden object:
- Acts as a depth buffer anchor for transparent rendering
- Is invisible (scaled to 0,0,0)
- Has negligible performance impact
This matches the workaround already used in the rotation center indicator
and resolves the issue where image transparency only worked when the
rotation center, grid, or other opaque objects were visible.
* Gui: Exclude hidden anchor from bounding box calculations
Prevents the hidden anchor from affecting "fit all" and other bounding box
operations by wrapping it in `SoSkipBoundingGroup`.1 parent d944df0 commit 3f49f3f
1 file changed
+17
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
551 | 568 | | |
552 | 569 | | |
553 | 570 | | |
| |||
1530 | 1547 | | |
1531 | 1548 | | |
1532 | 1549 | | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
1542 | 1550 | | |
1543 | 1551 | | |
1544 | 1552 | | |
| |||
1561 | 1569 | | |
1562 | 1570 | | |
1563 | 1571 | | |
1564 | | - | |
1565 | 1572 | | |
1566 | 1573 | | |
1567 | 1574 | | |
| |||
0 commit comments