Using a custom OpenGL Library under Windows

Tested OpenGL Libraries

Common

To allow using software rendering (not D3D) w/ Mesa3D:

AWT’s Direct Draw Usage

To disable Direct Draw usage within AWT’s Java2D:

AWT’s OpenGL Usage

To disable OpenGL usage within AWT’s Java2D:

This is required if using the zero deployment method, i.e. avoiding having the JVM load a different OpenGL library.

Systemwide Deployment

To using software rendering (not D3D) w/ Mesa3D and Java’s AWT:

Zero Deployment

Using PATH environment variable

To pick up the custom library from its random path and using software rendering (not D3D) w/ Mesa3D and Java’s AWT:

See AWT's OpenGL Usage remarks above.

Using jogamp.primary.library.path property at runtime

The OpenGL implementation can also be selected at runtime before the OpenGL library has loaded, i.e. before JOGL’s initialization.

One can set the new property jogamp.primary.library.path containing the usual OS path-separated paths to search for a custom OpenGL library.

  System.setProperty("jogamp.primary.library.path", "C:\\Mesa3D\x64");

In this case, the PATH can be left untouched.

See AWT's OpenGL Usage remarks above.

Per Application Deployment

Same as Zero Deployment, but PATH setting can be skipped.