Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075933 Posts in 44152 Topics- by 36119 Members - Latest Member: Royalhandstudios

December 29, 2014, 04:22:37 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Optimizing drawing speed [2D]
Pages: 1 [2]
Print
Author Topic: Optimizing drawing speed [2D]  (Read 1375 times)
kamac
Level 10
*****


Notorious posts editor


View Profile Email
« Reply #20 on: September 03, 2012, 01:04:08 AM »

I am trying to batch / draw instanced sprites, so I don't have that many draw calls for each sprite.
Logged

Nothing to do here
Xienen
Level 3
***


Greater Good Games


View Profile WWW
« Reply #21 on: September 03, 2012, 03:04:41 AM »

This is where my engine creates a distinction between Static and Dynamic sprites.  Static sprites will be grouped together to reduce draw calls(meaning they just have to move together all the time...not that they can't move at all), while dynamic sprites will generally be kept as a single quad(or group of quads) which means it's own draw call.  If you're drawing all Dynamic sprites that can't possibly transform together, though, then the above suggestions are definitely the correct route.
Logged

Polly
Level 4
****


View Profile
« Reply #22 on: September 03, 2012, 03:55:29 AM »

I am trying to batch / draw instanced sprites

That's a little generic. If you'd describe what you're trying to make, there might be other ( completely different ) techniques more important to optimizing performance. I can't imagine a game with primarily 4000 colored dynamic rectangles on screen at all time .. but maybe that's just me Wink
Logged
kamac
Level 10
*****


Notorious posts editor


View Profile Email
« Reply #23 on: September 05, 2012, 10:34:48 AM »

No more help needed, I managed to get 120 FPS displaying 8100 'static' sprites (with color attributes, no rotation but with movement possible). When I've ran the same test but with dynamic sprites (color attributes for each one, rotation, movement, scale and all), I've got 100 FPS.

Sexy.
Logged

Nothing to do here
Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic