Sign in to follow this  

Immediate mode with arrays

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

For my particle system I only need to pass a normal of vector3d(0.0, 0.0, 1.0) then DrawElements(), is that practical or "ok" to do? Or should I just put it in the array with each vertice (I was going to do this but it would be a LOT of unnecessary usage of buffer space when only one is needed)

Share this post


Link to post
Share on other sites
ah yes, good point :)

hmm... Now I'm thinking that it would just be better to make a vertex array with only 4 vertices long; loop through each particle to see if it's alive, if so, PushMatrix() tranform and rotate to it's position then draw that one quad, PopMatrix() back to the origin of the emitter then loop again.

any other ideas? it seems that immediate mode is best for particles because each particle needs to be check if it's alive anyway

Share this post


Link to post
Share on other sites
no, that's insane. You are now going backwards in performance.

It'll be faster to construct a list of 'alive' particles and send it to the gfx card in one batch.

Immediate mode is not the answer for that; setting one attribute per batch, fine; drawings.. no.

Share this post


Link to post
Share on other sites

This topic is 3597 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this