简体   繁体   中英

LWJGL Window with Transparent Background?

I would like to create a window such that there is no "black background" area, but instead you see through to any other windows that are open, etc.

That is, render the scene and only the scene, leaving no frame and no background area.

I've read about a method that involves rendering to a hidden OpenGL window and buffering it in memory, creating a transparent layered window, and copying from memory to the transparent window.

Obviously this is very cpu/memory intensive, so I was wondering if there was any better ways of doing it, within Java and LWJGL?

This is something that can only be accomplished with platform-specific code.

This thread provides an interesting discussion on the subject. This post shares C code that accomplish this effect on Windows, and this post on Linux.

This is OS specific, since the "OS/window manager/not-you-department" owns the other windows.

On Windows, OpenGL cannot participate in this sort of compositing. Other OS's might allow it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM