OpenSceneGraph/examples/osgAndroidExampleGLES1/src/osg/AndroidExample/osgNativeLib.java
Robert Osfield 8d613019ce From Jorge Ciges, "two clean example viewers (GLES1/2) that permit load models withouth recompiling by options in the menu and some basic options. basic options.
As Rafa and I told you earlier this can't be integrated in the CMAKE chain. It needs to be compiled by the user out of the OSG standard compilation. It could be stored in the examples. That way users will not come here asking for the examples.

Main characteristics are:

-Menu with loading and unloading by path.
-Return to home view
-Keyboard capabilities with manipilator switch and basic state changing.
-Change color screen.
-Osg log bypassed to LogCat (This comes practically straight from Marcin Hajder example I've only added personal TAG)
-Earmbi / Earmbi V7
-Install to SD (if the device supports the feature)

And that's all. Now I'm looking to fix the environmental mapping with true GLES (it does not work well in Android) I will try to make it in time for 3.0. The other work that i'm studying Dynamic build with Android but that will need a lot of time to test.
2011-06-09 14:11:04 +00:00

29 lines
1.1 KiB
Java

package osg.AndroidExample;
public class osgNativeLib {
static {
System.loadLibrary("osgNativeLib");
}
/**
* @param width the current view width
* @param height the current view height
*/
public static native void init(int width, int height);
public static native void step();
public static native void clearContents();
public static native void mouseButtonPressEvent(float x,float y, int button);
public static native void mouseButtonReleaseEvent(float x,float y, int button);
public static native void mouseMoveEvent(float x,float y);
public static native void keyboardDown(int key);
public static native void keyboardUp(int key);
public static native void setClearColor(int red,int green, int blue);
public static native int[] getClearColor();
public static native void loadObject(String address);
public static native void loadObject(String address,String name);
public static native void unLoadObject(int number);
public static native String[] getObjectNames();
}