KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm working on an iPhone App that relies heavily on OpenGL. Right now it runs a bit slow on the iPhone 3G, but looks snappy on the new 32G iPod Touch. I assume this is hardware related. Anyway, I want to get the iPhone performance to resemble the iPod Touch performance. I believe I'm doing a lot of things sub-optimally in OpenGL and I'd like advice on what improvements will give me the most bang for the buck. My scene rendering goes something like this: Repeat 35 times glPushMatrix glLoadIdentity glTranslate Repeat 7 times glBindTexture glVertexPointer glNormalPointer glTexCoordPointer glDrawArrays(GL_TRIANGLES, ...) glPopMatrix My Vertex, Normal and Texture Coords are already interleaved. So, what steps should I take to speed this up? What step would you try first? My first thought is to eliminate all those glBindTexture() calls by using a Texture Atlas. What about some more efficient matrix operations? I understand the gl*() versions aren't too efficient. What about VBOs? Update There are 8260 triangles. Texture sizes are 64x64 pngs. There are 58 different textures. I have not run instruments. Update 2 After running the OpenGL ES Instrument on the iPhone 3G I found that my Tiler Utilization is in the 90-100% range, and my Render Utilization is in the 30% range. Update 3 Texture Atlasing had no noticeable affect on the problem. Utilization ranges are still as noted above. Update 4 Converting my Vertex and Normal pointers to GL_SHORT seemed to improve FPS, but the Tiler Utilization is still in the 90% range a lot of the time. I'm still using GL_FLOAT for my texture coordinates. I suppose I could knock
Tags (comma-separated)
Save Edits
Cancel