OpenGL ES Performance Question

Sage
Posts: 1,066
Joined: 2004.07
Post: #1
I'm working on a fairly sprite intensive game right now and had a question about the OpenGL ES performance. Is it better to batch all the sprites onto a single 512x512 sheet or individual 64x64 images? If I put them all on a sheet, I cut down the amount of state changes I make, but then I have to add the CPU overhead of calculating the texture coordinates for each sprite. Being on the iPhone, I'm just not sure whether I should trust the CPU to handle those texture coordinate calculations faster or let the GPU handle the state changes.

Anyone here have some quick knowledge on the subject before I go about writing up a bunch of test cases I don't particularly want to write? Smile
Quote this message in a reply
Member
Posts: 45
Joined: 2008.04
Post: #2
I would assume the texture coords for each sprite will be constant within the large sheet, i.e. you can pre-calculate and cache them... so there wouldn't be a significant CPU overhead in that case
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #3
Definitely sprite sheets from what I've heard, read and experienced.
Quote this message in a reply
Sage
Posts: 1,066
Joined: 2004.07
Post: #4
aBabyRabbit Wrote:I would assume the texture coords for each sprite will be constant within the large sheet, i.e. you can pre-calculate and cache them... so there wouldn't be a significant CPU overhead in that case
Ah that's a good point. I should have thought of that. Rasp

Thanks to both of you on that. I'll continue on with the sprite sheets then and use some cached coordinate arrays. Hopefully that'll keep things nice and smooth.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Major OpenGL performance increase smallstepforman 2 3,073 Dec 21, 2008 11:01 PM
Last Post: smallstepforman
  OpenGL performance degrade smallstepforman 1 2,545 Dec 20, 2008 11:06 AM
Last Post: Skorche