Transparent window with borderless window

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
ThiefOfPringles
Prole
Posts: 17
Joined: Fri Feb 26, 2016 1:42 pm

Transparent window with borderless window

Post by ThiefOfPringles »

So what I'm trying to do is create a borderless window set by conf.lua and with transparency set by love.graphics.setBackgroundColor. But when the window opens there is no transparency. I saw other posts mention that SDL did not support transparent windows at the time of their writing, but a quick google search brings up that SDL does support transparent windows. Will LÖVE ever support transparent windows? Or does it already support it and I'm just missing something?
Attachments
prac.love
Space - Pump bar
(1002 Bytes) Downloaded 166 times
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Transparent window with borderless window

Post by zorg »

ThiefOfPringles wrote: Sun Aug 06, 2017 1:39 am So what I'm trying to do is create a borderless window set by conf.lua and with transparency set by love.graphics.setBackgroundColor. But when the window opens there is no transparency. I saw other posts mention that SDL did not support transparent windows at the time of their writing, but a quick google search brings up that SDL does support transparent windows. Will LÖVE ever support transparent windows? Or does it already support it and I'm just missing something?
Good question; Löve currently doesn't support them. That said, it might never, since if it's also tied in to SDL's graphics module/whatever, then it's an issue since Löve uses its own set of functions that use OpenGL directly, as far as i know.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Transparent window with borderless window

Post by ivan »

One of the strengths of Love2D is that it's cross platform.
You make your game and it works the same on desktops and Android, iOS, etc.
I doubt what you are trying to do will be supported since it doesn't make sense across different platforms.
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Transparent window with borderless window

Post by zorg »

ivan wrote: Sun Aug 06, 2017 1:58 pm One of the strengths of Love2D is that it's cross platform.
You make your game and it works the same on desktops and Android, iOS, etc.
I doubt what you are trying to do will be supported since it doesn't make sense across different platforms.
I mean, apart from the mobile ones, to me it does make sense, but again, support for it may not exist on all 3 desktop platforms even... nor with how löve uses OpenGL, maybe.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Transparent window with borderless window

Post by raidho36 »

Any half-decent composition manager would allow per-window transparency settings, so you shouldn't bother implementing that yourself.
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Transparent window with borderless window

Post by slime »

This is what SDL_SetWindowOpacity does. Is this really what you want? If so, what will you use it for specifically? It doesn't allow you to specify per-pixel opacity.

Image
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Transparent window with borderless window

Post by zorg »

There are 2 somewhat relevant things regarding this topic: (and there were a few threads about this before)
- Window opacity, which is what slime showed you above,
- Custom-shaped windows, which would be transparent outside of anything not "masked"

The latter would allow, if the mask would be updated each frame, to have games or programs with "transparent background" while the foreground would be opaque, the first would only have limited usage.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
ThiefOfPringles
Prole
Posts: 17
Joined: Fri Feb 26, 2016 1:42 pm

Re: Transparent window with borderless window

Post by ThiefOfPringles »

slime wrote: Sun Aug 06, 2017 3:48 pm This is what SDL_SetWindowOpacity does. Is this really what you want? If so, what will you use it for specifically? It doesn't allow you to specify per-pixel opacity.

Image
zorg wrote: Sun Aug 06, 2017 4:37 pm There are 2 somewhat relevant things regarding this topic: (and there were a few threads about this before)
- Window opacity, which is what slime showed you above,
- Custom-shaped windows, which would be transparent outside of anything not "masked"

The latter would allow, if the mask would be updated each frame, to have games or programs with "transparent background" while the foreground would be opaque, the first would only have limited usage.
The latter is what I had in mind. Is there any way of going about that with LÖVE?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Transparent window with borderless window

Post by raidho36 »

No and you really shouldn't even if you could.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Transparent window with borderless window

Post by Nixola »

raidho36 wrote: Sun Aug 06, 2017 8:37 pm No and you really shouldn't even if you could.
Why shouldn't you?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 83 guests