https://linen.dev logo
Join Discord
Powered by
# lime
  • e

    elegant-twilight-61392

    08/04/2022, 10:05 PM
    ok so take the content behind the window right
  • e

    elegant-twilight-61392

    08/04/2022, 10:06 PM
    and use that as your greenscreened background
  • e

    elegant-twilight-61392

    08/04/2022, 10:06 PM
    thats what it does
  • h

    hallowed-ocean-84954

    08/04/2022, 10:13 PM
    hmmm... ok - I'd have to compare the two in action to see what the practical upshot of that is - but that would mean that you would have to update the background every frame to give the appearance of transparency ?
  • e

    elegant-twilight-61392

    08/04/2022, 11:15 PM
    no its a feature of dwm and most WMs
  • e

    elegant-twilight-61392

    08/04/2022, 11:15 PM
    and probably whatever osx has
  • h

    hallowed-ocean-84954

    08/05/2022, 1:02 AM
    ok I think I see what's different between these two but I'll have run them to see how it looks. But one is using color key to tell the WM which color represents transparency - the other is directly setting the window alpha. Both use layered windows on Win
  • e

    elegant-twilight-61392

    08/05/2022, 1:49 AM
    i dont think you tell the WM what color is transparent, but thats what it looks like
  • e

    elegant-twilight-61392

    08/05/2022, 1:49 AM
    if that makes sense
  • e

    elegant-twilight-61392

    08/05/2022, 1:57 AM
    this is what it looks like though
  • h

    hallowed-ocean-84954

    08/05/2022, 1:58 AM
    yeah an I presume the bits you can see through (as it were) are that color
  • e

    elegant-twilight-61392

    08/05/2022, 1:58 AM
    well godot calls it "per pixel transparency"
  • h

    hallowed-ocean-84954

    08/05/2022, 1:58 AM
    now rendered transparent
  • e

    elegant-twilight-61392

    08/05/2022, 1:59 AM
    so i think its color-independant
  • h

    hallowed-ocean-84954

    08/05/2022, 2:02 AM
    in the Win32 API setLayeredWindowAttributes they refer to it as a colorkey and it's described as :
    Copy code
    Type: COLORREF
    
    A COLORREF structure that specifies the transparency color key to be used when composing the layered window. All pixels painted by the window in this color will be transparent. To generate a COLORREF, use the RGB macro.
    
    [in] bAlpha
  • e

    elegant-twilight-61392

    08/05/2022, 2:02 AM
    yeah this seems pretty color independent to me
  • e

    elegant-twilight-61392

    08/05/2022, 2:02 AM
    although im on linux so idk
  • h

    hallowed-ocean-84954

    08/05/2022, 2:02 AM
    linux will probably have a different API but I don't know what that is
  • h

    hallowed-ocean-84954

    08/05/2022, 2:03 AM
    but it should be similar
  • h

    hallowed-ocean-84954

    08/05/2022, 2:03 AM
    vaguely
  • h

    hallowed-ocean-84954

    08/05/2022, 2:03 AM
    perhaps very vaguely ....
  • e

    elegant-twilight-61392

    08/05/2022, 2:03 AM
    i think x11 just supports transparency
  • h

    hallowed-ocean-84954

    08/05/2022, 2:04 AM
    I haven't checked but SDL on linux probably uses X11 ?
  • h

    hallowed-ocean-84954

    08/05/2022, 2:04 AM
    but your examples above are Godot or Haxe ?
  • e

    elegant-twilight-61392

    08/05/2022, 2:04 AM
    im using godot because i can update stuff real time
  • h

    hallowed-ocean-84954

    08/05/2022, 2:04 AM
    k
  • e

    elegant-twilight-61392

    08/05/2022, 2:05 AM
    but that doesnt mean haxe cant do it
  • h

    hallowed-ocean-84954

    08/05/2022, 2:05 AM
    that wasn't what I meant - I just don't know if they are doing the same thing
  • h

    hallowed-ocean-84954

    08/05/2022, 2:05 AM
    ultimately though they'll have to talk to the same WM and API I would think
  • e

    elegant-twilight-61392

    08/05/2022, 2:06 AM
    you could look at the godot source to see how it does it
1...181920...138Latest