Hardware
We ran PLG on two Dell Windows XP computers, and kept a CVS repository of our work on the third computer, a Dell with Fedora Core 3. Running PLG was sometimes taxing for these machines, and we did some code optomization such as object reuse so that our prototype would run more quickly.
Setup
Setting up Project Looking Glass and starting implementation using Eclipse was a challenge in itself. The first steps were:
- Install Fedora Core 3
- Update the graphics drivers
- Install Java 1.5
- Install Java Advanced Imaging API
- Install Java 3D
- Install Eclipse 3.1
Then, to complete the process of setting up a PLG development environment -
Download the Source
- Get a java.net account
- In Eclipse, switch to the "CVS Repository Exploring" perspective
- Add the java.net cvs server as a repository
- CVS Server Type: pserver
- CVS Server Name: dev.java.net
- User Name: <enter your java.net user name>
- Password: <enter your java.net password>
- Repository Path: /cvs
- Expand the CVS Tree under HEAD
- Right click on '''lg3d-core''' and choose "Check out"
- This should download the latest source from the CVS
- Wait for the download to complete
Build the Core
- Switch to the Resource perspective
- Open up the lg3d-core/build.xml file in the file editor and comment out the following lines:
- Line 5:
<property location="../../../bin" name="daily.bin"/>
- Line 106:
<antcall target="compile-x11"/>
- Line 111: in the "compile" target
<antcall target="compile-demo-apps"/>
- Line 287-289: in the "release" target
<fileset dir="${incubator.ext.dir}">
<include name="**"/>
</fileset>
- Line 297: in the "release" target
<ant inheritAll="false" dir="${incubator.dir}" target="release-incubator"/>
- Bring up the Ant Window from the Menu: Window > Show View > Ant
- Add the buid.xml file into the Ant window.
- Double-click on the "All" Target to build lg3d-core
- Double-click on the "release" Target to build the release directories
- You may need to right-click on the lg3d-core resource and choose "Refresh". This helps eclipse discover all of the files created during the build process. Without this, later setps will not find the correct files.
Create a Project
- Create a new Java project in Eclipse
- Under the "Libraries" tab, choose "Add JARs"
- Add the following JARs
- lg3d-core/release/lg3d/lib/ext/lg3d-core.jar
- lg3d-core/release/lg3d/ext/escher-0.2.2.lg.jar
- lg3d-core/release/lg3d/ext/nwn-0.7.jar
- lg3d-core/release/lg3d/ext/odejava.jar
- lg3d-core/release/lg3d/ext/satin-v2.3.jar
- Also under the "Libraries" tab, choose "Add Class Folder"
- Add the following class folder
Create a Run Configuration
- Create a new config. as a "Java Application"
- Make sure the main class is HelloWorld
- In the Arguments tab, in the VM arguments field, enter:
- ''Note, the path to your workspace (/home/developer/workspace) may be different.''
- -Dlg.etcdir=/home/developer/workspace/lg3d-core/release/lg3d/etc/
- -Dlg.configurl=file:///home/developer/workspace/lg3d-core/release/lg3d/etc/lg3d/lgconfig_1p_nox.xml
- If you don't want to run full-screen lg3d, add this line:
-Dlg.displayconfigurl=file:////home/developer/workspace/lg3d-core/release/lg3d/etc/lg3d/displayconfig/j3d1x1
- Also, you may need these:
-Xincgc -Xmx512m -Dj3d.sortShape3DBounds="true"
- On Windows, the system properties will look like this:
-Dlg.etcdir=c:/workspace/lg3d-core/release/lg3d/etc/
-Dlg.configurl=file:///c:/workspace/lg3d-core/release/lg3d/etc/lg3d/lgconfig_1p_nox.xml
-Dlg.displayconfigurl=file:///c:/workspace/lg3d-core/release/lg3d/etc/lg3d/displayconfig/j3d1x1