Вопрос

I implemented a loop with up to 100fps and can not spend more than 63fps.

What I believe is that the thread that runs the method of drawing opengl has a speed limit. "( @Override public void onDrawFrame(GL10 gl) )"

Это было полезно?

Решение

It depends on whether or not your rendering context has vertical sync enabled. Most LCD devices refresh at 60hz, and it may be waiting for the next refresh to call onDrawFrame(). That's one reason you'd be seeing that number.

The other possibility is that your draw is just taking long enough that it can't run any faster.

Другие советы

You should read the spec, for eglSwapInterval. It has to be implemented in your driver (I presume this is an Android device) to be able to see the effect. You can use it in any OpenGLES2 based application.

http://www.khronos.org/registry/egl/sdk/docs/man/xhtml/eglSwapInterval.html

A gist showing the usage here:

https://gist.github.com/prabindh/8467984

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top