Jump to content
  • Advertisement

Archived

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

Raptor_UK

Particle visibility

This topic is 5881 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

I''ve just used Nehe''s method of creating particles to create a fire effect, however since it disables the depth buffer it either renders in front or behind the rest of the scene. If I enable the depth buffer then all the particles have black boxes around them, is there a way of correcting this problem without masking the particles? Thanks

Share this post


Link to post
Share on other sites
Advertisement
This question has been asked about a million times on the forum. Do a search first! but.... okay... here goes....

renderScene();
glDepthMask(GL_FALSE);
renderParticles();
glDepthMask(GL_TRUE);
glFlush();

when is someone going to do that depthmask/alphatest tutorial? O well, I guess i'm going to have a go at is

[edit:]switched the TRUE and FALSE. Me->Stupid=GL_TRUE; Or what that GL_FALSE

Sander Maréchal
[Lone Wolves Production][Articles][E-mail]

[edited by - smarechal on June 11, 2002 4:21:57 AM]

Share this post


Link to post
Share on other sites
Am I insane, or isn''t that backwards?


.
.
.

RenderScene();
glDepthMask(GL_FALSE); // disable z-buffer writes
RenderParticles(); // draw particles w/o writing to z-buffer
glDepthMask(GL_TRUE); // re-enable z-buffer writes

.
.
.

Share this post


Link to post
Share on other sites
*laughs*
Not sure if you should make a tutorial based on that smarechal...
GL_FALSE first, GL_TRUE after.

------------
aud.vze.com - The Audacious Engine <-- It''s not much, yet. But it''s mine... my own... my preciousssss...
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!