Hi Guys,
maybe you can help me again ...
our particle engine is pretty slow, we are drawing each particle as blended quad with glBegin() glEnd() ... with about 200 particles we have a framerate drop of 30 frames per second .. :/
Are there relatively easy ways to speed this up?
PS: Maybe i should also say that it is very CPU intense (100% usage) since then. But i guess this is cause of the many glBegin .. glEnd commands. Movements are done seperate for every particle after a movement vektor is set.
So theoretically it is all done like in all tutorials about particle engines ...
Particle Engine is very slow
Moderator: Moderators
Re: Particle Engine is very slow
This should be in feature requests or general discussion. This sounds like a very important issue. And if it's 100% usage with sloppy coding like you're saying, that's all the more reason to change it.
Re: Particle Engine is very slow
It's my own game ... not TASpring .. that's why it is in Offtopic :)
Re: Particle Engine is very slow
You could start with using vertex buffers (GL_ARB_vertex_buffer_object)
Re: Particle Engine is very slow
I don't think VBOs would speed it up much.
VBOs unfold their full potential with slow changing data (in a ps you change the full dataset each frame) or if you want to convert texture data to vertex data.
PS: Spring doesn't use glBegin ... glEnd, it uses VertexArrays (VA)
VBOs unfold their full potential with slow changing data (in a ps you change the full dataset each frame) or if you want to convert texture data to vertex data.
PS: Spring doesn't use glBegin ... glEnd, it uses VertexArrays (VA)
Re: Particle Engine is very slow
But i guess modifying the VA is still much more performant then sending a whole bunch of GL Commands to Graphics Card, cause of command overhead.