aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes')
-rw-r--r--src/classes/jogl/javax/media/j3d/JoglPipeline.java32
-rw-r--r--src/classes/share/javax/media/j3d/MasterControl.java40
-rw-r--r--src/classes/share/javax/media/j3d/NoopPipeline.java18
-rw-r--r--src/classes/share/javax/media/j3d/Pipeline.java15
4 files changed, 2 insertions, 103 deletions
diff --git a/src/classes/jogl/javax/media/j3d/JoglPipeline.java b/src/classes/jogl/javax/media/j3d/JoglPipeline.java
index b269a56..2c4fb3d 100644
--- a/src/classes/jogl/javax/media/j3d/JoglPipeline.java
+++ b/src/classes/jogl/javax/media/j3d/JoglPipeline.java
@@ -80,10 +80,6 @@ import com.sun.opengl.util.BufferUtil;
* pipeline.
*/
class JoglPipeline extends Pipeline {
-
- // Flags indicating whether the Cg or GLSL libraries are available.
- private boolean cgLibraryAvailable = false;
-
// Currently prints for entry points not yet implemented
private static final boolean DEBUG = true;
// Currently prints for entry points already implemented
@@ -118,34 +114,6 @@ class JoglPipeline extends Pipeline {
}
/**
- * Load all of the required libraries
- */
- void loadLibraries(int globalShadingLanguage) {
- if (globalShadingLanguage == Shader.SHADING_LANGUAGE_CG) {
- // Try to load the jogl_cg library and set the
- // cgLibraryAvailable flag to true if loads successfully; note
- // that successfully performing initialization of this class
- // will cause the Cg native library to be loaded on our behalf
- try {
- Class.forName("com.sun.opengl.cg.CgGL");
- cgLibraryAvailable = true;
- } catch (Exception ex) {
- System.err.println(ex);
- } catch (Error ex) {
- System.err.println(ex);
- }
- }
- }
-
- /**
- * Returns true if the Cg library is loaded and available. Note that this
- * does not necessarily mean that Cg is supported by the graphics card.
- */
- boolean isCgLibraryAvailable() {
- return cgLibraryAvailable;
- }
-
- /**
* Returns true if the GLSL library is loaded and available. Note that this
* does not necessarily mean that GLSL is supported by the graphics card.
*/
diff --git a/src/classes/share/javax/media/j3d/MasterControl.java b/src/classes/share/javax/media/j3d/MasterControl.java
index c5f128c..3cd1841 100644
--- a/src/classes/share/javax/media/j3d/MasterControl.java
+++ b/src/classes/share/javax/media/j3d/MasterControl.java
@@ -382,11 +382,6 @@ class MasterControl {
// to control this.
boolean stencilClear = false;
- // The global shading language being used. Using a ShaderProgram
- // with a shading language other than the one specified by
- // globalShadingLanguage will cause a ShaderError to be generated,
- static int globalShadingLanguage = Shader.SHADING_LANGUAGE_GLSL;
-
// Flags indicating whether the Cg or GLSL libraries are available; we still need
// to check for the actual extension support when the Canvas3D with its associated context
// is created. Note that these are qualifed by the above globalShadingLanguage, so at
@@ -931,39 +926,8 @@ class MasterControl {
}
// Construct the singleton Pipeline instance
- Pipeline.createPipeline(pipelineType);
-
- // Get the global j3d.shadingLanguage system property
- final String slStr = getProperty("j3d.shadingLanguage");
- if (slStr != null) {
- boolean found = false;
- if (slStr.equals("GLSL")) {
- globalShadingLanguage = Shader.SHADING_LANGUAGE_GLSL;
- found = true;
- } else if (slStr.equals("Cg")) {
- globalShadingLanguage = Shader.SHADING_LANGUAGE_CG;
- found = true;
- }
-
- if (found) {
- System.err.println("Java 3D: Setting global shading language to " + slStr);
- } else {
- System.err.println("Java 3D: Unrecognized shading language: " + slStr);
- }
- }
-
- // Load all required libraries
- Pipeline.getPipeline().loadLibraries(globalShadingLanguage);
-
- // Check whether the Cg library is available
- if (globalShadingLanguage == Shader.SHADING_LANGUAGE_CG) {
- cgLibraryAvailable = Pipeline.getPipeline().isCgLibraryAvailable();
- }
-
- // Check whether the GLSL library is available
- if (globalShadingLanguage == Shader.SHADING_LANGUAGE_GLSL) {
- glslLibraryAvailable = Pipeline.getPipeline().isGLSLLibraryAvailable();
- }
+ Pipeline.createPipeline(pipelineType);
+ glslLibraryAvailable = Pipeline.getPipeline().isGLSLLibraryAvailable();
assert !(glslLibraryAvailable && cgLibraryAvailable) :
"ERROR: cannot support both GLSL and CG at the same time";
diff --git a/src/classes/share/javax/media/j3d/NoopPipeline.java b/src/classes/share/javax/media/j3d/NoopPipeline.java
index 5a7deaa..8c68119 100644
--- a/src/classes/share/javax/media/j3d/NoopPipeline.java
+++ b/src/classes/share/javax/media/j3d/NoopPipeline.java
@@ -40,10 +40,6 @@ import java.awt.GraphicsEnvironment;
* pipeline.
*/
class NoopPipeline extends Pipeline {
-
- // Flags indicating whether the Cg or GLSL libraries are available.
- private boolean cgLibraryAvailable = false;
-
/**
* Constructor for singleton NoopPipeline instance
*/
@@ -60,20 +56,6 @@ class NoopPipeline extends Pipeline {
}
/**
- * Load all of the required libraries
- */
- void loadLibraries(int globalShadingLanguage) {
- }
-
- /**
- * Returns true if the Cg library is loaded and available. Note that this
- * does not necessarily mean that Cg is supported by the graphics card.
- */
- boolean isCgLibraryAvailable() {
- return cgLibraryAvailable;
- }
-
- /**
* Returns true if the GLSL library is loaded and available. Note that this
* does not necessarily mean that GLSL is supported by the graphics card.
*/
diff --git a/src/classes/share/javax/media/j3d/Pipeline.java b/src/classes/share/javax/media/j3d/Pipeline.java
index 264d616..a6b7ba0 100644
--- a/src/classes/share/javax/media/j3d/Pipeline.java
+++ b/src/classes/share/javax/media/j3d/Pipeline.java
@@ -157,21 +157,6 @@ public Pipeline run() {
// ---------------------------------------------------------------------
- //
- // Methods to initialize and load required libraries (from MasterControl)
- //
-
- /**
- * Load all of the required libraries
- */
- abstract void loadLibraries(int globalShadingLanguage);
-
- /**
- * Returns true if the Cg library is loaded and available. Note that this
- * does not necessarily mean that Cg is supported by the graphics card.
- */
- abstract boolean isCgLibraryAvailable();
-
/**
* Returns true if the GLSL library is loaded and available. Note that this
* does not necessarily mean that GLSL is supported by the graphics card.