Android OpenGL ES 2.0 Framerate cap? -



Android OpenGL ES 2.0 Framerate cap? -

i'm developing app android using opengl es 2.0. i'm using lg optimus 5 phone test it.

i've created glsurfaceview, , phone call renderer's method ondrawframe(gl10 gl) show images on screen. update app's logic within ondrawframe , sleep accomplish 60fps.

the code looks this:

public void ondrawframe(gl10 gl) { //sleep 16-17ms accomplish 60fps //update //render }

one thing i've noticed don't need sleep within ondrawframe; apparently phone's screen refresh rate 60hz, android caps framerate 60fps.

so wonder, android cap framerate refresh rate when using opengl es 2.0?

i thought of obtaining phone's refresh rate, , if it's 60 don't phone call sleep method; if it's higher phone call cap framerate 60fps.

what happen if phone has refresh rate lower 60fps?

yes, android caps frame rate @ screen refresh rate. there no (easy) ways disable that, it's part of compositing logic.

for benchmark purposes, want test how fast render, people utilize off-screen rendering. that's way allow gpu render fast possible, without frame rate cap.

android opengl-es opengl-es-2.0 frame-rate

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -