Hi Sean, We have made lot of JNI stuff in osgVirtualPlanets. Is a the GIS library for gvSIG3D that we developed.
svn co https://devel.gvsig.org/svn/osgvp/trunk The wrappers are inside wrappers directory. Is not exactly what are you looking for, but maybe you find inspiration in the code. Cheers, Rafa. 2012/5/5 Sean K <[email protected]>: > I am looking to build a Java wrapper with JNI around the code which > basically exists inside of osgdem.cpp. > > The bulk of that code resides in vpb.dll and osgDB.dll. > > Anybody tried this? I am guessing others have already done this. > > I also want to send back the console output back to the java caller > via a java callback > > basically, > > if I wrote a JNI class named OsgDem.java > > I would write code my OsgDemTest.java like this: > > class MyOsgHandler implements OsgHander { > > @Override > void OnStatus (String output) { > System.out.println(output); > } > > @Override > void OnEnd (boolean success, String resultMsg) { > if (success) { > System.out.println("good"); > } else { > System.out.println("bad"); > } > } > } > > @Test > public void testOsgdem() { > .... > Properties global = new Properties(); > > global.load("osgdem.properties"); > OsgDem generator = new OsgDem(global); > generator.start(handler, inputTerrainPath, > inputTexturePath, outputFilePath); > > } > > > Anybody have any JNI code that I can start with to build my OsdDem? > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

