Particle Engine is very slow

Particle Engine is very slow

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Post Reply
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Particle Engine is very slow

Post by Rayden »

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 ...
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

Re: Particle Engine is very slow

Post by rcdraco »

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.
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Re: Particle Engine is very slow

Post by Rayden »

It's my own game ... not TASpring .. that's why it is in Offtopic :)
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Re: Particle Engine is very slow

Post by jcnossen »

You could start with using vertex buffers (GL_ARB_vertex_buffer_object)
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Particle Engine is very slow

Post by jK »

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)
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Re: Particle Engine is very slow

Post by Rayden »

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.
Post Reply

Return to “Off Topic Discussion”