我有一个OpenGL的游戏为Android。它运行在一个良好的60fps的当屏幕被触摸。当我松开我的手指,又回到下降到大约30帧。请问触摸事件/释放升/降线程的优先级,如果是这样我怎么能复制这使其保持在一个恒定的60fps的。这只似乎是Galaxy Note的问题2为止。
I have an OpenGL game for Android. It runs at a good 60fps when the screen is touched. When I release my finger it goes back down to around 30fps. Does the touch event/release raise/lower a thread's priority and if so how can I replicate this to keep it at a constant 60fps. This only seems to be an issue on Galaxy Note 2 so far.
我会认为你正在使用 onDrawFrame
和 setRenderMode(RENDERMODE_CONTINUOUSLY)
。
I'll assume you are using onDrawFrame
and setRenderMode(RENDERMODE_CONTINUOUSLY)
.
30和60FPS表明您实施 onDrawFrame
被称为设备的屏幕刷新。大多数显示器刷新在60Hz,给您60FPS。
30 and 60FPS indicates that your implementation of onDrawFrame
is called as the device's screen refreshes. Most displays refresh at 60Hz, giving you 60FPS.
有可能是Galaxy Note的2具有一定的省电功能,限制了屏幕刷新为30Hz时,有在屏幕上没有任何接触。检查是否有任何方法来禁用此功能。
It is likely that the Galaxy Note 2 has some power saving feature that limits screen refresh to 30Hz when there are no touches on screen. Check if there's any way to disable this feature.
AFAIK,OpenGL ES的并不尽管FPS差异指定的屏幕刷新率一个标准,你需要一个调节功能,保证你的游戏运行/感觉一样(即以相同的速度)。
AFAIK, OpenGL ES does not specify a standard for screen refresh rates, you will need a throttling function to ensure that your game runs/feels the same (i.e. at the same speed) despite differences in FPS.