j3d.org Aviatrix3D

org.j3d.aviatrix3d
Class GLSLangShader

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.NodeComponent
          extended byorg.j3d.aviatrix3d.Shader
              extended byorg.j3d.aviatrix3d.GLSLangShader
All Implemented Interfaces:
java.lang.Comparable

public class GLSLangShader
extends Shader
implements java.lang.Comparable

Shader handler for shaders written with the OpenGL GLSLang 1.0 shader language.

This is a placeholder for now. There is no functional code here as we need to wait for JOGL to officially support OpenGL 1.5 and the ARB shader extensions contained therein.

Version:
$Revision: 1.2 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.NodeComponent
liveCount
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, updateHandler, WRITE_TIMING_MSG
 
Constructor Summary
GLSLangShader()
          Constructs a shader with default values.
 
Method Summary
 int compareTo(GLSLangShader sh)
          Compares this object with the specified object for order.
 int compareTo(java.lang.Object o)
          Compares this object with the specified object for order.
 boolean equals(GLSLangShader sh)
          Compares this object with the specified object to check for equivalence.
 boolean equals(java.lang.Object o)
          Compare this object for equality to the given object.
 java.lang.String getProgramString()
          Get the currently set program string.
 void setProgramString(java.lang.String str)
          Set the program string that is to be registered by this shader.
 
Methods inherited from class org.j3d.aviatrix3d.NodeComponent
addParent, getParents, hasChanged, numParents, removeParent, renderState, restoreState
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
checkForCyclicChild, checkForCyclicParent, dataChanged, getUserData, isLive, setLive, setUpdateHandler, setUserData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLSLangShader

public GLSLangShader()
Constructs a shader with default values.

Method Detail

compareTo

public int compareTo(java.lang.Object o)
              throws java.lang.ClassCastException
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Derived classes should extend this one to add the extra comparisons needed.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - The objec to be compared
Returns:
-1, 0 or 1 depending on order
Throws:
java.lang.ClassCastException - The specified object's type prevents it from being compared to this Object

equals

public boolean equals(java.lang.Object o)
Compare this object for equality to the given object.

Parameters:
o - The object to be compared
Returns:
True if these represent the same values

setProgramString

public void setProgramString(java.lang.String str)
                      throws InvalidWriteTimingException
Set the program string that is to be registered by this shader. Setting a value of null will clear the current shader and prevent it from being rendered next frame.

Parameters:
str - The new program string to be registered or null
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener callback method

getProgramString

public java.lang.String getProgramString()
Get the currently set program string. If none is set, return null.

Returns:
The current string or null

compareTo

public int compareTo(GLSLangShader sh)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Derived classes should extend this one to add the extra comparisons needed.

Parameters:
sh - The shader instances to be compared
Returns:
-1, 0 or 1 depending on order

equals

public boolean equals(GLSLangShader sh)
Compares this object with the specified object to check for equivalence.

Parameters:
sh - The shader instance to be compared
Returns:
true if the objects represent identical values

j3d.org Aviatrix3D

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - j3d.org