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 5 of 5

Thread: cannot put particles over an image

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2011
    Posts
    16

    cannot put particles over an image

    I loaded an image as background and then I want to superimpose some particles that are generated in Cuda over this background. Imagine something like putting stars on a light blue sky. I am able to do it separately, that is, either see the background or see the particles but not both. If I put the background texture before of after the Cuda function in the display() method it makes no difference. Is this a texture conflict or something else? Is it possible that when I see the background, it's actually a 'frontground' covering the particles?

  2. #2
    Member Regular Contributor Rosario Leonardi's Avatar
    Join Date
    Aug 2008
    Location
    Italy
    Posts
    352

    Re: cannot put particles over an image

    Did you enable the Z test?
    Particle write the depth? When you draw the background you are also wrinting some (random) depth?
    ~ ~ I tell you, realtime 3D is made of blood, sweat and screams! ~ ~

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2011
    Posts
    16

    Re: cannot put particles over an image

    nope, did not enable Z test. for the background would I be writing depth when I used gluLookAt ?

  4. #4
    Junior Member Newbie
    Join Date
    Sep 2011
    Posts
    16

    Re: cannot put particles over an image

    so do I need to enable it or to disable it?
    now I see that my background uses gluLookAt(0,0,5,...) while the stars are using gluLookAt(0,0,50,...)
    could this be the reason I can either see one or the other but not both ?

  5. #5
    Junior Member Newbie
    Join Date
    Sep 2011
    Posts
    16

    Re: cannot put particles over an image

    never mind, glBlend did the trick. cannot believe it was so easy

Posting Permissions

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