Lesson 19, Particle Engine
Mk, I have this problem here with the particle engine tutorial. The bitmaps? When they are spraying out of my compilation of the code, you can see the black squares which define each bitmap. In Nehe''s compilation, You can not see that black haze around each texture. I just skimmed through our code checking for differences, and I couldn''t actually find any. Would anyone know what the deal is?
sounds like you don''t have blending enabled.
can''t post much now, @ skool. I''ll post more when I''m at home
can''t post much now, @ skool. I''ll post more when I''m at home
glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE); glColor4f (part[loop].r, part[loop].g, part[loop].b, part[loop].life); (...Draw Triangle Strip...) glDisable(GL_BLEND);
That should do it i think....
Take Care!
- -- ---[XaOs]--- -- -
[ project fy ]
Edited by - XaOs on October 17, 2001 8:28:59 AM
Well you can actually draw the particles with depth testing on, you just have to do it like this:
glDepthMask(0); /* this will remove the black square */
glColor4f..blablablaa
glDepthMask(1);
Without depth testing things would start to look quite crappy since your particles would ALWAYS be drawn on top of everything and that''s not what you want, is it?
glDepthMask(0); /* this will remove the black square */
glColor4f..blablablaa
glDepthMask(1);
Without depth testing things would start to look quite crappy since your particles would ALWAYS be drawn on top of everything and that''s not what you want, is it?
Damn.. the above post was by me, I just forgot to fill in my login stuff.. as if anyone cared :D
Edited by - lmv on October 17, 2001 10:54:56 AM
Edited by - lmv on October 17, 2001 10:54:56 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement