This is an example referred to enter link description here class MyGLSurfaceView extends GLSurfaceView { private MyRenderer mMyRenderer; public void start() { mMyRenderer = ...; setRenderer(mMyRenderer); } public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { queueEvent(new Runnable() { // This method will be called on the rendering // thread: public void run() { mMyRenderer.handleDpadCenter(); }}); return true; } return super.onKeyDown(keyCode, event); } } 这篇关于GLES20.glReadPixels在Android中全为零的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-18 00:49