Jump to content
  • Advertisement

Archived

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

Cass

Lesson 19, Particle Engine

This topic is 6090 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 this post


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

Share this post


Link to post
Share on other sites
    
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 this post


Link to post
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

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!