Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion JNI in Facade (openGl , OSG)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Fild  
View profile  
 More options Jul 22 2012, 4:12 am
From: Fild <fil...@gmail.com>
Date: Sun, 22 Jul 2012 01:12:52 -0700 (PDT)
Local: Sun, Jul 22 2012 4:12 am
Subject: Re: JNI in Facade (openGl , OSG)

OK

I have been looking at the source code (C file ) of the class Exec , since
i am new to Java and Android /NDK  I didin't know that the package of the
JNI/JVA class is harcoded into the headernative function declaration.
exemple
Java_com_googlecode_android_1scripting_Exec_createSubprocess =>
 Exec.createSubprocess in the package com.googlecode.android_scripting

The osg library I have been using is a precompiled one (using
PREBUILT_LIBRARY in the NDK makefile), so the function name refer to the
package of their original project.
I am going to try refactoring it and recompiling it inside the SL4a project
to see what actually comes out...

Le dimanche 22 juillet 2012 03:31:54 UTC-4, Fild a écrit :

> Hi I try to integrate the android version of Open Scene graph  in the Full
> Screen UI Facade.

> So far I success in adding a customized SurfaceGLView (taken from the osg
> example) in my loaded layout and thus creating the Gl context.

> When I add the

> 1)  java class with the JNI pointer to the facade package in the common
> project ,

>  AND also

> 2) the shared library in the jni directory and (+) modify the Android.mk

> Everything compile fine, the apk is way bigger due to the size of the .so
> file.

> When I try to access to one of the native function through the java class
> , i have , a No Implementation Exception.

> Here is part of the logcat.

> 07-22 02:29:30.454: D/sl4a.ViewInflater:272(3078): text:..
> 07-22 02:29:32.534: I/dalvikvm(3078): Jit: resizing JitTable from 1024 to
> 2048
> 07-22 02:29:36.424: D/libEGL(3078): loaded
> /system/lib/egl/libGLES_android.so
> 07-22 02:29:36.434: D/libEGL(3078): loaded
> /system/lib/egl/libEGL_adreno200.so
> 07-22 02:29:36.444: D/libEGL(3078): loaded
> /system/lib/egl/libGLESv1_CM_adreno200.so
> 07-22 02:29:36.444: D/libEGL(3078): loaded
> /system/lib/egl/libGLESv2_adreno200.so
> 07-22 02:29:36.454: W/EGLview(3078): creating OpenGL ES 2.0 context
> 07-22 02:29:36.474: D/dalvikvm(3078): Trying to load lib
> /data/data/com.googlecode.android_scripting/lib/libcom_googlecode_android_s cripting_facade_ui_osgNativeLib.so
> 0x45a3f6d0
> 07-22 02:29:36.704: D/dalvikvm(3078): Added shared lib
> /data/data/com.googlecode.android_scripting/lib/libcom_googlecode_android_s cripting_facade_ui_osgNativeLib.so
> 0x45a3f6d0
> 07-22 02:29:36.704: D/dalvikvm(3078): No JNI_OnLoad found in
> /data/data/com.googlecode.android_scripting/lib/libcom_googlecode_android_s cripting_facade_ui_osgNativeLib.so
> 0x45a3f6d0, skipping init
> 07-22 02:29:36.704: W/dalvikvm(3078): No implementation found for native
> Lcom/googlecode/android_scripting/facade/ui/osgNativeLib;.init (II)V
> 07-22 02:29:36.724: W/dalvikvm(3078): threadid=13: thread exiting with
> uncaught exception (group=0x40020950)
> 07-22 02:29:36.734: E/AndroidRuntime(3078): FATAL EXCEPTION: GLThread 14
> 07-22 02:29:36.734: E/AndroidRuntime(3078):
> java.lang.UnsatisfiedLinkError: init
> 07-22 02:29:36.734: E/AndroidRuntime(3078): at
> com.googlecode.android_scripting.facade.ui.osgNativeLib.init(Native Method)
> 07-22 02:29:36.734: E/AndroidRuntime(3078): at
> com.googlecode.android_scripting.facade.ui.EGLview$Renderer.onSurfaceChange d(EGLview.java:265)
> 07-22 02:29:36.734: E/AndroidRuntime(3078): at
> android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1325)
> 07-22 02:29:36.734: E/AndroidRuntime(3078): at
> android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
> 07-22 02:34:35.995: I/Process(3078): Sending signal. PID: 3078 SIG: 9

> I think the issue migth come from the fact the native library and  the
> java/jni class are in to different project , (Common , and
> ScriptingLayerForAndroid)
> I try to change the name of the so file to match the package of the
> Java/JNI calss as it done for the Exec class in ScriptingLayerForAndroid
> project but it don't seem to work.

> Any help would be welcome


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.