Sign in to follow this  
CRACK123

glDrawElements - more data better performance ?

Recommended Posts

Hi, If I send in more data like around 12k-15k triangles my performance goes higher. But if I send in like 1k-3k my performance suddenly drops. Any Idea what is the optimum amount to send in for rendering ? Thanks

Share this post


Link to post
Share on other sites
Generally the more the better, althought there is a limit where you'll see a fall off for performance again due to copying over head.

The reason you'll see you performance drop when you only render 1K-3K polys at a time is because you are performing more function calls and as lightweight as the glDrawElements function call is these function calls can still add up (as you are making between 12 and 5 more calls to the function per frame).

However, by 'performance drop' what kind of numbers are you talking about?

Share this post


Link to post
Share on other sites
Quote:
Original post by CRACK123
60fps to 15fps.

Looks like you are testing with vsync enabled. You should usually test with it disabled.

Newer drivers usually improve performance but MX series is not exactly high-end so I don't know how much difference you will see there. What version are you using now?

There is no optimal size for a batch. In genera it "as much as possible" but it has to be less than 64k (so you can still use short indice format).

Share this post


Link to post
Share on other sites
With Vsync disabled I go from 136 fps to 48 fps. Still a terrible slowdown considering I have only like 6-8k polys in my scene. Looks like sending too less data also has bad effects. I then used a scene which has like 40k polys/tris which gives much better performance.



Share this post


Link to post
Share on other sites
im guessing what u do (explanation case not real)

15k triangles/frame = 50fps
3k tris/frame = 100fps

ok the first one has more tris a second 2.5x more (BUT the second does more work as well u may of forgotten about eg it clears the screen twice as much etc)

Share this post


Link to post
Share on other sites

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