proper way to render particles (OpenGL)
im working on a particle engine, and im having trouble coming up with a good way to do the rendering.
the particles are billboarded, which means i have to recreate the vertices every frame. the way i see it, i have 3 options:
1. call glBegin() and glEnd(). ive heard drawing this way, only one particle at a time, is a great way to bring your framerate to its knees. it is the easiest to impliment, however, and it works perfectly fine in all cases.
2. compile all of the verticies, texture coords, and colors dynamically, store them in a couple big arrays, and call glDrawArrays() with them. i was doing it this way, and i could get it to work, but it was extremely slow. i wrote my own array class similar to the stl vector but much faster, and yet i still bottleneck during the list creation every frame. i am having to push on at least 12 floats for the verticies, 8 for the tex coords, and 16 colors (4 per vertex) every frame, and i am having to do this for every particle. using method 1 is actually faster...
3. spend the memory and store all of the variables inside the particle, and use something like glInterleavedArrays() on it. i've considered this method, but it will cause me to have to change my base code way too much for it to be feasable to test it.
these are the only things i can think of. is there a better way? how do you guys render your particles? am i going down the wrong track? i need speed, but i dont want to change my base too much from what it is...