### Building the 3D packages

To build the 3D packages, you must checkout the following three CVS repositories:

- j3d-core
- j3d-core-utils
- vecmath

These three top-level directories must be named exactly as shown above and they must be sibling directories. To ensure this, run the cvs checkout command for each of the respositories from the same parent directory. For example:

`cd <cvs-root-dir>`
`cvs checkout vecmath`
`cvs checkout j3d-core`
`cvs checkout j3d-core-utils`

NOTE: you must first build the javax.vecmath package before building the javax.media.j3d and com.sun.j3d.* packages. See the README-build.html file in the "vecmath" directory for instructions.

### System Requirements

The following operating environments have been tested:

- Solaris: Sparc (Ultra60 or better) running Solaris 9 with Forte C compiler version 6.2 or GNU gcc version 3.3.2
- Linux: i386/i586 running SuSE 9 or RedHat 9.0
- Windows: Windows/XP with Microsoft Visual C++ 6.0 or the gcc that comes with MinGW version 3.1.0-1 (Windows 2000 should work, but is untested)

The following software must be installed:

- JDK 1.5.0
- Apache Ant 1.6.1
- C Compiler (Either one of the following depending on the platform)

- Solaris:

- Sun ONE Studio 8 (formerly Forte Tools)'s Compiler or GNU Compiler Collection, GCC version 3.3.2

- Linux:

- GNU Compiler Collection, GCC version 3.2.2

- Windows

- Microsoft Visual C++ 6.0 or later or GNU Compiler Collection, GCC version 3.2.3 that comes with MinGW version 3.1.0-1

### Building the 3D packages

Before you start building, your PATH must include the following directories:

- <ant-root-dir>/bin
- <jdk-root-dir>/bin
- <compiler-root-dir>/bin

The default target, jar-opt, creates an optimized jar files and native libraries.

On Amd64 platform an OutOfMemoryError can be seen. In this case set the environment variable ANT_OPTS to -Xmx256m.

Steps:

`cd <cvs-root-dir>/j3d-core
ant`

The above steps build both the Java and native code for javax.media.j3d and com.sun.j3d.* packages.

The build will be placed in j3d-core/build/<platform>/opt where <platform> is determined from the `ant echo` command:

`ant echo`

To see other targets that are available, type "ant -projecthelp". Note that ant must be run from the top-level directory.

The default compiler for native code compilation is set to "gcc". This value is set in the build.properties file located in the j3d-core directory. The compiler property is "build.comp".

On a Solaris platform with Forte compiler installed, build.comp can be set to "forte". On a Windows platform installed Visual C++, build.properties can be set to "vc".

NOTE: For Windows platform only, the property "build.rend" in build.properties can be modified to use "d3d" (Direct3D API for rendering) besides the default value "ogl".

NOTE: You can also modify the properties via command-line options to ant, for example, "ant -Dbuild.comp=vc"

### Running the 3D examples

Please refer to README-build.html in j3d-examples for details on building and running the 3D example programs.