Aviatrix3D
2.0 Dev

org.j3d.aviatrix3d
Class GL14ShaderProgram

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.NodeComponent
          extended byorg.j3d.aviatrix3d.GL14ShaderProgram
Direct Known Subclasses:
FragmentShader, VertexShader

public abstract class GL14ShaderProgram
extends NodeComponent

Base class representing a single shader program that can be applied to the rendering pipeline.

Version:
$Revision: 1.5 $
Author:
Justin Couch

Field Summary
protected  boolean programChanged
          Flag to say that the string has changed and should be recompiled
protected  int programId
          The ID of the shader program that has been allocated here
protected  java.lang.String programString
          The program string that is stored as the shader
 
Fields inherited from class org.j3d.aviatrix3d.NodeComponent
lastParent, liveCount, parentList
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG
 
Constructor Summary
GL14ShaderProgram()
          Constructs a Shader with default values.
 
Method Summary
 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, getRenderable, hasChanged, numParents, removeParent
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
checkForCyclicChild, checkForCyclicParent, dataChanged, getUserData, isLive, setLive, setUpdateHandler, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

programString

protected java.lang.String programString
The program string that is stored as the shader


programChanged

protected boolean programChanged
Flag to say that the string has changed and should be recompiled


programId

protected int programId
The ID of the shader program that has been allocated here

Constructor Detail

GL14ShaderProgram

public GL14ShaderProgram()
Constructs a Shader with default values.

Method Detail

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

Aviatrix3D
2.0 Dev

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