Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 10

Thread: Windowless 3D Content - Metaballs

  1. #1
    Junior Member Newbie
    Join Date
    May 2005
    Posts
    17

    Windowless 3D Content - Metaballs

    Hey all, here is another demo I coded up more along the lines of windowless 3D content.



    The purpose of the demo is to show that it is possible to render windowless 3D content directly to the desktop with per pixel transparency.

    Your feedback would be appreciated.

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2006
    Location
    Binghamton, Ny
    Posts
    24

    Re: Windowless 3D Content - Metaballs

    Hey, I tried the demo, but all I got was a black square, am I missing something?

  3. #3
    Junior Member Newbie
    Join Date
    May 2005
    Posts
    17

    Re: Windowless 3D Content - Metaballs

    Your setup is probably fine.

    I have a few computers the demo won't run properly on. Currently I don't have a development environment setup on them to track down the problem, but I will soon.

  4. #4
    Senior Member OpenGL Guru knackered's Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    2,833

    Re: Windowless 3D Content - Metaballs

    Originally posted by Vaticanfox:
    Hey, I tried the demo, but all I got was a black square, am I missing something?
    yep, same here.
    My hardware setup is state of the art too.
    Knackered

  5. #5
    Junior Member Newbie
    Join Date
    May 2005
    Posts
    17

    Re: Windowless 3D Content - Metaballs

    Okay, I installed my code on another machine (with an Nvidia card), and here is what I found:

    Code :
      DrawMetaballs;
      glReadPixels(0, 0, FImage.Width, FImage.Height, GL_BGRA, GL_UNSIGNED_BYTE, FImage.Bits);
      UpdateBlendWindow(Self, FImage);
    FImage is a record/struct that holds a DC, Bits, and Dimesions. When glReadPixels is called on Nvidia hardware (as far as I can tell), it is not returning BGRA bits as expected. The color components (BGR) are transferring correctly, but the A is not.

    So glReadPixels is not writing correct alpha levels on Nvidia hardware. Does anyone have any idea why?

  6. #6
    Intern Newbie
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    49

    Re: Windowless 3D Content - Metaballs

    I wrote something similar - rendering windowless 3d content - a while back. Maybe it might contain something that will help you out? More details here.

  7. #7
    Junior Member Newbie
    Join Date
    May 2005
    Posts
    17

    Re: Windowless 3D Content - Metaballs

    Okay, thanks everyone for your help. I fixed the demo so that it should now work as expected on Nvidia hardware. Part of the fix requires the GL_EXT_FRAMEBUFFER_OBJECT extension, so if you try to launch it without the right hardware or drivers you'll see an gracefully exiting error message.

    Also, I added a systray icon and dialog to set a few parameters.



    Feedback appreciated

  8. #8
    Intern Contributor
    Join Date
    Jan 2007
    Posts
    89

    Re: Windowless 3D Content - Metaballs

    Works on G8800GTS - nice demo:-)

    Some random ideas:
    - Move the light source with the mouse cursor
    - Increase alpha for specular reflections

  9. #9
    Advanced Member Frequent Contributor
    Join Date
    Apr 2000
    Posts
    718

    Re: Windowless 3D Content - Metaballs

    Tested on XP SP2 and Vista and runs flawlessly, at very good framerates.

  10. #10
    Junior Member Newbie
    Join Date
    Dec 2005
    Location
    Belgium
    Posts
    1

    Re: Windowless 3D Content - Metaballs

    It would be nice if you first read the desktops framebuffer, and use it as env map, or add some alpha gradient on the borders of the metaballs (kind of Fresnel effect) so that they more naturally blend with the background...

    Very cool.

Posting Permissions

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