diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java | 3 | ||||
-rw-r--r-- | src/main/java/org/jogamp/java3d/MasterControl.java | 22 |
2 files changed, 24 insertions, 1 deletions
diff --git a/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java b/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java index 3c97cd5..f39d5e6 100644 --- a/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java +++ b/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java @@ -8529,7 +8529,8 @@ class Jogl2es2Pipeline extends Jogl2es2DEPPipeline if (gct.getSceneAntialiasing() != GraphicsConfigTemplate.UNNECESSARY && gct.getDoubleBuffer() != GraphicsConfigTemplate.UNNECESSARY) { caps.setSampleBuffers(true); - caps.setNumSamples(2); + int numSamples = MasterControl.getIntegerProperty("j3d.numSamples", 2); + caps.setNumSamples(numSamples); } else { diff --git a/src/main/java/org/jogamp/java3d/MasterControl.java b/src/main/java/org/jogamp/java3d/MasterControl.java index ef50d81..3b7c5ac 100644 --- a/src/main/java/org/jogamp/java3d/MasterControl.java +++ b/src/main/java/org/jogamp/java3d/MasterControl.java @@ -788,6 +788,28 @@ private static String getProperty(final String prop) { }); } + static int getIntegerProperty(String prop, int defaultValue) + { + int value = defaultValue; + String propValue = getProperty(prop); + + if (propValue != null) + { + try + { + value = Integer.parseInt(propValue); + } + catch (NumberFormatException e) + { + } + } + if (J3dDebug.debug) + System.err.println("Java 3D: " + prop + "=" + value); + + return value; + } + + static boolean getBooleanProperty(String prop, boolean defaultValue, String trueMsg, |