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 DirectComposition for DX12 backend (for transparency) #7462

Open
wants to merge 3 commits into
base: docking
Choose a base branch
from

Conversation

Soreepeong
Copy link

image
Note that the demo window has its window background disabled.

DirectComposition can be used to draw windows with transparent content that blend in via the desktop compositor. This PR aims to add transparency support for viewport windows using that.

DCOMP has to be #defined to check this PR in action.

Only DX12 backend has been modified to support DirectComposition, since while DX11 also supports using DC-provided swap chains, DX11 is supported on Windows 7 whereas DC is available starting from Windows 8, and I wanted to make the amount of code added minimal by omitting code that checks for supported features.

Related PR: #2766

I thought that having ImGuiBackendFlags_RendererHasTransparentViewports set from backend implementation would work better than a user setting ImGuiConfigFlags_TransparentBackbuffers manually as needed, as it probably is more of a backend capability rather than a user-configurable thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants