org.xith3d.scenegraph
Class GLSLShaderProgram

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.NodeComponent
          extended by org.xith3d.scenegraph.ShaderProgram<GLSLShader>
              extended by org.xith3d.scenegraph.GLSLShaderProgram
All Implemented Interfaces:
java.lang.Comparable<ShaderProgram<GLSLShader>>, org.jagatoo.datatypes.Enableable, org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, StateTrackable<ShaderProgram<GLSLShader>>

public class GLSLShaderProgram
extends ShaderProgram<GLSLShader>

Created on Jul 7, 2006 by florian for project 'xith3d_glsl_shader_support'


Field Summary
protected  boolean linked
           
protected  boolean linkingError
           
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
GLSLShaderProgram()
           
GLSLShaderProgram(boolean enabled)
           
GLSLShaderProgram(GLSLVertexShader vertexShader, GLSLFragmentShader fragmentShader)
           
GLSLShaderProgram(GLSLVertexShader vertexShader, GLSLFragmentShader fragmentShader, boolean enabled)
           
 
Method Summary
 GLSLShaderProgram cloneNodeComponent(boolean forceDuplicate)
           
 int compareTo(ShaderProgram<GLSLShader> o)
          
protected  void duplicateNodeComponent(NodeComponent original, boolean forceDuplicate)
           
 boolean equals(java.lang.Object o)
          
protected  void finalize()
          
 void freeOpenGLResources(CanvasPeer canvasPeer)
          This method frees OpenGL resources (names) for all this NodeComponent and all child-components.
 GLSLShaderProgram getCopy()
           
 SceneGraphOpenGLReferences getOpenGLReferences()
           
 boolean hasLinkingError()
           
 boolean isLinked()
           
 
Methods inherited from class org.xith3d.scenegraph.ShaderProgram
addShader, getFragmentShader, getNumFragmentShaders, getNumShaders, getNumVertexShaders, getStateId, getStateNode, getVertexShader, isEnabled, removeAllShaders, removeShader, setDirty, setEnabled, setStateNode
 
Methods inherited from class org.xith3d.scenegraph.NodeComponent
freeOpenGLResources, getDuplicateOnCloneTree, getModListener, isChanged, isChanged2, setChanged, setDuplicateOnCloneTree, setModListener
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

linked

protected boolean linked

linkingError

protected boolean linkingError
Constructor Detail

GLSLShaderProgram

public GLSLShaderProgram(boolean enabled)

GLSLShaderProgram

public GLSLShaderProgram()

GLSLShaderProgram

public GLSLShaderProgram(GLSLVertexShader vertexShader,
                         GLSLFragmentShader fragmentShader,
                         boolean enabled)

GLSLShaderProgram

public GLSLShaderProgram(GLSLVertexShader vertexShader,
                         GLSLFragmentShader fragmentShader)
Method Detail

getOpenGLReferences

public final SceneGraphOpenGLReferences getOpenGLReferences()

finalize

protected void finalize()

Overrides:
finalize in class java.lang.Object

freeOpenGLResources

public void freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all this NodeComponent and all child-components.

Overrides:
freeOpenGLResources in class ShaderProgram<GLSLShader>

isLinked

public final boolean isLinked()

hasLinkingError

public final boolean hasLinkingError()

getCopy

public GLSLShaderProgram getCopy()
Returns:
a copy of the state of the referenced trackable object.

duplicateNodeComponent

protected void duplicateNodeComponent(NodeComponent original,
                                      boolean forceDuplicate)
Overrides:
duplicateNodeComponent in class ShaderProgram<GLSLShader>

cloneNodeComponent

public GLSLShaderProgram cloneNodeComponent(boolean forceDuplicate)
Specified by:
cloneNodeComponent in class NodeComponent

equals

public boolean equals(java.lang.Object o)
Description copied from class: ShaderProgram

Specified by:
equals in class ShaderProgram<GLSLShader>

compareTo

public int compareTo(ShaderProgram<GLSLShader> o)
Description copied from class: ShaderProgram

Specified by:
compareTo in interface java.lang.Comparable<ShaderProgram<GLSLShader>>
Specified by:
compareTo in class ShaderProgram<GLSLShader>