Skip to content

[GUI] Fix immediate mode transparency and compositing order - #1296

Closed
DimitarCC wants to merge 1 commit into
OpenViX:Developerfrom
DimitarCC:screen-alphablend-fix
Closed

[GUI] Fix immediate mode transparency and compositing order#1296
DimitarCC wants to merge 1 commit into
OpenViX:Developerfrom
DimitarCC:screen-alphablend-fix

Conversation

@DimitarCC

Copy link
Copy Markdown
Contributor

This commit addresses issues with how transparent, alpha-blended, gradient-blended, and rounded-corner widgets (especially root widgets) are composited in immediate rendering mode.

The background and any underlying widgets must be painted before overlapping transparent elements to ensure correct blending. Changes include:

  • Modifying calcWidgetClipRegion to ensure areas under transparent widgets remain visible for underlying layers.
  • Refactoring paint() to ensure the desktop background is painted first in immediate mode, and root widgets are iterated back-to-front for painting.
  • Removing pre-clearing in paintLayer to allow blending against existing content.
  • Adjusting addRootWidget to ensure widgets with identical z-positions are consistently stacked with the last-added on top.
  • Ensuring eWindow also sets alpha blend on its child widget for visibility.

This commit addresses issues with how transparent, alpha-blended,
gradient-blended, and rounded-corner widgets (especially root widgets)
are composited in immediate rendering mode.

The background and any underlying widgets must be painted *before*
overlapping transparent elements to ensure correct blending.
Changes include:
- Modifying `calcWidgetClipRegion` to ensure areas under transparent widgets
  remain visible for underlying layers.
- Refactoring `paint()` to ensure the desktop background is painted first
  in immediate mode, and root widgets are iterated back-to-front for painting.
- Removing pre-clearing in `paintLayer` to allow blending against existing content.
- Adjusting `addRootWidget` to ensure widgets with identical z-positions
  are consistently stacked with the last-added on top.
- Ensuring `eWindow` also sets alpha blend on its child widget for visibility.
@DimitarCC DimitarCC closed this Aug 19, 2026
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.

1 participant