呈現在試圖建立一些其他平臺的Java之外/ Dalvik的Android上,我已停用受精卵,並試圖在這裏列出的觀點:的OpenGL Android上
http://jiggawatt.org/badc0de/android/index.html#opengl
我已經成功編譯了OpenGL測試代碼並將其推送到Android模擬器(我正在運行2.3 /薑餅)。而不是彩色三角形,它只是導致閃爍的「ANDROID_」文本引導屏幕閃爍。下面是輸出:
[email protected]:/data/misC# ./test1
GL version: 1.4
Window specs: 0*0 format=-1416517231
GL context: 162f8
GL surface: 163d0
這似乎表明,android_createDisplaySurface()從libui不返回正確大小的窗口。但是,在模擬器上的logcat顯示以下,這似乎意味着相反:
D/libEGL ( 73): loaded /system/lib/egl/libEGL_emul.so
D/libEGL ( 73): loaded /system/lib/egl/libGLESv1_CM_emul.so
D/libEGL ( 73): loaded /system/lib/egl/libGLESv2_emul.so
D/eglWrapper( 73): Loading egl dispatch for test1
D/eglWrapper( 73): isNeedEncode? for test1
D/eglWrapper( 73): Initializing native opengl for test1
D/eglWrapper( 73): loading /system/lib/egl/libGLES_android.so into /system/lib/egl/libGLESv1_CM_emul.so complete
D/eglWrapper( 73): loading /system/lib/egl/libGLES_android.so into /system/lib/egl/libGLESv2_emul.so complete
I/gralloc ( 73): using (fd=6)
I/gralloc ( 73): id =
I/gralloc ( 73): xres = 320 px
I/gralloc ( 73): yres = 480 px
I/gralloc ( 73): xres_virtual = 320 px
I/gralloc ( 73): yres_virtual = 960 px
I/gralloc ( 73): bpp = 16
I/gralloc ( 73): r = 11:5
I/gralloc ( 73): g = 5:6
I/gralloc ( 73): b = 0:5
I/gralloc ( 73): width = 49 mm (165.877548 dpi)
I/gralloc ( 73): height = 74 mm (164.756760 dpi)
I/gralloc ( 73): refresh rate = 651.04 Hz
I/pixelflinger( 73): Needs: n=0x03010144 p=0x00000177 t0=0x00000000 t1=0x00000000
I/ARMAssembler( 73): generated scanline__00000177:03010144_00000000_00000000 [ 26 ipp] (63 ins) at [0x4009f1e8:0x4009f2e4] in 9552233 ns
我只能猜測到目前爲止,也許事情在堆棧上正在等待SurfaceFlinger的,這也不是沒有的Dalvik運行。但它不在日誌中。我認識到這是一條脫節的道路,但是希望一些android/OpenGL專業人士可能會對發生的事情有一些線索。任何幫助真誠讚賞。
已經有一段時間了,沒有人回答這個問題。我也有這個問題,我正在努力尋找解決方案。如果你解決了這個問題,請你在這裏發表你的答案。非常感謝。 – Markus 2012-07-04 14:37:48