Why is this OpenGL ES code slow on iPhone?

后端 未结 5 794
梦如初夏
梦如初夏 2021-02-04 19:40

I\'ve slightly modified the iPhone SDK\'s GLSprite example while learning OpenGL ES and it turns out to be quite slow. Even in the simulator (on the hw worst) so I must be doing

5条回答
  •  隐瞒了意图╮
    2021-02-04 19:56

    I'm not familiar with the iPhone, but if it doesn't have dedicated hardware for handling floating point numbers (I suspect it doesn't) then it'd be faster to use integers whenever possible.

    I'm currently developing for Android (which uses OpenGL ES as well) and for instance my vertex array is int instead of float. I can't say how much of a difference it makes, but I guess it's worth a try.

提交回复
热议问题