#### Archived

This topic is now archived and is closed to further replies.

# Lesson 19, Particle Engine

## Recommended Posts

Cass    122
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?

##### Share on other sites
baldurk    1028
sounds like you don''t have blending enabled.
can''t post much now, @ skool. I''ll post more when I''m at home

##### Share on other sites
XaOs    122
  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

##### Share on other sites
Cass    122
i had depth testing on,whoops. that seemed to clear it up, thanks guys

##### Share on other sites
Guest Anonymous Poster
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

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?