From: Kenneth B. R. <kbr...@al...> - 2003-07-07 08:34:44
|
Hi Sven, I'm one of the two co-authors of Jogl (Chris Kline is the other) and the initiator of the project. We began developing Jogl because we wanted to use the latest OpenGL 1.4 features and extending and maintaining GL4Java had become too difficult due to the large amounts of legacy code and native code. (You'll remember I was an active developer of GL4Java for over a year and contributed its JAWT, New I/O and GLDrawable/GLEventListener support.) Jogl is a completely new source base. There is no code relationship between it and any other OpenGL binding for Java, GL4Java included. Concepts have been borrowed liberally from, in particular, GL4Java and Magician, but all of the code is new. Major architectural differences between Jogl and GL4Java include: - Jogl is written almost completely in Java. There are about 50 lines of handwritten C code in the entire project. This was made possible with a new tool called GlueGen, a glue code generator with some of the same properties as GL4Java's C2J but which is powerful enough to generate Java-level accessors for concepts like C structs and function pointers. We bound the low-level JAWT, WGL and GLX routines into Java first and then built the OpenGL context implementations on top of them. Having all of the low-level APIs exposed to Java (though not necessarily to the end user) makes it much easier to extend the framework. - The notion of the OpenGL context has been removed from the public API. This is an important change because it makes the implementation more robust and makes it easier to perform certain kinds of optimizations. It also hides a lot of unnecessary complexity from the end user and makes it easier to extend the framework; pbuffer support was added to Jogl with very few public API changes. - GLCanvas and GLJPanel are now final classes. The only way to interact with OpenGL is now through the GLEventListener interface. This change eliminates the primary source of errors I have seen reported over the past couple of years on the GL4Java mailing list, namely subclassing e.g. GLCanvas and forgetting to perform some of the context manipulation the superclass had been doing. (Note that some Jogl users have provided good reasons why these classes should be subclassable, so this may change, but all of the methods related to OpenGL context management will remain final.) - Animation support has been factored out into an Animator class, so there are no longer GLAnimCanvas and GLAnimJPanel classes. - Jogl includes Magician's notion of a composable pipeline, in particular the DebugGL concept. This makes debugging OpenGL applications much easier and in fact I think it makes OpenGL applications written in Java easier to debug than the same application written in C. Jogl (which includes GlueGen) is open source under the BSD license. It can be checked out via cvs; instructions are at http://jogl.dev.java.net/ . It may be necessary to sign up as an Observer of the project; I'm not sure whether the guest cvs accounts are working. Currently the development team (i.e. the number of people who have commit access to the repository) is small and I think we'll probably be keeping that number small. However, I'm personally very open to accepting new developers, at least once all of the processes around this have been figured out; currently I'm not involved with this planning. I think we'll have a code review process so there can be some validation of changes going in to the source base. I hope you and the other GL4Java developers will join the Jogl project instead of starting a new one. Jogl was designed to be a clean and minimal, yet full-featured, system and I think we've achieved those goals. I think it's a good base to extend and to build on top of. There are some fairly advanced Jogl demos, many ported from NVidia's sources, at http://jogl-demos.dev.java.net/ ; check them out from the CVS repository or grab the demo binaries from the Files section of http://jogl.dev.java.net/ . We showed these and other demos in a talk at this year's JavaOne conference; slides for technical session 2125, "Advanced OpenGL for the Java Platform", can be found linked off of http://servlet.java.sun.com/javaone/sf2003/conf/sessions/48-all-regular.en.jsp . -Ken |