5月 2010

Android中OpenGL ES开启DEBUG_CHECK_GL_ERROR DEBUG_LOG_GL_CALLS的2个小发现

发现1:当开启DEBUG_LOG_GL_CALLS的时候,会判断所有原本运行正常的glDrawArrays出现数组越界的异常,修改了几下,发现开启log calls后,会多读1个点的数据,也就是最后一个参数的count+1,所以原本正常长度的顶点数组会被访问越界,不晓得为何会这样。

发现2:在真机上使用vbo的时候,如果开了debug,会导致在调用vbo相关gl函数的时候出现unsupported操作异常,可实际vbo功能却执行的好好的,同样不晓得为何会这样。

Controlling the Android Emulator

Emulated Device Key Keyboard Key
Home HOME
Menu (left softkey) F2 or Page-up button
Star (right softkey) Shift-F2 or Page Down
Back ESC
Call/dial button F3
Hangup/end call button F4
Search F5
Power button F7
Audio volume up button KEYPAD_PLUS, Ctrl-5
Audio volume down button KEYPAD_MINUS, Ctrl-F6
Camera button Ctrl-KEYPAD_5, Ctrl-F3
Switch to previous layout orientation (for example, portrait, landscape) KEYPAD_7, Ctrl-F11
Switch to next layout orientation (for example, portrait, landscape) KEYPAD_9, Ctrl-F12
Toggle cell networking on/off F8
Toggle code profiling F9 (only with -trace startup option)
Toggle fullscreen mode Alt-Enter
Toggle trackball mode F6
Enter trackball mode temporarily (while key is pressed) Delete
DPad left/up/right/down KEYPAD_4/8/6/2
DPad center click KEYPAD_5
Onion alpha increase/decrease KEYPAD_MULTIPLY(*) / KEYPAD_DIVIDE(/)

模拟器只能在尚未运行的时候通过设置界面调整屏幕大小,位置等信息,运行时并没有提供菜单或者其他UI进行调整,比如想切换landscape模式,就得通过上面的快捷键实现了。