Thursday, June 9, 2011

Update 06/09/2011

The nature of the problem rendering the applet is given below.  As mentioned in my prior post, the compilation process works fine.  (By the way, I notice that there are multiple versions of jogl.dll out there - two of which I have installed on my machine (not realized until started fiddling with them) - wigwam requires the version where GLEventListener is part of the com.javax.media package while there's another where the GLEventListener is part of the net.java.games.jogl package.  Given the fundamental nature by which these versions differ (same class in completely different packages) not surprisingly, the wigwam project won't compile with the second one, only the first, and other projects which I've been experimenting with to get this to work require the other one.)

Anyway, after compilation of the wigwam project, in NetBeans, I go to render it in the browser by navigating to the Files exporer window for the project, selecting the launch.html (created during compilation),  right-clicking on the file, and selecting "View" from the pop-up menu.  This process yields the following:


This problem is likely due to a configuration error associated with jogl.  My workstation is configured as follows:

1.  The wigwam project includes a reference to jogl.jar.
2.  The java sdk bin directory, jdk1.6.0_21/bin, has the following dlls in it:  jogl.dll, jogl_cg.dll.

I have tried creating various other simple (non-applet) projects that verify the usefulness of jogl.jar, jogl.dll, jogl_cg.dll - that is by adding them and removing them and seeing how that affects the compilation and execution of the non-applet test project.  As expected, jogl.jar is required for proper compilation of the test project, jogl.dll, jogl_cg.dll is required for proper execution of the non-applet project.  It was never required to actually have the jogl_rt.dll installed.  However, this may be because the simple code did not require it.  However,  I followed instructions downloaded  from http://csis.pace.edu/~marchese/CG/JOGL/Jogl1l.htm, which did not indicate this was necessary.  However, is it possible this site is outdated?

In order to make sure that there is nothing wrong with the NetBeans installation and its interaction with the Google Chrome browser, I created a simple HelloWorld applet that renders correctly as follows:


So, this verifies that the basic installation of NetBeans, Chrome, the java virtual machine in the browser are all running properly.  This leaves some element of the installation of JOGL libraries.

Based on this, other things I've thought of trying include the following:

1.  Try other version of jogl.dll (that goes with other version of the jogl.jar).
2.  Add gluegen-rt.jar to the mix.  Is this jar required after all - certainly the wigwam code compiles without it.
3.  Add gluegen-rt.dll to the jdk1.6.0_u21/bin folder.

Again, emails with the prior developer Clayton did not indicate a need for gluegen-rt, nor did documentation found on the internet, but since nothing is working, I'm open to any ideas.

Any other suggestions are welcome.

2 comments:

  1. There is already a deployment of virtual wigwam at http://www.ccd.rpi.edu/eglash/csdt/na/arcs/VirtualWigwam/index.html

    Perhaps you can simply grab all the files there by ftp-ing into www.ccd.rpi.edu and going to the corresponding folder, replacing the wigwam jar file there with yours, signing them all and placing them in your web space. To start the program locally, you may double-click on the .jnlp file.

    ReplyDelete
  2. Thanks for the input. However, let me clarify the nature of the problem, as I may be misunderstanding your suggestion. My need is to be able to download the source code from svn, compile it, and run the resulting wigwam.jar file locally within my browser so that I have a working development environment in which I can make changes to be eventually deployed to this site you mention. However, although I can compile the code modules, they don't render properly in the browser, as outlined in the above post. I'm not sure I understand how retrieving the pre-compiled jar files from the deployment server will help get that base set of source code from which I can make further development enhancements.

    Are you making this suggestion based on the idea the jar file on the deployment site will contain all of the .jar files needed for successful execution of the code? that's true - but if there were jar files needed that I didn't have, the code wouldn't compile in the first place (which it's doing successfully). My guess is there is a set of dlls and locations to which they need to be installed on the machine in order to make this applet *execute*.

    I think this is a problem with the NATIVE libraries either note being seen by the operating system or by NetBeans - I wouldn't think that viewing in the browser would be NetBeans dependent. However, I'm looking into that anyway.

    Can you tell me what path entry you have in your path environment variable - specifically - what are the entries related to jogl - jogl_awt.dll? jogl.dll? gluegen-rt.dll? all of them?

    ReplyDelete