Bad FPS for smaller size (OpenGL ES with SDL)

Posted by ber4444 on Game Development See other posts from Game Development or by ber4444
Published on 2012-11-12T15:52:05Z Indexed on 2012/11/12 17:23 UTC
Read the original article Hit count: 415

Filed under:
|
|
|
|

If you saw my other question, well, there is still a little problem:

Click here to watch on youtube

Basically, the frame rate is very bad on the actual device, where for some reason the animation is scaled (it looks like the left side on the video). It is quite fast on the simulator where it is not scaled (right side).

For a test, I submitted this new changeset that hard-codes the smaller size (plus increases the point size for HII regions to make the dust clouds more visible), and as you see in the video, now it is slow even in the simulator (left side shows the small size, right side shows the original size -- otherwise the code is the same).

I'm clueless why it's soooo slow with a smaller galaxy, in fact it should be FASTER.

As for general speed optimization (which is not strictly part of my question but is closely related to it, esp. if we need a workaround to speed things up), some initial ideas:

  • reducing the number of items drawn may affect the appearance negatively but screen resolution could be reduced
  • there are too many glBegin(GL_POINTS)/glEnd() blocks, we could draw more than just a single star at once

© Game Development or respective owner

Related posts about opengl

Related posts about iphone