opengl-es 2.0 problem
Posted: Fri Sep 28, 2012 6:53 am
hi,i have downloaded the Irrlicht Engine version 1.8.0-alpha form SVN/branches/ogl-es.
i try to run example No.8 with opengl-es 1.0 on Android 4.0,it looks well.
but i try to run it with opengl-es 2.0,it does not work.
i just edit main.cpp "video::E_DRIVER_TYPE driverType=video::EDT_OGLES1;" to "video::E_DRIVER_TYPE driverType=video::EDT_OGLES2;"
the other files are the same content.
here is the logcat:
Android.mk:
Application.mk
AndroidManifest.xml:
where am i wrong?Can anybody help me?thanks a lot *^__^*
i try to run example No.8 with opengl-es 1.0 on Android 4.0,it looks well.
but i try to run it with opengl-es 2.0,it does not work.
i just edit main.cpp "video::E_DRIVER_TYPE driverType=video::EDT_OGLES1;" to "video::E_DRIVER_TYPE driverType=video::EDT_OGLES2;"
the other files are the same content.
here is the logcat:
Code: Select all
09-28 14:35:26.752: W/ActivityThread(1685): Application com.irrlicht.SFX is waiting for the debugger on port 8100...
09-28 14:35:26.812: I/System.out(1685): Sending WAIT chunk
09-28 14:35:26.812: I/dalvikvm(1685): Debugger is active
09-28 14:35:27.022: I/System.out(1685): Debugger has connected
09-28 14:35:27.022: I/System.out(1685): waiting for debugger to settle...
09-28 14:35:27.232: I/System.out(1685): waiting for debugger to settle...
09-28 14:35:27.442: I/System.out(1685): waiting for debugger to settle...
09-28 14:35:27.652: I/System.out(1685): waiting for debugger to settle...
09-28 14:35:27.862: I/System.out(1685): waiting for debugger to settle...
09-28 14:35:28.072: I/System.out(1685): waiting for debugger to settle...
09-28 14:35:28.282: I/System.out(1685): waiting for debugger to settle...
09-28 14:35:28.492: I/System.out(1685): debugger has settled (1441)
09-28 14:35:28.562: I/threaded_app(1685): Creating: 0x166828
09-28 14:35:28.562: I/threaded_app(1685): Config: mcc=0 mnc=0 lang=zh cnt=CN orien=2 touch=3 dens=120 keys=1 nav=1 keysHid=3 navHid=0 sdk=15 size=3 long=1 modetype=1 modenight=1
09-28 14:35:28.562: I/threaded_app(1685): Start: 0x166828
09-28 14:35:28.562: I/Irrlicht(1685): 1
09-28 14:35:28.562: E/Irrlicht(1685): Irrlicht Engine version 1.8.0-alpha
09-28 14:35:28.562: E/Irrlicht(1685): CIrrDeviceAndroid::CIrrDeviceAndroid
09-28 14:35:28.562: E/Irrlicht(1685): Waiting for Android activity window to be created.
09-28 14:35:28.562: I/threaded_app(1685): activityState=10
09-28 14:35:28.572: E/Irrlicht(1685): Unhandled android command: 10
09-28 14:35:28.582: I/threaded_app(1685): Resume: 0x166828
09-28 14:35:28.582: I/threaded_app(1685): activityState=11
09-28 14:35:28.592: E/Irrlicht(1685): Android command APP_CMD_RESUME
09-28 14:35:28.602: I/threaded_app(1685): InputQueueCreated: 0x166828 -- 0x1ab628
09-28 14:35:28.602: I/threaded_app(1685): APP_CMD_INPUT_CHANGED
09-28 14:35:28.602: I/threaded_app(1685): Attaching input queue to looper
09-28 14:35:28.622: I/threaded_app(1685): NativeWindowCreated: 0x166828 -- 0x1f0b58
09-28 14:35:28.622: E/Irrlicht(1685): Unhandled android command: 0
09-28 14:35:28.622: I/threaded_app(1685): APP_CMD_INIT_WINDOW
09-28 14:35:28.632: E/Irrlicht(1685): Android command APP_CMD_INIT_WINDOW
09-28 14:35:28.632: E/Irrlicht(1685): CIrrDeviceAndroid::createDriver
09-28 14:35:28.632: E/Irrlicht(1685): Getting OpenGL-ES2 display.
09-28 14:35:28.632: D/libEGL(1685): loaded /system/lib/egl/libGLES_android.so
09-28 14:35:28.662: I/threaded_app(1685): WindowFocusChanged: 0x166828 -- 1
09-28 14:35:28.702: D/libEGL(1685): loaded /system/lib/egl/libEGL_mali.so
09-28 14:35:28.722: D/libEGL(1685): loaded /system/lib/egl/libGLESv1_CM_mali.so
09-28 14:35:28.732: D/libEGL(1685): loaded /system/lib/egl/libGLESv2_mali.so
09-28 14:35:28.732: E/Irrlicht(1685): EglDisplay initialized. Egl version 1.4
09-28 14:35:28.732: E/Irrlicht(1685): Creating EglSurface with nativeWindow...
09-28 14:35:28.732: A/libc(1685): Fatal signal 11 (SIGSEGV) at 0x00000058 (code=1)
Code: Select all
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := IrrAndroid
LOCAL_SRC_FILES := libIrrAndroid.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := SFX
LOCAL_SRC_FILES := main.cpp
LOCAL_LDLIBS := -landroid -lEGL -llog -lGLESv1_CM -lGLESv2
LOCAL_CFLAGS := -DBUILD_OGLES2 -g -D_DEBUG
#LOCAL_SHARED_LIBRARIES :=IrrAndroid
LOCAL_STATIC_LIBRARIES :=android_native_app_glue \
IrrAndroid
LOCAL_C_INCLUDES := D:/Irrlicht_18/include \
D:/Irrlicht_18/source/Irrlicht \
include $(BUILD_SHARED_LIBRARY)
$(call import-module,android/native_app_glue)
Code: Select all
APP_MODULES := SFX
APP_PLATFORM :=android-9
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!-- BEGIN_INCLUDE(manifest) -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.irrlicht.SFX"
android:versionCode="1"
android:versionName="1.0">
<!-- This is the platform API where NativeActivity was introduced. -->
<uses-sdk android:minSdkVersion="7" />
<!-- This .apk has no Java code itself, so set hasCode to false. -->
<application android:label="@string/app_name" android:hasCode="false">
<!-- Our activity is the built-in NativeActivity framework class.
This will take care of integrating with our NDK code. -->
<activity android:name="android.app.NativeActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:label="@string/app_name"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="landscape"
android:clearTaskOnLaunch="true">
<!-- Tell NativeActivity the name of or .so -->
<meta-data android:name="android.app.lib_name"
android:value="SFX" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-feature android:glEsVersion="0x00020000"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>
<!-- END_INCLUDE(manifest) -->