Hi Pavel, We used Java and OpenGL intensively several years in the scope of the Project gvSIG 3D [1]. We created a library called osgVirtualPlanets[2] which had suffered various refactors. In a first instance it was a Java project, but it evolved over the years to become a C++ library with Java wrappers. The OSG hadn't change too much to not be able to work with it from Java in the same way.
The majority of elements of the scene graph have its equivalent in Java, and the communication between Java and C++ code was done using JNI. So you have amost all the most important classes to manage the scenegraph. The project uses Maven and CMake for building. The main problem we had was about memory managing, as a Node for the Java part is only a native pointer to the C++ node. Java did not was aware of the amount of memory that a pointer was holding, so the garbaje collector did not release memory as frequently as we wanted. We implemented some different techniques to release memory and to handle the scenegraph. We managed to get quite good results, but unfortunately the project run out of funds, so now is discontinued (or in a standby state). So definitively it is possible to use OSG intensively in Java, take a look to osgVP for inspiration. Hope it helps. [1] http://gvsig3d.blogspot.com [2] https://devel.gvsig.org/redmine/projects/osgvp/ 2014-05-14 17:23 GMT+02:00 Pavel Stepanek <[email protected]>: > Hi, > > I would like to ask whether OSG can be used with JOGL. > > Yes, I found some threads about the topic, but they are quite old and the > solution seems to be not seamless. > > I would like to have multiple viewers (JOGL canvases, etc.) sharing OpenGL > contexts. Also multi-threading should be supported. > > Thank you for any help! > Pavel > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=59409#59409 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Jordi Torres
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

