> On Nov 12, 2025, at 3:33 PM, Michael Strauß <[email protected]> wrote:
> 
> I think we can probably get there by using a WS_EX_LAYERED window like
> we do for StageStyle.TRANSPARENT, if we accept the significant
> performance impact.

I tried that. Once you call UpdateLayeredWindow/UpdateLayeredWindowIndirect the 
OS stops painting and you become responsible for all of the window’s pixels 
including the title bar and frame areas.

> With DirectComposition, we can directly interface
> with the DWM composition engine and skip the GDI window surface
> completely. This requires a fair bit of integration with JavaFX that
> goes beyond changes in the Glass toolkit. However, it doesn't require
> a D3D11 rendering pipeline. It works with the existing D3D9 pipeline
> by having D3D9 render into a shared off-screen surface, which is then
> accessed by DirectComposition with ID3D11Device::OpenSharedResource.

The Mac Glass platform code builds the surface (CALayer) and passes that to the 
rendering pipeline instead of the NSView. Is it possible for Windows Glass to 
do something similar? Seems odd to be passing an HWND into a rendering pipeline.

With that said, per-pixel window transparency is not a priority. Like I said, 
lots of issues related to hit testing and drop shadow generation.

> In the end, there doesn't seem to be much common ground between the
> various OS platforms for any reasonably powerful cross-platform API.

Are you talking about an API for creating custom materials? I don’t think 
that’s possible on macOS. To blend the window contents against the desktop 
background in real-time NSVisualEffectView uses a couple of undocumented 
CoreAnimation layers. In effect NSVisualEffectView is the only component that 
can do this and it’s constrained to the built-in materials.

> I've never heard of any previous effort, and it couldn't have been me
> beacuse I haven't talked about this up util now. I'd be interested to
> learn about other attempts at solving this.

Found the e-mail. You mentioned this project in passing on a different thread. 
https://marc.info/?l=openjdk-openjfx-dev&m=167536435011246 
<https://marc.info/?l=openjdk-openjfx-dev&m=167536435011246&w=2>

Martin

Reply via email to