aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorphil <[email protected]>2016-10-31 19:33:16 +1300
committerphil <[email protected]>2016-10-31 19:33:16 +1300
commit0c363e3cbeb216713e586968e3d6b5132b25e4ae (patch)
tree0930e85fb317d2f65d5732e5f6b9ac4ac98982ba /src/main/java/org
parent917d2938fd3f9bd1745a3a955bb55b5ca124f8e4 (diff)
j3dcore: allow Java3D to operate in headless mode when using the noop
renderer
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/jogamp/java3d/MasterControl.java5
-rw-r--r--src/main/java/org/jogamp/java3d/VirtualUniverse.java7
2 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/org/jogamp/java3d/MasterControl.java b/src/main/java/org/jogamp/java3d/MasterControl.java
index 3b7c5ac..d5a9684 100644
--- a/src/main/java/org/jogamp/java3d/MasterControl.java
+++ b/src/main/java/org/jogamp/java3d/MasterControl.java
@@ -866,6 +866,11 @@ private static String getProperty(final String prop) {
// Use default pipeline
}
+ // Java 3D cannot run in headless mode unless using the noop renderer
+ if (java.awt.GraphicsEnvironment.isHeadless() && pipelineType != Pipeline.Type.NOOP) {
+ throw new java.awt.HeadlessException();
+ }
+
// Construct the singleton Pipeline instance
Pipeline.createPipeline(pipelineType);
diff --git a/src/main/java/org/jogamp/java3d/VirtualUniverse.java b/src/main/java/org/jogamp/java3d/VirtualUniverse.java
index d369434..4c68e60 100644
--- a/src/main/java/org/jogamp/java3d/VirtualUniverse.java
+++ b/src/main/java/org/jogamp/java3d/VirtualUniverse.java
@@ -262,13 +262,6 @@ ArrayList<Integer> viewIdFreeList = new ArrayList<Integer>();
}
}
- // Java 3D cannot run in headless mode, so we will throw a
- // HeadlessException if isHeadless() is true. This avoids a
- // cryptic error message from MasterControl.loadLibraries().
- if (java.awt.GraphicsEnvironment.isHeadless()) {
- throw new java.awt.HeadlessException();
- }
-
// Load the native libraries and create the static
// MasterControl object
MasterControl.loadLibraries();