From ff2a9c21c9bd840b0ba09f71bff52c063b357f4d Mon Sep 17 00:00:00 2001 From: Kevin Rushforth Date: Fri, 17 Sep 2004 23:20:57 +0000 Subject: Updated web pages with rough first draft of ideas for supporting programmable shaders in Java 3D 1.4. git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@42 ba19aa83-45c5-6ac9-afd3-db810772062c --- www/index.html | 5 + www/j3d1_4/javax/media/j3d/CgFragmentShader.html | 271 ++++++++++++++++++ www/j3d1_4/javax/media/j3d/CgShader.html | 266 +++++++++++++++++ www/j3d1_4/javax/media/j3d/CgShaderProgram.html | 333 ++++++++++++++++++++++ www/j3d1_4/javax/media/j3d/CgVertexShader.html | 271 ++++++++++++++++++ www/j3d1_4/javax/media/j3d/GL2FragmentShader.html | 271 ++++++++++++++++++ www/j3d1_4/javax/media/j3d/GL2Shader.html | 266 +++++++++++++++++ www/j3d1_4/javax/media/j3d/GL2ShaderProgram.html | 333 ++++++++++++++++++++++ www/j3d1_4/javax/media/j3d/GL2VertexShader.html | 271 ++++++++++++++++++ www/j3d1_4/javax/media/j3d/Shader.html | 224 +++++++++++++++ www/j3d1_4/javax/media/j3d/ShaderProgram.html | 226 +++++++++++++++ www/j3d1_4/shaders.html | 209 ++++++++++++++ 12 files changed, 2946 insertions(+) create mode 100644 www/j3d1_4/javax/media/j3d/CgFragmentShader.html create mode 100644 www/j3d1_4/javax/media/j3d/CgShader.html create mode 100644 www/j3d1_4/javax/media/j3d/CgShaderProgram.html create mode 100644 www/j3d1_4/javax/media/j3d/CgVertexShader.html create mode 100644 www/j3d1_4/javax/media/j3d/GL2FragmentShader.html create mode 100644 www/j3d1_4/javax/media/j3d/GL2Shader.html create mode 100644 www/j3d1_4/javax/media/j3d/GL2ShaderProgram.html create mode 100644 www/j3d1_4/javax/media/j3d/GL2VertexShader.html create mode 100644 www/j3d1_4/javax/media/j3d/Shader.html create mode 100644 www/j3d1_4/javax/media/j3d/ShaderProgram.html create mode 100644 www/j3d1_4/shaders.html diff --git a/www/index.html b/www/index.html index 3a80b88..850bdec 100644 --- a/www/index.html +++ b/www/index.html @@ -184,6 +184,11 @@ minimize large scale changes to the system in order to deliver 1.4 as quickly as possible. This initial direction could be changed by the Expert Group.

+

17-Sep-2004 - We have just posted a very rough first draft +of what we +are thinking for Programmable Shaders in +Java 3D 1.4.
+

Java 3D 1.5/2.0

The scope of this release will be driven by the JSR Expert Group. diff --git a/www/j3d1_4/javax/media/j3d/CgFragmentShader.html b/www/j3d1_4/javax/media/j3d/CgFragmentShader.html new file mode 100644 index 0000000..b8a8da3 --- /dev/null +++ b/www/j3d1_4/javax/media/j3d/CgFragmentShader.html @@ -0,0 +1,271 @@ + + + + + + +CgFragmentShader (Java 3D 1_4_0_pre1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +


+ +

+ +javax.media.j3d +
+Class CgFragmentShader

+
+java.lang.Object
+  extended by javax.media.j3d.SceneGraphObject
+      extended by javax.media.j3d.NodeComponent
+          extended by javax.media.j3d.Shader
+              extended by javax.media.j3d.CgShader
+                  extended by javax.media.j3d.CgFragmentShader
+
+
+
+
public class CgFragmentShader
extends CgShader
+ + +

+The Cg Fragment Shader object... +

+ +

+

+
See Also:
CgShaderProgram, +CgVertexShader
+
+ +

+ + + + + + + + + + + + + + +
+Constructor Summary
CgFragmentShader() + +
+           
CgFragmentShader(java.lang.String shaderSource) + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class javax.media.j3d.CgShader
getShaderSource, setShaderSource
+ + + + + + + +
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
+ + + + + + + +
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+CgFragmentShader

+
+public CgFragmentShader()
+
+
+
+ +

+CgFragmentShader

+
+public CgFragmentShader(java.lang.String shaderSource)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/www/j3d1_4/javax/media/j3d/CgShader.html b/www/j3d1_4/javax/media/j3d/CgShader.html new file mode 100644 index 0000000..d650a87 --- /dev/null +++ b/www/j3d1_4/javax/media/j3d/CgShader.html @@ -0,0 +1,266 @@ + + + + + + +CgShader (Java 3D 1_4_0_pre1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.media.j3d +
+Class CgShader

+
+java.lang.Object
+  extended by javax.media.j3d.SceneGraphObject
+      extended by javax.media.j3d.NodeComponent
+          extended by javax.media.j3d.Shader
+              extended by javax.media.j3d.CgShader
+
+
+
Direct Known Subclasses:
CgFragmentShader, CgVertexShader
+
+
+
+
public abstract class CgShader
extends Shader
+ + +

+The Cg Shader object... + +

+ NOTE: Applications should not extend this class. +

+ +

+

+
See Also:
CgShaderProgram
+
+ +

+ + + + + + + + + + + + + + + + +
+Method Summary
+ java.lang.StringgetShaderSource() + +
+           
+ voidsetShaderSource(java.lang.String shaderSource) + +
+           
+ + + + + + + +
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
+ + + + + + + +
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Method Detail
+ +

+setShaderSource

+
+public void setShaderSource(java.lang.String shaderSource)
+
+
+
+
+
+
+ +

+getShaderSource

+
+public java.lang.String getShaderSource()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/www/j3d1_4/javax/media/j3d/CgShaderProgram.html b/www/j3d1_4/javax/media/j3d/CgShaderProgram.html new file mode 100644 index 0000000..5fbb0d4 --- /dev/null +++ b/www/j3d1_4/javax/media/j3d/CgShaderProgram.html @@ -0,0 +1,333 @@ + + + + + + +CgShaderProgram (Java 3D 1_4_0_pre1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.media.j3d +
+Class CgShaderProgram

+
+java.lang.Object
+  extended by javax.media.j3d.SceneGraphObject
+      extended by javax.media.j3d.NodeComponent
+          extended by javax.media.j3d.ShaderProgram
+              extended by javax.media.j3d.CgShaderProgram
+
+
+
+
public class CgShaderProgram
extends ShaderProgram
+ + +

+The CgShaderProgram object is a concrete implementation of a ShaderProgram + node component for NVIDIA's Cg shader language. +

+ +

+

+
See Also:
CgVertexShader, +CgFragmentShader
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
CgShaderProgram() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ CgFragmentShadergetFragmentShader() + +
+           
+ CgVertexShadergetVertexShader() + +
+           
+ voidsetFragmentShader(CgFragmentShader fragmentShader) + +
+           
+ voidsetVertexShader(CgVertexShader vertexShader) + +
+           
+ + + + + + + +
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
+ + + + + + + +
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+CgShaderProgram

+
+public CgShaderProgram()
+
+
+ + + + + + + + +
+Method Detail
+ +

+setVertexShader

+
+public void setVertexShader(CgVertexShader vertexShader)
+
+
+
+
+
+
+ +

+setFragmentShader

+
+public void setFragmentShader(CgFragmentShader fragmentShader)
+
+
+
+
+
+
+ +

+getVertexShader

+
+public CgVertexShader getVertexShader()
+
+
+
+
+
+
+ +

+getFragmentShader

+
+public CgFragmentShader getFragmentShader()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/www/j3d1_4/javax/media/j3d/CgVertexShader.html b/www/j3d1_4/javax/media/j3d/CgVertexShader.html new file mode 100644 index 0000000..2214d6a --- /dev/null +++ b/www/j3d1_4/javax/media/j3d/CgVertexShader.html @@ -0,0 +1,271 @@ + + + + + + +CgVertexShader (Java 3D 1_4_0_pre1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.media.j3d +
+Class CgVertexShader

+
+java.lang.Object
+  extended by javax.media.j3d.SceneGraphObject
+      extended by javax.media.j3d.NodeComponent
+          extended by javax.media.j3d.Shader
+              extended by javax.media.j3d.CgShader
+                  extended by javax.media.j3d.CgVertexShader
+
+
+
+
public class CgVertexShader
extends CgShader
+ + +

+The Cg Vertex Shader object... +

+ +

+

+
See Also:
CgShaderProgram, +CgFragmentShader
+
+ +

+ + + + + + + + + + + + + + +
+Constructor Summary
CgVertexShader() + +
+           
CgVertexShader(java.lang.String shaderSource) + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class javax.media.j3d.CgShader
getShaderSource, setShaderSource
+ + + + + + + +
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
+ + + + + + + +
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+CgVertexShader

+
+public CgVertexShader()
+
+
+
+ +

+CgVertexShader

+
+public CgVertexShader(java.lang.String shaderSource)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/www/j3d1_4/javax/media/j3d/GL2FragmentShader.html b/www/j3d1_4/javax/media/j3d/GL2FragmentShader.html new file mode 100644 index 0000000..4b71ebf --- /dev/null +++ b/www/j3d1_4/javax/media/j3d/GL2FragmentShader.html @@ -0,0 +1,271 @@ + + + + + + +GL2FragmentShader (Java 3D 1_4_0_pre1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.media.j3d +
+Class GL2FragmentShader

+
+java.lang.Object
+  extended by javax.media.j3d.SceneGraphObject
+      extended by javax.media.j3d.NodeComponent
+          extended by javax.media.j3d.Shader
+              extended by javax.media.j3d.GL2Shader
+                  extended by javax.media.j3d.GL2FragmentShader
+
+
+
+
public class GL2FragmentShader
extends GL2Shader
+ + +

+The GL2 Fragment Shader object... +

+ +

+

+
See Also:
GL2ShaderProgram, +GL2VertexShader
+
+ +

+ + + + + + + + + + + + + + +
+Constructor Summary
GL2FragmentShader() + +
+           
GL2FragmentShader(java.lang.String shaderSource) + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class javax.media.j3d.GL2Shader
getShaderSource, setShaderSource
+ + + + + + + +
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
+ + + + + + + +
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+GL2FragmentShader

+
+public GL2FragmentShader()
+
+
+
+ +

+GL2FragmentShader

+
+public GL2FragmentShader(java.lang.String shaderSource)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/www/j3d1_4/javax/media/j3d/GL2Shader.html b/www/j3d1_4/javax/media/j3d/GL2Shader.html new file mode 100644 index 0000000..2d8d09a --- /dev/null +++ b/www/j3d1_4/javax/media/j3d/GL2Shader.html @@ -0,0 +1,266 @@ + + + + + + +GL2Shader (Java 3D 1_4_0_pre1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.media.j3d +
+Class GL2Shader

+
+java.lang.Object
+  extended by javax.media.j3d.SceneGraphObject
+      extended by javax.media.j3d.NodeComponent
+          extended by javax.media.j3d.Shader
+              extended by javax.media.j3d.GL2Shader
+
+
+
Direct Known Subclasses:
GL2FragmentShader, GL2VertexShader
+
+
+
+
public abstract class GL2Shader
extends Shader
+ + +

+The GL2 Shader object... + +

+ NOTE: Applications should not extend this class. +

+ +

+

+
See Also:
GL2ShaderProgram
+
+ +

+ + + + + + + + + + + + + + + + +
+Method Summary
+ java.lang.StringgetShaderSource() + +
+           
+ voidsetShaderSource(java.lang.String shaderSource) + +
+           
+ + + + + + + +
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
+ + + + + + + +
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Method Detail
+ +

+setShaderSource

+
+public void setShaderSource(java.lang.String shaderSource)
+
+
+
+
+
+
+ +

+getShaderSource

+
+public java.lang.String getShaderSource()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/www/j3d1_4/javax/media/j3d/GL2ShaderProgram.html b/www/j3d1_4/javax/media/j3d/GL2ShaderProgram.html new file mode 100644 index 0000000..e4369c1 --- /dev/null +++ b/www/j3d1_4/javax/media/j3d/GL2ShaderProgram.html @@ -0,0 +1,333 @@ + + + + + + +GL2ShaderProgram (Java 3D 1_4_0_pre1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.media.j3d +
+Class GL2ShaderProgram

+
+java.lang.Object
+  extended by javax.media.j3d.SceneGraphObject
+      extended by javax.media.j3d.NodeComponent
+          extended by javax.media.j3d.ShaderProgram
+              extended by javax.media.j3d.GL2ShaderProgram
+
+
+
+
public class GL2ShaderProgram
extends ShaderProgram
+ + +

+The GL2ShaderProgram object is a concrete implementation of a ShaderProgram + node component for the OpenGL GL2 shading language. +

+ +

+

+
See Also:
GL2VertexShader, +GL2FragmentShader
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
GL2ShaderProgram() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ GL2FragmentShadergetFragmentShader() + +
+           
+ GL2VertexShadergetVertexShader() + +
+           
+ voidsetFragmentShader(GL2FragmentShader fragmentShader) + +
+           
+ voidsetVertexShader(GL2VertexShader vertexShader) + +
+           
+ + + + + + + +
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
+ + + + + + + +
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+GL2ShaderProgram

+
+public GL2ShaderProgram()
+
+
+ + + + + + + + +
+Method Detail
+ +

+setVertexShader

+
+public void setVertexShader(GL2VertexShader vertexShader)
+
+
+
+
+
+
+ +

+setFragmentShader

+
+public void setFragmentShader(GL2FragmentShader fragmentShader)
+
+
+
+
+
+
+ +

+getVertexShader

+
+public GL2VertexShader getVertexShader()
+
+
+
+
+
+
+ +

+getFragmentShader

+
+public GL2FragmentShader getFragmentShader()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/www/j3d1_4/javax/media/j3d/GL2VertexShader.html b/www/j3d1_4/javax/media/j3d/GL2VertexShader.html new file mode 100644 index 0000000..9329ac7 --- /dev/null +++ b/www/j3d1_4/javax/media/j3d/GL2VertexShader.html @@ -0,0 +1,271 @@ + + + + + + +GL2VertexShader (Java 3D 1_4_0_pre1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.media.j3d +
+Class GL2VertexShader

+
+java.lang.Object
+  extended by javax.media.j3d.SceneGraphObject
+      extended by javax.media.j3d.NodeComponent
+          extended by javax.media.j3d.Shader
+              extended by javax.media.j3d.GL2Shader
+                  extended by javax.media.j3d.GL2VertexShader
+
+
+
+
public class GL2VertexShader
extends GL2Shader
+ + +

+The GL2 Vertex Shader object... +

+ +

+

+
See Also:
GL2ShaderProgram, +GL2FragmentShader
+
+ +

+ + + + + + + + + + + + + + +
+Constructor Summary
GL2VertexShader() + +
+           
GL2VertexShader(java.lang.String shaderSource) + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class javax.media.j3d.GL2Shader
getShaderSource, setShaderSource
+ + + + + + + +
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
+ + + + + + + +
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+GL2VertexShader

+
+public GL2VertexShader()
+
+
+
+ +

+GL2VertexShader

+
+public GL2VertexShader(java.lang.String shaderSource)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/www/j3d1_4/javax/media/j3d/Shader.html b/www/j3d1_4/javax/media/j3d/Shader.html new file mode 100644 index 0000000..fec2ffe --- /dev/null +++ b/www/j3d1_4/javax/media/j3d/Shader.html @@ -0,0 +1,224 @@ + + + + + + +Shader (Java 3D 1_4_0_pre1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.media.j3d +
+Class Shader

+
+java.lang.Object
+  extended by javax.media.j3d.SceneGraphObject
+      extended by javax.media.j3d.NodeComponent
+          extended by javax.media.j3d.Shader
+
+
+
Direct Known Subclasses:
CgShader, GL2Shader
+
+
+
+
public abstract class Shader
extends NodeComponent
+ + +

+The Shader object is the abstract base class for programmable + shader source code. It contains no public methods, fields or + constructors. Each concrete instance of a Shader object allows an + application to specify the source code used in programming the + Graphics Pipeline Unit (GPU) of the graphics accelerator, using the + shader language defined by that Shader. The currently defined + shader languages are: Cg and GL2. + +

+ NOTE: Applications should not extend this class. +

+ +

+

+
See Also:
ShaderProgram
+
+ +

+ + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
+ + + + + + + +
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/www/j3d1_4/javax/media/j3d/ShaderProgram.html b/www/j3d1_4/javax/media/j3d/ShaderProgram.html new file mode 100644 index 0000000..479d58b --- /dev/null +++ b/www/j3d1_4/javax/media/j3d/ShaderProgram.html @@ -0,0 +1,226 @@ + + + + + + +ShaderProgram (Java 3D 1_4_0_pre1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.media.j3d +
+Class ShaderProgram

+
+java.lang.Object
+  extended by javax.media.j3d.SceneGraphObject
+      extended by javax.media.j3d.NodeComponent
+          extended by javax.media.j3d.ShaderProgram
+
+
+
Direct Known Subclasses:
CgShaderProgram, GL2ShaderProgram
+
+
+
+
public abstract class ShaderProgram
extends NodeComponent
+ + +

+The ShaderProgram object is the abstract base class for + programmable shader programs. It contains no public methods, + fields or constructors. Each concrete instance of a ShaderProgram + is a container for a set of Shader objects. The set of Shaders + contained in the ShaderProgram is a complete program for the + Graphics Pipeline Unit (GPU) of the graphics accelerator. It is + specified using the shader language defined by the + ShaderProgram. The currently defined shader languages are: Cg and + GL2. + +

+ NOTE: Applications should not extend this class. +

+ +

+

+
See Also:
Shader
+
+ +

+ + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
+ + + + + + + +
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/www/j3d1_4/shaders.html b/www/j3d1_4/shaders.html new file mode 100644 index 0000000..63c42a6 --- /dev/null +++ b/www/j3d1_4/shaders.html @@ -0,0 +1,209 @@ + + + + + Java 3D 1.4 Shaders + + +

Shaders in Java 3DTM 1.4

+

Introduction and pointer to discussion forum

+ +

If you wandered over here looking for a completed draft +programmable shading specification for +Java 3DTM 1.4 that you can +review, you are in the wrong place; or more accurately, the right +place at the wrong time. Come back in about 2 months and things should +be in state where you can review a fairly complete draft +specification. If, on the other hand, you'd like to help us define and +evolve the programmable shading API in Java 3D 1.4, please read +on. +

+ +

This is a very rough first draft of what we are thinking in terms +of programmable shader support in Java 3D 1.4. As we mentioned at +JavaOne, we plan to do the 1.4 API specification under the auspices of +the Java Community Process (JCP). However, we very much want to +involve the larger community in API discussions for programmable +shaders, so please join in the discussion. +

+ +

We have created a thread on the Java 3D discussion forum for +discussing Java 3D Programmable Shaders. Feel free to +post your comments on our ideas, or post some ideas of your own. +

+ +

Class Hierarchy for Shader Objects

+

The proposed class hierarchy for programmable shaders +in Java 3D is:

+ + +

Click on the following link for a preliminary look at the javadoc-generated API +definitions for the newly proposed classes. Note that this is only +the javadoc for the new classes. We know that there are lots of +broken links for the existing classes. +

+ +

Example Usage

+

This is an example code excerpt showing how one might use the new +programmable shader API in a Java 3D program. +

+ +

Shader Parameters

+ +

Programmable shaders define two types of parameters: uniform and +varying. As the names imply, uniform parameters are constant (within a +primitive), while varying parameters can vary on per-vertex or +per-fragment basis. +

+ +
    + +
  1. Uniform parameters (attributes) are those parameters whose +value is constant during the rendering of a primitive. Their values +may change from primitive to primitive, but are constant for each +vertex (for vertex shaders) or fragment (for fragment shaders) of a +single primitive. Examples of uniform parameters include a +transformation matrix, a texture map, lights, lookup tables, +etc. Several Java 3D state attributes are automatically available +to the shader program as pre-defined uniform parameters. The +application doesn't need to do anything to pass these parameters in to +the shader program. The implementation of each shader language (e.g., +Cg, GL2) defines its own mapping from Java 3D attribute to uniform +variable name.
    +
    +We need additional API to allow applications to pass in uniform +parameters that do not correspond to a pre-defined Java 3D +attribute...
    TODO: Finish this...
    +
    +A partial list of Java 3D attributes that are mapped to shader +attributes follows: +
  2. +
    + + + + + + + + + + + + + + + + + + + + + + + +
    Java 3D +Attribute
    +
    Cg +shader variable
    +
    GL2 +shader variable
    +
    ModelViewProjection
    +
    glstate.matrix.mvp
    +
    gl_ModelViewProjectionMatrix
    +
    Light[n] pos
    +
    glstate.light[n].position gl_LightSource[n].position
    ...
    +
    ...
    +
    ...
    +
    +
    +
  3. Varying parameters are those parameters that are specified +as per-vertex attributes. They are are interpolated across a primitive +similarly to colors and texture coordinates in the fixed function +pipeline.
    +
    +We need additional API to allow applications to pass in per-vertex +varying parameters...
    TODO: Finish this...
    +
  4. +
+

TODO: more info here. +

+ + -- cgit v1.2.3