- June 3, 2009 at 8:03 am #29813
I am a developer on Android platform. Now we need to
evaluate the performance of Opengles running on Android. We just have
Neocore as a demo. Where can I get more sample program to
test Opengles on Android? Maybe I need the program could show ‘fps’.
haiJuly 3, 2009 at 11:20 am #33096
seems to describe how to get started with OpenGL ES. From what it says there, it looks like code written for use with J2ME JSR239 should work with minor alteration and I suggest you look for this kind of material.
Perhaps start here:
Although Google have released a native SDK it doesn’t seem to include access to OpenGL ES at this time. The examples in our own SDK are all written in C++, so while the graphics techniques on Android will be similar the code won’t transfer directly.
FPS code is pretty straightforward if you have access to a timer. Store the time when beginning your render then calculate the difference in time at the same point in the code for the next frame. You now know the time interval required render one frame – now just work out how many intervals like this will fit in a second and you have your FPS.
Another way is to increment a “number of frames rendered” variable, checking the time, until a second has passed. You then have a count of the number of frames rendered in the last second. This has the advantage of providing a slower changing number that’s easier to read.