Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Transparent Window Demo

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2003
    Posts
    12

    Transparent Window Demo

    It seems like i've seen posts asking about this kind of thing for a long time, but with no resolutions. So I decided to try my hand at it.

    It works nicely on the cards I have at hand. This is a Windoze 2000/XP only demo.

    Sorry, there is no source with it yet. The source is still unclean.

    Download

    Let me know what you think

    Regards,

    Dude

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Transparent Window Demo

    Woah ! Superb !

    Your splash screen is a bit misleading, first I though 'hey, is that GL stuff ?'

    Maybe I ask for too much, but is there any chance to actually blend the spheres above the windows desktop , like your 'about' screen ? The 'transparent' mode only make the mouse click trought the spheres.

    Win2000, Gefore3ti200.

    Very interesting, I would really like to see the sources, even if it is ugly as hell.

    Congratulations !

  3. #3
    Advanced Member Frequent Contributor yooyo's Avatar
    Join Date
    Apr 2003
    Location
    Belgrade, Serbia
    Posts
    883

    Re: Transparent Window Demo

    Excellent work dude!!! How did you make it?

    yooyo

  4. #4
    Junior Member Regular Contributor
    Join Date
    Jun 2001
    Posts
    198

    Re: Transparent Window Demo

    Originally posted by yooyo:
    Excellent work dude!!! How did you make it?

    yooyo
    My guess: Render to an RGBA pbuffer, readback scene, blit with gdi and set colorkey/blend depending on the alpha channel or background color of the scene.

    The splash screen is intriguing, though...

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Feb 2001
    Location
    Switzerland
    Posts
    1,840

    Re: Transparent Window Demo

    this thing really rocks!

    really!
    http://davepermen.net - if i could stay true to my heart, i would feel totally free

  6. #6
    Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Montréal, QC, Canada
    Posts
    345

    Re: Transparent Window Demo

    Originally posted by evanGLizr:
    Originally posted by yooyo:
    Excellent work dude!!! How did you make it?

    yooyo
    My guess: Render to an RGBA pbuffer, readback scene, blit with gdi and set colorkey/blend depending on the alpha channel or background color of the scene.
    Not sure : you can even click through this window holes on the windows under it!

  7. #7
    Intern Contributor
    Join Date
    Jun 2002
    Location
    grenoble, france
    Posts
    94

    Re: Transparent Window Demo

    This rocks. I'm really interrested in seeing the source.

  8. #8
    Intern Contributor
    Join Date
    Apr 2004
    Posts
    57

    Re: Transparent Window Demo

    Very nicly done.
    "A Programmer is the same thing as a Psycho, except for one difference----A programmer gets paid to do what he does."*--Brian Jennings

  9. #9
    Junior Member Regular Contributor
    Join Date
    Jun 2001
    Posts
    198

    Re: Transparent Window Demo

    Originally posted by tfpsly:
    Originally posted by evanGLizr:
    Originally posted by yooyo:
    Excellent work dude!!! How did you make it?

    yooyo
    My guess: Render to an RGBA pbuffer, readback scene, blit with gdi and set colorkey/blend depending on the alpha channel or background color of the scene.
    Not sure : you can even click through this window holes on the windows under it!
    That's part of the normal layered window hit test behaviour:
    Hit testing of a layered window is based on the shape and transparency of the window. This means that the areas of the window that are color-keyed or whose alpha value is zero will let the mouse messages through.
    If the layered window has the WS_EX_TRANSPARENT extended window style, the shape of the layered window will be ignored and the mouse events will be passed to the other windows underneath the layered window.
    I'm quite sure everything is just an RGBA pbuffer & a GDI blit, using colorkeying or blending, depending on whether you want fully transparent/per window translucency or per pixel translucent windows:

    To use UpdateLayeredWindow, the visual bits for a layered window have to be rendered into a compatible bitmap. Then, via a compatible GDI Device Context, the bitmap is provided to the UpdateLayeredWindow API, along with the desired color-key and alpha-blend information. The bitmap can also contain per-pixel alpha information.

  10. #10
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: Transparent Window Demo

    Probably right about about readback and blitting cause it runs slow for something really simple.
    For sure it would work this way.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •