Bad FPS for smaller size (OpenGL ES with SDL)
- by ber4444
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