aboutsummaryrefslogtreecommitdiffstats
path: root/www/j3d1_4
diff options
context:
space:
mode:
Diffstat (limited to 'www/j3d1_4')
-rw-r--r--www/j3d1_4/api-changes.html27
-rw-r--r--www/j3d1_4/graph-change-listener.html40
-rw-r--r--www/j3d1_4/lightweight-canvas3d.html27
-rw-r--r--www/j3d1_4/picking.html31
-rw-r--r--www/j3d1_4/proposed-changes.html125
-rw-r--r--www/j3d1_4/render-texture.html32
-rw-r--r--www/j3d1_4/shaders.html290
-rw-r--r--www/j3d1_4/stencil.html35
8 files changed, 360 insertions, 247 deletions
diff --git a/www/j3d1_4/api-changes.html b/www/j3d1_4/api-changes.html
index 54ab8c7..0a88c60 100644
--- a/www/j3d1_4/api-changes.html
+++ b/www/j3d1_4/api-changes.html
@@ -19,8 +19,8 @@
*
* NOTE: This file must be edited by hand to avoid Mozilla Composer
* putting all preformatted lines into a single line with "<br>"
-* replacing ASCII newlines (which, in turn, causes problems with some
-* editors).
+* replacing ASCII newlines, making it impossible to do a meaningful
+* "diff" operation.
*
************************************************************************
-->
@@ -84,6 +84,23 @@ I. New/deprecated fields, constructors, methods
public static final int ALLOW_PARENT_READ
+ Sensor
+ ------
+ Deprecated fields:
+ public static final int PREDICT_NONE
+ public static final int PREDICT_NEXT_FRAME_TIME
+ public static final int NO_PREDICTOR
+ public static final int HEAD_PREDICTOR
+ public static final int HAND_PREDICTOR
+
+ Deprecated methods:
+ public void setPredictor(int predictor)
+ public int getPredictor()
+ public void setPredictionPolicy(int policy)
+ public int getPredictionPolicy()
+ public void getRead(Transform3D read, long deltaT)
+
+
II. Reparented classes
NONE
@@ -158,6 +175,12 @@ III. New classes and interfaces (in javax.media.j3d)
GLSLShaderProgram
-----------------
public class GLSLShaderProgram extends ShaderProgram
+
+
+IV. Deprecated classes and interfaces (in javax.media.j3d)
+
+ CompressedGeometry
+ CompressedGeometryHeader
</pre>
<p><font color="gray">Page last updated &#8212;
$Date$
diff --git a/www/j3d1_4/graph-change-listener.html b/www/j3d1_4/graph-change-listener.html
new file mode 100644
index 0000000..931d744
--- /dev/null
+++ b/www/j3d1_4/graph-change-listener.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+ <title>Java 3D 1.4: Graph Change Listener</title>
+</head>
+<body>
+<h2>Java&nbsp;3D<sup><font size="-2">TM</font></sup> 1.4:
+Graph Change Listener</h2>
+<p>This page describes a proposed Java&nbsp;3D 1.4 feature to add a
+notification mechansim for scene graph structure
+changes: additions, deletions, and
+moves of branch graphs to/from a live scene graph. We propose
+adding <code>add/removeGraphChangeListener(</code><code>GraphChangeListener</code><code>)</code>
+methods to <code>VirtualUniverse</code> and a new <code>GraphChangeListener</code>
+interface with <code>graphAdded</code>, <code>graphRemoved</code>,
+and <code>graphMoved</code> methods that get called when any branch
+graph is added (attached),
+removed (detached), or moved, respectively.
+</p>
+<p>The proposed API is:</p>
+<ul>
+ <li>New classes</li>
+ <ul>
+ <pre>public class XXXXX extends YYYYY<br> method: setXxxxx()<br></pre>
+ </ul>
+ <li>New methods in existing classes:<br>
+ </li>
+ <ul>
+ <pre>XXXXX<br> method: setXxxxx()<br></pre>
+ </ul>
+</ul>
+<p>More info here...
+</p>
+<p><font color="gray">Page last updated &#8212;
+$Date$
+</font></p>
+</body>
+</html>
diff --git a/www/j3d1_4/lightweight-canvas3d.html b/www/j3d1_4/lightweight-canvas3d.html
new file mode 100644
index 0000000..1c6479f
--- /dev/null
+++ b/www/j3d1_4/lightweight-canvas3d.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+ <title>Java 3D 1.4: Lightweight Canvas3D</title>
+</head>
+<body>
+<h2>Java&nbsp;3D<sup><font size="-2">TM</font></sup> 1.4:
+Lightweight Canvas3D</h2>
+<p>A possible feature under consideration for Java&nbsp;3D 1.4 is a
+lightweight JCanvas3D that is similar to
+JGLCanvas in JOGL. Adding this into core may be beyond the
+scope of 1.4. It probably can be done as a utility, although it
+may require some core changes.<span style="color: rgb(204, 0, 0);"></span></p>
+<p><span style="color: rgb(204, 0, 0);"></span></p>
+<p><span style="color: rgb(204, 0, 0);">Note: this feature will not
+happen
+without an someone from the community volunteering
+to drive it.</span></p>
+<p>More info here...
+</p>
+<p><font color="gray">Page last updated &#8212;
+$Date$
+</font></p>
+</body>
+</html>
diff --git a/www/j3d1_4/picking.html b/www/j3d1_4/picking.html
new file mode 100644
index 0000000..cea288d
--- /dev/null
+++ b/www/j3d1_4/picking.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+ <title>Java 3D 1.4: Picking Changes</title>
+</head>
+<body>
+<h2>Java&nbsp;3D<sup><font size="-2">TM</font></sup> 1.4:
+Picking Changes</h2>
+<p>This page describes proposed picking changes in Java&nbsp;3D 1.4...
+</p>
+<p>The proposed API is:</p>
+<ul>
+ <li>New classes</li>
+ <ul>
+ <pre>public class XXXXX extends YYYYY<br> method: setXxxxx()<br></pre>
+ </ul>
+ <li>New methods in existing classes:<br>
+ </li>
+ <ul>
+ <pre>XXXXX<br> method: setXxxxx()<br></pre>
+ </ul>
+</ul>
+<p>More info here...
+</p>
+<p><font color="gray">Page last updated &#8212;
+$Date$
+</font></p>
+</body>
+</html>
diff --git a/www/j3d1_4/proposed-changes.html b/www/j3d1_4/proposed-changes.html
index 58133fb..d7b088b 100644
--- a/www/j3d1_4/proposed-changes.html
+++ b/www/j3d1_4/proposed-changes.html
@@ -24,42 +24,41 @@ Java&nbsp;3D version 1.4</a> is also available.
<p>This list of high priority features will almost certainly make it
into the 1.4 API.
</p>
-<h4>1. Programmable shaders</h4>
-<p>The addition of shaders to the Java&nbsp;3D API is the primary focus
-for the 1.4. For more information see the <a href="shaders.html">Programmable
-Shaders in Java&nbsp;3D 1.4</a> page.
-</p>
-<h4>2. Scene graph structure change listeners<br>
-</h4>
-<p>We propose to add a notification mechansim for scene graph structure
-changes: additions, deletions, and
-moves of branch graphs to/from a live scene graph. We propose
-adding <code>add/removeGraphChangeListener(</code><code>GraphChangeListener</code><code>)</code>
-methods to <code>VirtualUniverse</code> and a new <code>GraphChangeListener</code>
-interface with <code>graphAdded</code>, <code>graphRemoved</code>,
-and <code>graphMoved</code> methods that get called when any branch
-graph is added (attached),
-removed (detached), or moved, respectively.<br>
-</p>
-<h4>3. Miscellaneous features</h4>
-<p>This is a list of miscellaneous features that we propose to add to
-the API.
+<h4>1. Proposed API to be added</h4>
+<p>This is a list of features that we propose to add to
+the API.<br>
</p>
<ul>
- <li>Name string for all scene graph objects: add public <code>get/setName(String)</code>
-to <code>SceneGraphObject</code> class</li>
- <li>Allow getParent() to be called on live/compiled scene graph: add
-public <code>ALLOW_PARENT_READ</code> capability bit (default=<code>false</code>)
-to <code>Node </code>class</li>
- <li>Ability to get the Locale from a live node: add public <code>getLocale()</code>
+ <li><a href="shaders.html">Programmable
+Shaders</a></li>
+ <li><a href="graph-change-listener.html">Scene graph structure change
+listeners</a></li>
+ <li><a
+ href="http://javadesktop.org/java3d/javadoc/1.4.0-latest/javax/media/j3d/SceneGraphObject.html#setName%28java.lang.String%29">Name
+string</a> for all scene graph objects: add public <a
+ href="http://javadesktop.org/java3d/javadoc/1.4.0-latest/javax/media/j3d/SceneGraphObject.html#setName%28java.lang.String%29"><code>get/setName(String)</code></a>
+to <code>SceneGraphObject</code>
+class</li>
+ <li>New <a
+ href="http://javadesktop.org/java3d/javadoc/1.4.0-latest/javax/media/j3d/Node.html#ALLOW_PARENT_READ"><code>ALLOW_PARENT_READ</code></a>
+capability bit in <code>Node</code>
+class that will allow <a
+ href="http://javadesktop.org/java3d/javadoc/1.4.0-latest/javax/media/j3d/Node.html#getParent%28%29"><code>getParent()</code></a>
+to be called on live/compiled scene graph</li>
+ <li>Ability to get the locale from a live node: add public <code>getLocale()</code>
method and <code>ALLOW_LOCALE_READ</code> capability bit to <code>Node</code>
class<br>
</li>
- <li>Additional blending functions, for example: <code>BLEND_SRC_COLOR,
-BLEND_ONE_MINUS_SRC_COLOR, BLEND_DST_COLOR, BLEND_ONE_MINUS_DST_COLOR</code></li>
+ <li>Additional blending functions, for example: <code>BLEND_SRC_COLOR</code>,
+ <code>BLEND_ONE_MINUS_SRC_COLOR</code>, <code>BLEND_DST_COLOR</code>,
+ <code>BLEND_ONE_MINUS_DST_COLOR</code>, etc.</li>
+ <li><a href="picking.html">Additional core picking methods</a> (in
+Locale and BranchGroup)</li>
+ <li><a href="stencil.html">Stencil buffer</a><br>
+ </li>
</ul>
-<h4>4. List of features to deprecate</h4>
-<p>This is a list of miscellaneous features that we propose to
+<h4>2. Proposed API to be deprecated</h4>
+<p>This is a list of features that we propose to
deprecate in
the API.<br>
</p>
@@ -68,6 +67,10 @@ the API.<br>
acceptance)</li>
<li><code>Sensor</code> prediction (has never been implemented)<br>
</li>
+ <li><code>PickPoint</code> (not fully implemented, cannot be used for
+geometry-based picking; use PickBounds with
+a
+BoundingSphere that has a small radius)</li>
</ul>
<p>Note that none of these features will actually be removed. It
instead
@@ -83,39 +86,13 @@ future major release (e.g., a 2.0 release).<br>
possible inclusion
into the 1.4 API.
</p>
-<h4>1. Render to texture<br>
-</h4>
-<p><span style="font-style: italic; color: rgb(0, 153, 0);">DESCRIPTION
-FOR POSSIBLE RENDER-TO-TEXTURE SUPPORT GOES HERE...</span>
-</p>
-<h4>2. Stencil buffer support<br>
-</h4>
-<p><span style="font-style: italic; color: rgb(0, 153, 0);">DESCRIPTION
-FOR POSSIBLE STENCIL SUPPORT GOES HERE; NOTE THAT THIS WILL NOT INCLUDE
-ANY MULTIPASS EFFECTS for 1.4...</span>
-</p>
-<h4>3. Move picking into core</h4>
-<p>We should consider moving some of the picking utilities (e.g.,
-PickCanvas and PickResult)
-into the core API. Before doing this, we would need to scope out the
-effort involved, and assess the
-potential benefit.<br>
-</p>
-<h4>4. Lightweight Canvas3D (e.g., JCanvas3D)</h4>
-<p>We should consider adding a lightweight JCanvas3D that is similar to
-JGLCanvas in JOGL. Adding this into core may be beyond the
-scope of 1.4. Probably can be done as a utility, although it
-may require some core changes.
-<span style="color: rgb(204, 0, 0);">Note: this feature will not happen
-without an someone from the community volunteering
-to drive it.</span>
-</p>
-<h4>5. Miscellaneous features</h4>
-<p>This is a list of miscellaneous features that are being considered
+<h4>1. Possible API to be added</h4>
+<p>This is a list of features that are being considered
for addition to
the API.<br>
</p>
<ul>
+ <li><a href="render-texture.html">Render to texture</a></li>
<li>Non-power-of-two textures</li>
<li>Point sprites</li>
<li>Ability for nested ViewSpecificGroup nodes to replace the set of
@@ -128,6 +105,15 @@ attribute in <code>GraphicsConfigTemplate3D</code> indicating whether
the requested <code>GraphicsConfiguration</code> is used for on-screen
rendering,
off-screen rendering, or both)</li>
+ <li>Enhance <code>getLocalToVWorld()</code> to return a valid result
+for non-live graphs.</li>
+ <li><a href="lightweight-canvas3d.html">Lightweight Canvas3D (e.g.,
+JCanvas3D)</a>. <span style="color: rgb(204, 0, 0);">Note: this
+feature
+will not
+happen
+without an someone from the community volunteering
+to drive it.</span></li>
<li>Add a new attribute for depth test function to
RenderingAttributes: public <code>get/setDepthTestFunction(int&nbsp;function)</code>
methods that takes as values one of: <code>ALWAYS, NEVER,
@@ -145,21 +131,30 @@ method in the <code>Font3D</code> class. <span
style="color: rgb(204, 0, 0);">Note: this feature will not
happen
without an someone from the community volunteering
-to drive it.</span></li>
+to drive it.</span><span style="color: rgb(204, 0, 0);"></span></li>
</ul>
-<h4>6. List of features to deprecate</h4>
-<p>This is a list of miscellaneous features that are being considered
+<h4>2. Possible API to be deprecated</h4>
+<p>This is a list of features that are being considered
for deprecation in
the API.<br>
</p>
<ul>
- <li><code>SharedGroup</code> (many bugs, <em>very</em> difficult to
-implement
-efficiently)</li>
+ <li><code></code><code>Morph</code> (expensive, picking doesn't work,
+can be done
+in a utility)</li>
</ul>
<p>These are in addition to the API being proposed for deprecation in
section I.<br>
</p>
+<br>
+<h4><br>
+</h4>
+<h4><br>
+</h4>
+<p><br>
+</p>
+<p><br>
+</p>
<h3><a name="Future_Features"></a>III. Future Features</h3>
<p>Here is an unprioritized list of possible features under
consideration for a future (e.g., 1.5/2.0)
diff --git a/www/j3d1_4/render-texture.html b/www/j3d1_4/render-texture.html
new file mode 100644
index 0000000..6561d73
--- /dev/null
+++ b/www/j3d1_4/render-texture.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+ <title>Java 3D 1.4: Render To Texture</title>
+</head>
+<body>
+<h2>Java&nbsp;3D<sup><font size="-2">TM</font></sup> 1.4:
+Render To Texture</h2>
+<p>This page describes the possible render-to-texture feature in
+Java&nbsp;3D 1.4...
+</p>
+<p>The proposed API is:</p>
+<ul>
+ <li>New classes</li>
+ <ul>
+ <pre>public class XXXXX extends YYYYY<br> method: setXxxxx()<br></pre>
+ </ul>
+ <li>New methods in existing classes:<br>
+ </li>
+ <ul>
+ <pre>XXXXX<br> method: setXxxxx()<br></pre>
+ </ul>
+</ul>
+<p>More info here...
+</p>
+<p><font color="gray">Page last updated &#8212;
+$Date$
+</font></p>
+</body>
+</html>
diff --git a/www/j3d1_4/shaders.html b/www/j3d1_4/shaders.html
index fadfde0..380b742 100644
--- a/www/j3d1_4/shaders.html
+++ b/www/j3d1_4/shaders.html
@@ -2,187 +2,117 @@
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
- http-equiv="content-type">
- <title>Java 3D 1.4 Shaders</title>
+ http-equiv="content-type">
+ <title>Java 3D 1.4: Programmable Shaders</title>
</head>
<body>
-<h2>Shaders in Java&nbsp;3D<sup><font size="-2">TM</font></sup> 1.4</h2>
-<h4>Introduction and pointer to discussion forum</h4>
-
-<p>Here is the latest rough first draft of what we are thinking in
-terms of programmable shader support in Java&nbsp;3D<sup><font
-size="-2">TM</font></sup> for 1.4. We plan to formalize 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.
+<h2>Java&nbsp;3D<sup><font size="-2">TM</font></sup> 1.4:
+Programmable Shaders</h2>
+<p>This is the latest draft of the proposed Java&nbsp;3D<sup><font
+ size="-2">TM</font></sup>
+1.4 API changes for programmable shaders.<br>
</p>
-
<p>We have created a thread on the Java&nbsp;3D discussion forum for
discussing <a
-href="http://www.javadesktop.org/forums/thread.jspa?threadID=5056"
-target="_blank">Java&nbsp;3D Programmable Shaders</a>. Feel free to
+ href="http://www.javadesktop.org/forums/thread.jspa?threadID=5056"
+ target="_blank">Java&nbsp;3D Programmable Shaders</a>. Feel free to
post your comments on our ideas, or post some ideas of your own.
</p>
-
<h4>Class Hierarchy for Shader Objects</h4>
<p>The proposed class hierarchy for programmable shaders
in Java&nbsp;3D is:</p>
<ul>
-<li>Abstract shader base classes:</li>
-<ul>
-<pre>public abstract class ShaderProgram extends NodeComponent
-public abstract class Shader extends NodeComponent
-</pre>
-</ul>
-<li>Concrete GLSL shader classes:</li>
-<ul>
-<pre>public class GLSLShaderProgram extends ShaderProgram
- method: {add/remove/get}Shader(GLSLShader) // set of shader objs
- method: {add/remove}ErrorListener(GLSLErrorListener)
- method: validate(Canvas3D) ???
-
-public abstract class GLSLShader extends Shader
- public class GLSLVertexShader extends GLSLShader
- method: set/getShaderSource(String)
- method: validate(Canvas3D) ???
- public class GLSLFragmentShader extends GLSLShader
- method: set/getShaderSource(String)
- method: validate(Canvas3D) ???
-</pre>
-</ul>
-<li>Concrete Cg shader classes:</li>
-<ul>
-<pre>public class CgShaderProgram extends ShaderProgram
- method: {set/get}VertexShader(CgVertexShader)
- method: {set/get}FragmentShader(CgFramentShader)
- method: {add/remove}ErrorListener(CgErrorListener)
- method: validate(Canvas3D) ???
-
-public abstract class CgShader extends Shader
- public class CgVertexShader extends CgShader
- method: set/getShaderSource(String)
- method: validate(Canvas3D) ???
- public class CgFragmentShader extends CgShader
- method: set/getShaderSource(String)
- method: validate(Canvas3D) ???
-</pre>
-</ul>
-<li>New ShaderAppearance class:</li>
-<ul>
-<pre>public class ShaderAppearance extends Appearance
- method: set/getShaderProgram(ShaderProgram)
- method: set/getShaderAttributeSet(ShaderAttributeSet)
-</pre>
+ <li>Abstract shader base classes:</li>
+ <ul>
+ <pre>public abstract class ShaderProgram extends NodeComponent<br>public abstract class Shader extends NodeComponent<br></pre>
+ </ul>
+ <li>Concrete GLSL shader classes:</li>
+ <ul>
+ <pre>public class GLSLShaderProgram extends ShaderProgram<br> method: {add/remove/get}Shader(GLSLShader) // set of shader objs<br> method: {add/remove}ErrorListener(GLSLErrorListener)<br> method: validate(Canvas3D) ???<br><br>public abstract class GLSLShader extends Shader<br> public class GLSLVertexShader extends GLSLShader<br> method: set/getShaderSource(String)<br> method: validate(Canvas3D) ???<br> public class GLSLFragmentShader extends GLSLShader<br> method: set/getShaderSource(String)<br> method: validate(Canvas3D) ???<br></pre>
+ </ul>
+ <li>Concrete Cg shader classes:</li>
+ <ul>
+ <pre>public class CgShaderProgram extends ShaderProgram<br> method: {set/get}VertexShader(CgVertexShader)<br> method: {set/get}FragmentShader(CgFramentShader)<br> method: {add/remove}ErrorListener(CgErrorListener)<br> method: validate(Canvas3D) ???<br><br>public abstract class CgShader extends Shader<br> public class CgVertexShader extends CgShader<br> method: set/getShaderSource(String)<br> method: validate(Canvas3D) ???<br> public class CgFragmentShader extends CgShader<br> method: set/getShaderSource(String)<br> method: validate(Canvas3D) ???<br></pre>
+ </ul>
+ <li>New ShaderAppearance class:</li>
+ <ul>
+ <pre>public class ShaderAppearance extends Appearance<br> method: set/getShaderProgram(ShaderProgram)<br> method: set/getShaderAttributeSet(ShaderAttributeSet)<br></pre>
+ </ul>
+ <li>New ShaderAttributeSet class:</li>
+ <ul>
+ <pre>public class ShaderAttributeSet extends NodeComponent<br> method: put/get(ShaderAttribute)<br> ...<br></pre>
+ </ul>
</ul>
-
-<li>New ShaderAttributeSet class:</li>
-<ul>
-<pre>public class ShaderAttributeSet extends NodeComponent
- method: put/get(ShaderAttribute)
- ...
-</pre>
-</ul>
-
-</ul>
-
<p>Click on the following link for a current look at the <a
-href="http://javadesktop.org/java3d/javadoc/1.4.0-latest/index.html">javadoc-generated
+ href="http://javadesktop.org/java3d/javadoc/1.4.0-latest/index.html">javadoc-generated
API definitions</a> for the proposed 1.4 API.
</p>
-
<h4>Example Usage</h4>
<p>This is an example code excerpt showing how one might use the new
programmable shader API in a Java&nbsp;3D program.
</p>
<ul>
-<pre>String vertexShaderFile = "my-vertex-shader-file-name";
-String fragmentShaderFile = "my-fragment-shader-file-name";
-String vertexShaderSource;
-String fragmentShaderSource;
-
-// Read GLSL vertex and fragment shader source code from text files
-vertexShaderSource = StringIO.readFully(vertexShaderFile);
-fragmentShaderSource = StringIO.readFully(fragmentShaderSource);
-
-// Create GLSL vertex and fragment shader objects using the given source code
-GLSLVertexShader vertexShader = new GLSLVertexShader(vertexShaderSource);
-GLSLFragmentShader fragmentShader = new GLSLFragmentShader(fragmentShaderSource);
-
-// Create the GLSL shader program object and attach the vertex and
-// fragment shader objects; add an error listener
-GLSLShaderProgram shaderProgram = new GLSLShaderProgram();
-shaderProgram.setVertexShader(vertexShader);
-shaderProgram.setFragmentShader(fragmentShader);
-shaderProgram.addErrorListener(myGLSLErrorListener);
-
-// Use GLSL shader program object in appearance
-shaderAppearance.setShaderProgram(shaderProgram);
-</pre>
+ <pre>String vertexShaderFile = "my-vertex-shader-file-name";<br>String fragmentShaderFile = "my-fragment-shader-file-name";<br>String vertexShaderSource;<br>String fragmentShaderSource;<br><br>// Read GLSL vertex and fragment shader source code from text files<br>vertexShaderSource = StringIO.readFully(vertexShaderFile);<br>fragmentShaderSource = StringIO.readFully(fragmentShaderSource);<br><br>// Create GLSL vertex and fragment shader objects using the given source code<br>GLSLVertexShader vertexShader = new GLSLVertexShader(vertexShaderSource);<br>GLSLFragmentShader fragmentShader = new GLSLFragmentShader(fragmentShaderSource);<br><br>// Create the GLSL shader program object and attach the vertex and<br>// fragment shader objects; add an error listener<br>GLSLShaderProgram shaderProgram = new GLSLShaderProgram();<br>shaderProgram.setVertexShader(vertexShader);<br>shaderProgram.setFragmentShader(fragmentShader);<br>shaderProgram.addErrorListener(myGLSLErrorListener);<br><br>// Use GLSL shader program object in appearance<br>shaderAppearance.setShaderProgram(shaderProgram);<br></pre>
</ul>
<h4>Shader Parameters</h4>
-
<p>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.
</p>
-
<ol>
-
-<li><b>Uniform parameters</b> (attributes) are those parameters whose
+ <li><b>Uniform parameters</b> (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.<br>
-<br>
-
+ <br>
We have created a new ShaderAttributeSet for allowing applications to
specify uniform shader attributes. There are two ways in which values
can be specified for uniform attributes: explicitly, by providing a
-value; and implicitly, by defining a binding between a Java 3D system
+value; and implicitly, by defining a binding between a Java&nbsp;3D system
attribute and a uniform attribute. This functionality is provided by
two subclasses of ShaderAttribute: ShaderAttributeObject, which is
used to specify explicitly defined attributes; and
ShaderAttributeBinding, which is used to specify implicitly defined,
automatically tracked attributes. See the javadoc for the new <a
-href="http://javadesktop.org/java3d/javadoc/1.4.0-latest/javax/media/j3d/ShaderAttributeSet.html">ShaderAttributeSet</a>
+ href="http://javadesktop.org/java3d/javadoc/1.4.0-latest/javax/media/j3d/ShaderAttributeSet.html">ShaderAttributeSet</a>
and <a
-href="http://javadesktop.org/java3d/javadoc/1.4.0-latest/javax/media/j3d/ShaderAttribute.html">ShaderAttribute</a>
+ href="http://javadesktop.org/java3d/javadoc/1.4.0-latest/javax/media/j3d/ShaderAttribute.html">ShaderAttribute</a>
classes for more details.<br>
-<br>
-
-<b>Issues</b><br>
-
-<ul>
-
-<li>Should j3dAttrName be specified as a type-safe enum or object
+ <br>
+ <b>Issues</b><br>
+ <ul>
+ <li>Should j3dAttrName be specified as a type-safe enum or object
instead of a String?
- <ul><font color="gray"><li>No; we will use a String</li></font>
-</ul></li>
-
-<li>How do we handle passing arrays to the shader, especially for
+ <ul>
+ <font color="gray"><li>No; we will use a String</li>
+ </font>
+ </ul>
+ </li>
+ <li>How do we handle passing arrays to the shader, especially for
system parameters such as lights? One possibility is:
-
-<ul>
- "var" - scalar variable "var"<br>
- "arr[0]" - array element 0 of "arr"<br>
- "arr[1,3]" - subarray composed of elements 1 through 3 of "arr"<br>
- "arr[]" - entire array "arr"<br>
-</ul>
+ <ul>
+"var" - scalar variable "var"<br>
+"arr[0]" - array element 0 of "arr"<br>
+"arr[1,3]" - subarray composed of elements 1 through 3 of "arr"<br>
+"arr[]" - entire array "arr"<br>
+ </ul>
Alternatively, an object with a string or type-safe enum, a state
(scalar, array element, subarray, or entire array), and indices (as
needed).
- <ul><font color="gray"><li>TBD, but since they will be String objects, we will probably
-do something like the first suggestion</li></font>
-</ul></li>
-</ul>
-
-<br>
-<b>Automatic variables</b><br>
-
+ <ul>
+ <font color="gray"><li>TBD, but since they will be String
+objects, we will probably
+do something like the first suggestion</li>
+ </font>
+ </ul>
+ </li>
+ </ul>
+ <br>
+ <b>Automatic variables</b><br>
Depending on the shading language (and profile) being used, several
Java&nbsp;3D state attributes are automatically made available to the
shader program as pre-defined uniform attributes. The application
@@ -190,65 +120,65 @@ doesn't need to do anything to pass these attributes in to the shader
program. The implementation of each shader language (e.g., Cg, GLSL)
defines its own mapping from Java&nbsp;3D attribute to uniform
variable name.<br>
-<br>
-
+ <br>
A partial list of Java&nbsp;3D attributes that are mapped to shader
-attributes follows:
-</li>
-<br>
-<table style="text-align: left;" border="1" cellspacing="2"
-cellpadding="2">
-<tbody>
-<tr>
-<td style="vertical-align: top; text-decoration: underline;">Java&nbsp;3D
+attributes follows: </li>
+ <br>
+ <table style="text-align: left;" border="1" cellspacing="2"
+ cellpadding="2">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top; text-decoration: underline;">Java&nbsp;3D
Attribute<br>
-</td>
-<td style="vertical-align: top; text-decoration: underline;">Cg
+ </td>
+ <td style="vertical-align: top; text-decoration: underline;">Cg
shader variable<br>
-</td>
-<td style="vertical-align: top; text-decoration: underline;">GLSL
+ </td>
+ <td style="vertical-align: top; text-decoration: underline;">GLSL
shader variable<br>
-</td>
-</tr>
-<tr>
-<td style="vertical-align: top;">ModelViewProjection<br>
-</td>
-<td style="vertical-align: top;">glstate.matrix.mvp<br>
-</td>
-<td style="vertical-align: top;">gl_ModelViewProjectionMatrix<br>
-</td>
-</tr>
-<tr>
-<td style="vertical-align: top;">Light[<i>n</i>] pos<br>
-</td>
-<td style="vertical-align: top;">glstate.light[<i>n</i>].position </td>
-<td style="vertical-align: top;">gl_LightSource[<i>n</i>].position </td>
-</tr>
-<tr>
-<td style="vertical-align: top;">...<br>
-</td>
-<td style="vertical-align: top;">...<br>
-</td>
-<td style="vertical-align: top;">...<br>
-</td>
-</tr>
-</tbody>
-</table>
-<br>
-<li><b>Varying parameters</b> are those parameters that are specified
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">ModelViewProjection<br>
+ </td>
+ <td style="vertical-align: top;">glstate.matrix.mvp<br>
+ </td>
+ <td style="vertical-align: top;">gl_ModelViewProjectionMatrix<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">Light[<i>n</i>] pos<br>
+ </td>
+ <td style="vertical-align: top;">glstate.light[<i>n</i>].position
+ </td>
+ <td style="vertical-align: top;">gl_LightSource[<i>n</i>].position
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">...<br>
+ </td>
+ <td style="vertical-align: top;">...<br>
+ </td>
+ <td style="vertical-align: top;">...<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <br>
+ <li><b>Varying parameters</b> 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.<br>
-<br>
+ <br>
We need additional API to allow applications to pass in per-vertex
-varying parameters...<br> TODO: Finish this...<br>
-</li>
+varying parameters...<br>
+TODO: Finish this...<br>
+ </li>
</ol>
<p>TODO: more info here.
</p>
-<p><font color="gray">Page last updated &mdash;
+<p><font color="gray">Page last updated &#8212;
$Date$
-</font>
-</p>
+</font></p>
</body>
</html>
diff --git a/www/j3d1_4/stencil.html b/www/j3d1_4/stencil.html
new file mode 100644
index 0000000..92757af
--- /dev/null
+++ b/www/j3d1_4/stencil.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+ <title>Java 3D 1.4: Stencil Buffer</title>
+</head>
+<body>
+<h2>Java&nbsp;3D<sup><font size="-2">TM</font></sup> 1.4:
+Stencil Buffer</h2>
+<p>This page describes the proposed API changes for stencil buffer
+support in Java&nbsp;3D
+1.4...
+</p>
+<p>NOTE: THIS WILL NOT INCLUDE ANY MULTIPASS SUPPORT in 1.4
+</p>
+<p>The proposed API is:</p>
+<ul>
+ <li>New classes</li>
+ <ul>
+ <pre>public class XXXXX extends YYYYY<br> method: setXxxxx()<br></pre>
+ </ul>
+ <li>New methods in existing classes:<br>
+ </li>
+ <ul>
+ <pre>XXXXX<br> method: setXxxxx()<br></pre>
+ </ul>
+</ul>
+<p>More info here...
+</p>
+<p><font color="gray">Page last updated &#8212;
+$Date$
+</font></p>
+</body>
+</html>