aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/share/javax
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2012-05-03 15:27:34 -0700
committerHarvey Harrison <[email protected]>2012-05-03 15:41:25 -0700
commit0ac3ead097fa4dc1e7de354ae4042c6d851a4f47 (patch)
tree4f22fccf2f93486d15d725e30ec028f4a257d063 /src/classes/share/javax
parentd1ad9b0279a450d52287e2c34c012aacbbc2566b (diff)
j3dcore: remove all CG-shader support code (well, most of it anyways)
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/classes/share/javax')
-rw-r--r--src/classes/share/javax/media/j3d/Canvas3D.java37
-rw-r--r--src/classes/share/javax/media/j3d/CgShaderProgram.java192
-rw-r--r--src/classes/share/javax/media/j3d/CgShaderProgramRetained.java404
-rw-r--r--src/classes/share/javax/media/j3d/NoopPipeline.java200
-rw-r--r--src/classes/share/javax/media/j3d/Pipeline.java143
5 files changed, 15 insertions, 961 deletions
diff --git a/src/classes/share/javax/media/j3d/Canvas3D.java b/src/classes/share/javax/media/j3d/Canvas3D.java
index d4f1ad6..d9d52a5 100644
--- a/src/classes/share/javax/media/j3d/Canvas3D.java
+++ b/src/classes/share/javax/media/j3d/Canvas3D.java
@@ -479,7 +479,6 @@ public class Canvas3D extends Canvas {
// True if shadingLanguage is supported, otherwise false.
boolean shadingLanguageGLSL = false;
- boolean shadingLanguageCg = false;
// Query properties
J3dQueryProps queryProps;
@@ -2462,8 +2461,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine
this.fbConfig,
shareCtx, isSharedCtx,
this.offScreen,
- VirtualUniverse.mc.glslLibraryAvailable,
- VirtualUniverse.mc.cgLibraryAvailable);
+ VirtualUniverse.mc.glslLibraryAvailable);
// compute the max available texture units
maxAvailableTextureUnits = Math.max(maxTextureUnits, maxTextureImageUnits);
@@ -3156,16 +3154,11 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine
// Call queryProperties to ensure that the shading language flags are valid
queryProperties();
- // Return flag for specified shading language
- switch (shadingLanguage) {
- case Shader.SHADING_LANGUAGE_GLSL:
- return shadingLanguageGLSL;
- case Shader.SHADING_LANGUAGE_CG:
- return shadingLanguageCg;
- }
+ if (shadingLanguage == Shader.SHADING_LANGUAGE_GLSL)
+ return shadingLanguageGLSL;
- return false;
- }
+ return false;
+ }
/**
@@ -3696,9 +3689,8 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine
// inside the native code after setting the various
// fields in this object
createQueryContext(screen.display, drawable,
- fbConfig, offScreen, 1, 1,
- VirtualUniverse.mc.glslLibraryAvailable,
- VirtualUniverse.mc.cgLibraryAvailable);
+ fbConfig, offScreen, 1, 1,
+ VirtualUniverse.mc.glslLibraryAvailable);
// compute the max available texture units
maxAvailableTextureUnits = Math.max(maxTextureUnits, maxTextureImageUnits);
}
@@ -3839,9 +3831,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine
keys.add("shadingLanguageGLSL");
values.add(new Boolean(shadingLanguageGLSL));
- keys.add("shadingLanguageCg");
- values.add(new Boolean(shadingLanguageCg));
-
keys.add("native.version");
values.add(nativeGraphicsVersion);
@@ -4918,23 +4907,19 @@ void addTextureResource(int id, TextureRetained obj) {
private Context createNewContext(long display, Drawable drawable,
long fbConfig, Context shareCtx, boolean isSharedCtx,
boolean offScreen,
- boolean glslLibraryAvailable,
- boolean cgLibraryAvailable) {
+ boolean glslLibraryAvailable) {
return Pipeline.getPipeline().createNewContext(this, display, drawable,
fbConfig, shareCtx, isSharedCtx,
offScreen,
- glslLibraryAvailable,
- cgLibraryAvailable);
+ glslLibraryAvailable);
}
private void createQueryContext(long display, Drawable drawable,
long fbConfig, boolean offScreen, int width, int height,
- boolean glslLibraryAvailable,
- boolean cgLibraryAvailable) {
+ boolean glslLibraryAvailable) {
Pipeline.getPipeline().createQueryContext(this, display, drawable,
fbConfig, offScreen, width, height,
- glslLibraryAvailable,
- cgLibraryAvailable);
+ glslLibraryAvailable);
}
// This is the native for creating offscreen buffer
diff --git a/src/classes/share/javax/media/j3d/CgShaderProgram.java b/src/classes/share/javax/media/j3d/CgShaderProgram.java
deleted file mode 100644
index e5f0e76..0000000
--- a/src/classes/share/javax/media/j3d/CgShaderProgram.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * $RCSfile$
- *
- * Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * $Revision$
- * $Date$
- * $State$
- */
-
-package javax.media.j3d;
-
-/**
- * The CgShaderProgram object is a concrete implementation of a
- * ShaderProgram node component for NVIDIA's Cg shader language.
- *
- * @see SourceCodeShader
- *
- * @since Java 3D 1.4
- */
-
-public class CgShaderProgram extends ShaderProgram {
-
- /**
- * Constructs a Cg shader program node component.
- *
- * <br>
- * TODO: ADD MORE DOCUMENTATION HERE.
- */
- public CgShaderProgram() {
- }
-
- // Implement abstract setVertexAttrNames method (inherit javadoc from parent class)
- public void setVertexAttrNames(String[] vertexAttrNames) {
- checkForLiveOrCompiled();
-
- if (vertexAttrNames != null) {
- for (int i = 0; i < vertexAttrNames.length; i++) {
- if (vertexAttrNames[i] == null) {
- throw new NullPointerException();
- }
- }
- }
-
- ((CgShaderProgramRetained)this.retained).setVertexAttrNames(vertexAttrNames);
- }
-
- // Implement abstract getVertexAttrNames method (inherit javadoc from parent class)
- public String[] getVertexAttrNames() {
-
- if (isLiveOrCompiled()) {
- if(!this.getCapability(ALLOW_NAMES_READ)) {
- throw new CapabilityNotSetException(J3dI18N.getString("CgShaderProgram0"));
- }
- }
-
- return ((CgShaderProgramRetained)this.retained).getVertexAttrNames();
- }
-
- // Implement abstract setShaderAttrNames method (inherit javadoc from parent class)
- public void setShaderAttrNames(String[] shaderAttrNames) {
- checkForLiveOrCompiled();
-
- if (shaderAttrNames != null) {
- for (int i = 0; i < shaderAttrNames.length; i++) {
- if (shaderAttrNames[i] == null) {
- throw new NullPointerException();
- }
- }
- }
-
- ((CgShaderProgramRetained)this.retained).setShaderAttrNames(shaderAttrNames);
- }
-
- // Implement abstract getShaderAttrNames method (inherit javadoc from parent class)
- public String[] getShaderAttrNames() {
-
- if (isLiveOrCompiled()) {
- if(!this.getCapability(ALLOW_NAMES_READ)) {
- throw new CapabilityNotSetException(J3dI18N.getString("CgShaderProgram0"));
- }
- }
-
- return ((CgShaderProgramRetained)this.retained).getShaderAttrNames();
- }
-
- /**
- * Copies the specified array of shaders into this shader
- * program. This method makes a shallow copy of the array. The
- * array of shaders may be null or empty (0 length), but the
- * elements of the array must be non-null. The shading language of
- * each shader in the array must be
- * <code>SHADING_LANGUAGE_CG</code>. Each shader in the array must
- * be a SourceCodeShader. There must be no more than one vertex shader
- * and one fragment shader in the array.
- *
- * @param shaders array of Shader objects to be copied into this
- * ShaderProgram
- *
- * @exception CapabilityNotSetException if appropriate capability is
- * not set and this object is part of live or compiled scene graph
- *
- * @exception IllegalArgumentException if the shading language of
- * any shader in the shaders array is <em>not</em>
- * <code>SHADING_LANGUAGE_CG</code>.
- *
- * @exception IllegalArgumentException if there are more than one
- * vertex shader or more than one fragment shader in the shaders
- * array.
- *
- * @exception ClassCastException if any shader in the shaders
- * array is <em>not</em> a SourceCodeShader.
- */
- public void setShaders(Shader[] shaders) {
- checkForLiveOrCompiled();
-
- if (shaders != null) {
- // Check shaders for valid shading language, class type, etc.
- for (int i = 0; i < shaders.length; i++) {
- boolean hasVertexShader = false;
- boolean hasFragmentShader = false;
-
- // Check shading language
- if (shaders[i].getShadingLanguage() != Shader.SHADING_LANGUAGE_CG) {
- throw new IllegalArgumentException(J3dI18N.getString("CgShaderProgram2"));
- }
-
- // Check for more than one vertex shader or fragment shader
- if (shaders[i].getShaderType() == Shader.SHADER_TYPE_VERTEX) {
- if (hasVertexShader) {
- throw new IllegalArgumentException(J3dI18N.getString("CgShaderProgram3"));
- }
- hasVertexShader = true;
- }
- else { // Shader.SHADER_TYPE_FRAGMENT
- if (hasFragmentShader) {
- throw new IllegalArgumentException(J3dI18N.getString("CgShaderProgram4"));
- }
- hasFragmentShader = true;
- }
-
- // Try to cast shader to SourceCodeShader; it will throw
- // ClassCastException if it isn't.
- SourceCodeShader shad = (SourceCodeShader)shaders[i];
- }
- }
-
- ((CgShaderProgramRetained)this.retained).setShaders(shaders);
- }
-
- // Implement abstract getShaders method (inherit javadoc from parent class)
- public Shader[] getShaders() {
- if (isLiveOrCompiled()) {
- if(!this.getCapability(ALLOW_SHADERS_READ)) {
- throw new CapabilityNotSetException(J3dI18N.getString("CgShaderProgram1"));
- }
- }
-
- return ((CgShaderProgramRetained)this.retained).getShaders();
- }
-
- /**
- * Creates a retained mode CgShaderProgramRetained object that this
- * CgShaderProgram component object will point to.
- */
- void createRetained() {
- this.retained = new CgShaderProgramRetained();
- this.retained.setSource(this);
- }
-
-}
diff --git a/src/classes/share/javax/media/j3d/CgShaderProgramRetained.java b/src/classes/share/javax/media/j3d/CgShaderProgramRetained.java
deleted file mode 100644
index 36eca1e..0000000
--- a/src/classes/share/javax/media/j3d/CgShaderProgramRetained.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * $RCSfile$
- *
- * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * $Revision$
- * $Date$
- * $State$
- */
-
-package javax.media.j3d;
-
-/**
- * The CgShaderProgram object is a concrete implementation of a
- * ShaderProgram node component for NVIDIA's Cg shader language.
- */
-
-class CgShaderProgramRetained extends ShaderProgramRetained {
-
- /**
- * Constructs a Cg shader program node component.
- */
- CgShaderProgramRetained() {
- }
-
- synchronized void createMirrorObject() {
- // System.err.println("CgShaderProgramRetained : createMirrorObject");
- // This method should only call by setLive().
- if (mirror == null) {
- CgShaderProgramRetained mirrorCgSP = new CgShaderProgramRetained();
- mirror = mirrorCgSP;
- }
- initMirrorObject();
- }
-
- // ShaderAttributeValue methods
-
- ShaderError setUniform1i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int value) {
-
- return Pipeline.getPipeline().setCgUniform1i(ctx,
- shaderProgramId,
- uniformLocation,
- value);
- }
-
- ShaderError setUniform1f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float value) {
-
- return Pipeline.getPipeline().setCgUniform1f(ctx,
- shaderProgramId,
- uniformLocation,
- value);
- }
-
- ShaderError setUniform2i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int[] value) {
-
- return Pipeline.getPipeline().setCgUniform2i(ctx,
- shaderProgramId,
- uniformLocation,
- value);
- }
-
- ShaderError setUniform2f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniform2f(ctx,
- shaderProgramId,
- uniformLocation,
- value);
- }
-
- ShaderError setUniform3i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int[] value) {
-
- return Pipeline.getPipeline().setCgUniform3i(ctx,
- shaderProgramId,
- uniformLocation,
- value);
- }
-
- ShaderError setUniform3f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniform3f(ctx,
- shaderProgramId,
- uniformLocation,
- value);
- }
-
- ShaderError setUniform4i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int[] value) {
-
- return Pipeline.getPipeline().setCgUniform4i(ctx,
- shaderProgramId,
- uniformLocation,
- value);
- }
-
- ShaderError setUniform4f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniform4f(ctx,
- shaderProgramId,
- uniformLocation,
- value);
- }
-
- ShaderError setUniformMatrix3f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniformMatrix3f(ctx,
- shaderProgramId,
- uniformLocation,
- value);
- }
-
- ShaderError setUniformMatrix4f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniformMatrix4f(ctx,
- shaderProgramId,
- uniformLocation,
- value);
- }
-
- // ShaderAttributeArray methods
-
- ShaderError setUniform1iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value) {
-
- return Pipeline.getPipeline().setCgUniform1iArray(ctx,
- shaderProgramId,
- uniformLocation,
- numElements,
- value);
- }
-
- ShaderError setUniform1fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniform1fArray(ctx,
- shaderProgramId,
- uniformLocation,
- numElements,
- value);
- }
-
- ShaderError setUniform2iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value) {
-
- return Pipeline.getPipeline().setCgUniform2iArray(ctx,
- shaderProgramId,
- uniformLocation,
- numElements,
- value);
- }
-
- ShaderError setUniform2fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniform2fArray(ctx,
- shaderProgramId,
- uniformLocation,
- numElements,
- value);
- }
-
- ShaderError setUniform3iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value) {
-
- return Pipeline.getPipeline().setCgUniform3iArray(ctx,
- shaderProgramId,
- uniformLocation,
- numElements,
- value);
- }
-
- ShaderError setUniform3fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniform3fArray(ctx,
- shaderProgramId,
- uniformLocation,
- numElements,
- value);
- }
-
- ShaderError setUniform4iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value) {
-
- return Pipeline.getPipeline().setCgUniform4iArray(ctx,
- shaderProgramId,
- uniformLocation,
- numElements,
- value);
- }
-
- ShaderError setUniform4fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniform4fArray(ctx,
- shaderProgramId,
- uniformLocation,
- numElements,
- value);
- }
-
- ShaderError setUniformMatrix3fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniformMatrix3fArray(ctx,
- shaderProgramId,
- uniformLocation,
- numElements,
- value);
- }
-
- ShaderError setUniformMatrix4fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
-
- return Pipeline.getPipeline().setCgUniformMatrix4fArray(ctx,
- shaderProgramId,
- uniformLocation,
- numElements,
- value);
- }
-
-
- /**
- * Method to return a flag indicating whether this
- * ShaderProgram is supported on the specified Canvas.
- */
- boolean isSupported(Canvas3D cv) {
- return cv.shadingLanguageCg;
- }
-
- /**
- * Method to create the native shader.
- */
- ShaderError createShader(Context ctx, ShaderRetained shader, ShaderId[] shaderIdArr) {
- return Pipeline.getPipeline().createCgShader(ctx, shader.shaderType, shaderIdArr);
- }
-
- /**
- * Method to destroy the native shader.
- */
- ShaderError destroyShader(Context ctx, ShaderId shaderId) {
- return Pipeline.getPipeline().destroyCgShader(ctx, shaderId);
- }
-
- /**
- * Method to compile the native shader.
- */
- ShaderError compileShader(Context ctx, ShaderId shaderId, String source) {
- return Pipeline.getPipeline().compileCgShader(ctx, shaderId, source );
- }
-
- /**
- * Method to create the native shader program.
- */
- ShaderError createShaderProgram(Context ctx, ShaderProgramId[] shaderProgramIdArr) {
- return Pipeline.getPipeline().createCgShaderProgram(ctx, shaderProgramIdArr);
- }
-
- /**
- * Method to destroy the native shader program.
- */
- ShaderError destroyShaderProgram(Context ctx, ShaderProgramId shaderProgramId) {
- return Pipeline.getPipeline().destroyCgShaderProgram(ctx, shaderProgramId);
- }
-
- /**
- * Method to link the native shader program.
- */
- ShaderError linkShaderProgram(Context ctx, ShaderProgramId shaderProgramId, ShaderId[] shaderIds) {
- return Pipeline.getPipeline().linkCgShaderProgram(ctx, shaderProgramId, shaderIds);
- }
-
- ShaderError bindVertexAttrName(Context ctx, ShaderProgramId shaderProgramId, String attrName, int attrIndex) {
- // This is a no-op for Cg
- return null;
- }
-
- void lookupVertexAttrNames(Context ctx, ShaderProgramId shaderProgramId, String[] attrNames, boolean[] errArr) {
- Pipeline.getPipeline().lookupCgVertexAttrNames(ctx, shaderProgramId, attrNames.length, attrNames, errArr);
- }
-
- void lookupShaderAttrNames(Context ctx, ShaderProgramId shaderProgramId,
- String[] attrNames, AttrNameInfo[] attrNameInfoArr) {
-
- int numAttrNames = attrNames.length;
-
- ShaderAttrLoc[] locArr = new ShaderAttrLoc[numAttrNames];
- int[] typeArr = new int[numAttrNames];
- int[] sizeArr = new int[numAttrNames]; // currently unused
- boolean[] isArrayArr = new boolean[numAttrNames];
-
- Pipeline.getPipeline().lookupCgShaderAttrNames(ctx, shaderProgramId,
- numAttrNames, attrNames, locArr, typeArr, sizeArr, isArrayArr);
-
- for (int i = 0; i < numAttrNames; i++) {
- attrNameInfoArr[i] = new AttrNameInfo();
- attrNameInfoArr[i].setLocation(locArr[i]);
- attrNameInfoArr[i].setArray(isArrayArr[i]);
- attrNameInfoArr[i].setType(typeArr[i]);
- /*
- System.err.println(attrNames[i] +
- " : loc = " + locArr[i] +
- ", type = " + typeArr[i] +
- ", isArray = " + isArrayArr[i] +
- ", size = " + sizeArr[i]);
- */
- }
- }
-
- /**
- * Method to enable the native shader program.
- */
- ShaderError enableShaderProgram(Context ctx, ShaderProgramId shaderProgramId) {
- return Pipeline.getPipeline().useCgShaderProgram(ctx, shaderProgramId);
- }
-
- /**
- * Method to disable the native shader program.
- */
- ShaderError disableShaderProgram(Context ctx) {
- return Pipeline.getPipeline().useCgShaderProgram(ctx, null);
- }
-
-
-}
diff --git a/src/classes/share/javax/media/j3d/NoopPipeline.java b/src/classes/share/javax/media/j3d/NoopPipeline.java
index 8c68119..d3800af 100644
--- a/src/classes/share/javax/media/j3d/NoopPipeline.java
+++ b/src/classes/share/javax/media/j3d/NoopPipeline.java
@@ -318,200 +318,6 @@ class NoopPipeline extends Pipeline {
// ---------------------------------------------------------------------
//
- // CgShaderProgramRetained methods
- //
-
- // ShaderAttributeValue methods
-
- ShaderError setCgUniform1i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int value) {
- return null;
- }
-
- ShaderError setCgUniform1f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float value) {
- return null;
- }
-
- ShaderError setCgUniform2i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int[] value) {
- return null;
- }
-
- ShaderError setCgUniform2f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value) {
- return null;
- }
-
- ShaderError setCgUniform3i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int[] value) {
- return null;
- }
-
- ShaderError setCgUniform3f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value) {
- return null;
- }
-
- ShaderError setCgUniform4i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int[] value) {
- return null;
- }
-
- ShaderError setCgUniform4f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value) {
- return null;
- }
-
- ShaderError setCgUniformMatrix3f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value) {
- return null;
- }
-
- ShaderError setCgUniformMatrix4f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value) {
- return null;
- }
-
- // ShaderAttributeArray methods
-
- ShaderError setCgUniform1iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value) {
- return null;
- }
-
- ShaderError setCgUniform1fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
- return null;
- }
-
- ShaderError setCgUniform2iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value) {
- return null;
- }
-
- ShaderError setCgUniform2fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
- return null;
- }
-
- ShaderError setCgUniform3iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value) {
- return null;
- }
-
- ShaderError setCgUniform3fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
- return null;
- }
-
- ShaderError setCgUniform4iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value) {
- return null;
- }
-
- ShaderError setCgUniform4fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
- return null;
- }
-
- ShaderError setCgUniformMatrix3fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
- return null;
- }
-
- ShaderError setCgUniformMatrix4fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value) {
- return null;
- }
-
- // interfaces for shader compilation, etc.
- ShaderError createCgShader(Context ctx, int shaderType, ShaderId[] shaderId) {
- return null;
- }
- ShaderError destroyCgShader(Context ctx, ShaderId shaderId) {
- return null;
- }
- ShaderError compileCgShader(Context ctx, ShaderId shaderId, String program) {
- return null;
- }
-
- ShaderError createCgShaderProgram(Context ctx, ShaderProgramId[] shaderProgramId) {
- return null;
- }
- ShaderError destroyCgShaderProgram(Context ctx, ShaderProgramId shaderProgramId) {
- return null;
- }
- ShaderError linkCgShaderProgram(Context ctx, ShaderProgramId shaderProgramId,
- ShaderId[] shaderIds) {
- return null;
- }
- void lookupCgVertexAttrNames(Context ctx, ShaderProgramId shaderProgramId,
- int numAttrNames, String[] attrNames, boolean[] errArr) {
- }
- void lookupCgShaderAttrNames(Context ctx, ShaderProgramId shaderProgramId,
- int numAttrNames, String[] attrNames, ShaderAttrLoc[] locArr,
- int[] typeArr, int[] sizeArr, boolean[] isArrayArr) {
- }
-
- ShaderError useCgShaderProgram(Context ctx, ShaderProgramId shaderProgramId) {
- return null;
- }
-
-
- // ---------------------------------------------------------------------
-
- //
// GLSLShaderProgramRetained methods
//
@@ -1176,15 +982,13 @@ class NoopPipeline extends Pipeline {
Context createNewContext(Canvas3D cv, long display, Drawable drawable,
long fbConfig, Context shareCtx, boolean isSharedCtx,
boolean offScreen,
- boolean glslLibraryAvailable,
- boolean cgLibraryAvailable) {
+ boolean glslLibraryAvailable) {
return new NoopContext();
}
void createQueryContext(Canvas3D cv, long display, Drawable drawable,
long fbConfig, boolean offScreen, int width, int height,
- boolean glslLibraryAvailable,
- boolean cgLibraryAvailable) {
+ boolean glslLibraryAvailable) {
}
// This is the native for creating offscreen buffer
diff --git a/src/classes/share/javax/media/j3d/Pipeline.java b/src/classes/share/javax/media/j3d/Pipeline.java
index a6b7ba0..3b7c875 100644
--- a/src/classes/share/javax/media/j3d/Pipeline.java
+++ b/src/classes/share/javax/media/j3d/Pipeline.java
@@ -422,143 +422,6 @@ public Pipeline run() {
int depthFormat,
Object depthBuffer);
- // ---------------------------------------------------------------------
-
- //
- // CgShaderProgramRetained methods
- //
-
- // ShaderAttributeValue methods
-
- abstract ShaderError setCgUniform1i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int value);
-
- abstract ShaderError setCgUniform1f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float value);
-
- abstract ShaderError setCgUniform2i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int[] value);
-
- abstract ShaderError setCgUniform2f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value);
-
- abstract ShaderError setCgUniform3i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int[] value);
-
- abstract ShaderError setCgUniform3f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value);
-
- abstract ShaderError setCgUniform4i(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int[] value);
-
- abstract ShaderError setCgUniform4f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value);
-
- abstract ShaderError setCgUniformMatrix3f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value);
-
- abstract ShaderError setCgUniformMatrix4f(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- float[] value);
-
- // ShaderAttributeArray methods
-
- abstract ShaderError setCgUniform1iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value);
-
- abstract ShaderError setCgUniform1fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value);
-
- abstract ShaderError setCgUniform2iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value);
-
- abstract ShaderError setCgUniform2fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value);
-
- abstract ShaderError setCgUniform3iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value);
-
- abstract ShaderError setCgUniform3fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value);
-
- abstract ShaderError setCgUniform4iArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- int[] value);
-
- abstract ShaderError setCgUniform4fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value);
-
- abstract ShaderError setCgUniformMatrix3fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value);
-
- abstract ShaderError setCgUniformMatrix4fArray(Context ctx,
- ShaderProgramId shaderProgramId,
- ShaderAttrLoc uniformLocation,
- int numElements,
- float[] value);
-
- // abstract interfaces for shader compilation, etc.
- abstract ShaderError createCgShader(Context ctx, int shaderType, ShaderId[] shaderId);
- abstract ShaderError destroyCgShader(Context ctx, ShaderId shaderId);
- abstract ShaderError compileCgShader(Context ctx, ShaderId shaderId, String program);
-
- abstract ShaderError createCgShaderProgram(Context ctx, ShaderProgramId[] shaderProgramId);
- abstract ShaderError destroyCgShaderProgram(Context ctx, ShaderProgramId shaderProgramId);
- abstract ShaderError linkCgShaderProgram(Context ctx, ShaderProgramId shaderProgramId,
- ShaderId[] shaderIds);
- abstract void lookupCgVertexAttrNames(Context ctx, ShaderProgramId shaderProgramId,
- int numAttrNames, String[] attrNames, boolean[] errArr);
- abstract void lookupCgShaderAttrNames(Context ctx, ShaderProgramId shaderProgramId,
- int numAttrNames, String[] attrNames, ShaderAttrLoc[] locArr,
- int[] typeArr, int[] sizeArr, boolean[] isArrayArr);
-
- abstract ShaderError useCgShaderProgram(Context ctx, ShaderProgramId shaderProgramId);
-
// ---------------------------------------------------------------------
@@ -1128,13 +991,11 @@ public Pipeline run() {
abstract Context createNewContext(Canvas3D cv, long display, Drawable drawable,
long fbConfig, Context shareCtx, boolean isSharedCtx,
boolean offScreen,
- boolean glslLibraryAvailable,
- boolean cgLibraryAvailable);
+ boolean glslLibraryAvailable);
abstract void createQueryContext(Canvas3D cv, long display, Drawable drawable,
long fbConfig, boolean offScreen, int width, int height,
- boolean glslLibraryAvailable,
- boolean cgLibraryAvailable);
+ boolean glslLibraryAvailable);
// This is the native for creating offscreen buffer
abstract Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, long display, long fbConfig, int width, int height);