Open thilidric opened 5 years ago
Transparent windows aren't currently supported in Allegro 5.2.5- yet, I have some work I did on this issue though, I can dredge it up. Give me a few days. Message me any time.
Thanks for an reply. I would love to see ur work.
I was also thinking about using an CS_DROPSHADOW to have atleast a nice shadow around my frameless window, managed to add it on pure winapi, struggling on allegro becouse I need to capture some winapi messages from an window to make it work (dont remember them right now, got the sources on different desktop).
I see no response but I`ve managed to accomplish atleast a nice shadow around the frameless window. I did an second window and layered in under my main, then just handle all the minimize, close, resize and move events to be equal for both windows.
Thanks to it i was also able to draw a more fancy border in the underlaying window but just could not make the png alpha for shadows to kick in.
Anyway, it looks a lot better with shadow then just plain flat frameless window. Results showing main and shadow window: https://pasteboard.co/IxJqxmc.png
Sorry. I don't seem to get notified of replies to this thread.
I haven't had time to work on it yet. The key is OpenGL with WGL_TRANSPARENT_ARB extensions and LayeredWindow.
@EdgarReynaldo Just joining in to say I'd love to see this get implemented!
@Necklaces There is one way to get a transparent window, and another to get translucent windows. For translucent windows all you need is DWMEnableBlurBehind. You can do it without allegro and without interfering with allegro. Windows Vista and up is required for a translucent window.
Sorry. I don't seem to get notified of replies to this thread.
I haven't had time to work on it yet. The key is OpenGL with WGL_TRANSPARENT_ARB extensions and LayeredWindow.
WGL_TRANSPARENT_ARB is not needed. Neither is OpenGL. But you do need to set a color key with LayeredWindow.
@EdgarReynaldo Unfortunately I'm mainly on GNU/Linux and DWMEnableBlurBehind and LayeredWindow seem to be Windows only? Ideally I'd need a cross platform solution - which from what I've read looks to be hard. Thus, it seems to me that it would be better if transparency was implemented in Allegro.
Those are the ONLY way to do it on Windows. On Linux it's actually much easier as all you have to do is add an alpha mask when creating the window. The Linux fix should be in GIT already. As for OSX or other platforms I don't know. So there's no real cross platform way to do it without delving into OS specific function calls and techniques.
Edgar
On 7/18/2022 4:09 PM, Nichlas Severinsen wrote:
@EdgarReynaldo https://github.com/EdgarReynaldo Unfortunately I'm mainly on GNU/Linux and DWMEnableBlurBehind and LayeredWindow seem to be Windows only? Ideally I'd need a cross platform solution - which from what I've read looks to be hard. Thus, it seems to me that it would be better if transparency was implemented in Allegro.
— Reply to this email directly, view it on GitHub https://github.com/liballeg/allegro5/issues/1076#issuecomment-1188313258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF2JBYNFVKK6TBP672D6533VUXBZJANCNFSM4IPUVACQ. You are receiving this because you were mentioned.Message ID: @.***>
I was wondering if more work has been done on this, since this is also something I am really interested in!
I was wondering if more work has been done on this, since this is also something I am really interested in!
Use DWM and DWMEnableBlurBehind on the Window along with a 32 bit backbuffer to include alpha. I haven't had full success with this yet. Aero glass effects interfere with the window.
Hey guys!
For a couple of days i tried to work on enabling the window transparency for background. I did manage to do it with Winapi but once I start drawing with allegro i get back the solid background color.
Guys from IRC suggested me to use this:
But it just draws the black background anyway.
Any ideas if it is possible to achieve transparent background in window?