View Full Version : cannot put particles over an image
02-21-2012, 02:13 PM
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?
02-21-2012, 03:54 PM
Did you enable the Z test?
Particle write the depth? When you draw the background you are also wrinting some (random) depth?
02-21-2012, 08:36 PM
nope, did not enable Z test. for the background would I be writing depth when I used gluLookAt ?
02-22-2012, 09:04 AM
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 ?
02-22-2012, 12:11 PM
never mind, glBlend did the trick. cannot believe it was so easy
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.