Package WildMagic.LibGraphics.Shaders
Class VertexShader
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.Shaders.Shader
-
- WildMagic.LibGraphics.Shaders.VertexShader
-
- All Implemented Interfaces:
java.io.Serializable
,StreamInterface
public class VertexShader extends Shader implements StreamInterface, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Fields inherited from class WildMagic.LibGraphics.Shaders.Shader
m_kImageNames, m_kSamplerImageNames, m_kShaderName, m_kTextures, m_kUserData, m_spkProgram, pixelShaderTexture2, pixelShaderTextureTransparent2, vertexShaderTexture2, vertexShaderTexture3
-
-
Constructor Summary
Constructors Constructor Description VertexShader()
Default constructor.VertexShader(java.lang.String rkShaderName)
Create a vertex shader with the input shader name:VertexShader(java.lang.String rkShaderName, java.lang.String rkProgramText)
The constructor called by the derived classes VertexShader and PixelShader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
GetDiskUsed(StreamVersion rkVersion)
Returns the size of this object and it's children on disk for the current StreamVersion parameter.Program
GetProgram()
Return the vertex program in this vertex shader.void
Link(Stream rkStream, Stream.Link pkLink)
Copies this objects children objects from the input Stream's HashTable, based on the LinkID of the child stored in the pkLink parameter.void
Load(Stream rkStream, Stream.Link pkLink)
Loads this object from the input parameter rkStream, using the input Stream.Link to store the IDs of children objects of this object for linking after all objects are loaded from the Stream.boolean
Register(Stream rkStream)
Registers this object with the input Stream parameter.void
Save(Stream rkStream)
Write this object and all it's children to the Stream.StringTree
SaveStrings(java.lang.String acTitle)
Write this object into a StringTree for the scene-graph visualization.-
Methods inherited from class WildMagic.LibGraphics.Shaders.Shader
dispose, GetGetSamplerInformation, GetImageName, GetShaderName, GetTexture, GetTexture, GetTextureQuantity, OnLoadProgram, OnReleaseProgram, SetImageName, SetTexture, SetTextureQuantity
-
Methods inherited from class WildMagic.LibGraphics.ObjectSystem.GraphicsObject
GetAllObjectsByName, GetID, GetName, GetNextID, GetObjectByID, GetObjectByIDBase, GetObjectByName, GetObjectByNameBase, SetName
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VertexShader
public VertexShader()
Default constructor.
-
VertexShader
public VertexShader(java.lang.String rkShaderName)
Create a vertex shader with the input shader name:- Parameters:
rkShaderName
- shader name.
-
VertexShader
public VertexShader(java.lang.String rkShaderName, java.lang.String rkProgramText)
The constructor called by the derived classes VertexShader and PixelShader.- Parameters:
rkShaderName
- shader name.rkProgramText
- shader program text.
-
-
Method Detail
-
GetDiskUsed
public int GetDiskUsed(StreamVersion rkVersion)
Returns the size of this object and it's children on disk for the current StreamVersion parameter.- Specified by:
GetDiskUsed
in interfaceStreamInterface
- Overrides:
GetDiskUsed
in classShader
- Parameters:
rkVersion
- the current version of the Stream file being created.- Returns:
- the size of this object on disk.
-
GetProgram
public final Program GetProgram()
Return the vertex program in this vertex shader.- Returns:
- the vertex program in this vertex shader.
-
Link
public void Link(Stream rkStream, Stream.Link pkLink)
Copies this objects children objects from the input Stream's HashTable, based on the LinkID of the child stored in the pkLink parameter.- Specified by:
Link
in interfaceStreamInterface
- Overrides:
Link
in classShader
- Parameters:
rkStream
- the Stream where the child objects are stored.pkLink
- the Link class from which the child object IDs are read.
-
Load
public void Load(Stream rkStream, Stream.Link pkLink)
Loads this object from the input parameter rkStream, using the input Stream.Link to store the IDs of children objects of this object for linking after all objects are loaded from the Stream.- Specified by:
Load
in interfaceStreamInterface
- Overrides:
Load
in classShader
- Parameters:
rkStream
- the Stream from which this object is being read.pkLink
- the Link class for storing the IDs of this object's children objects.
-
Register
public boolean Register(Stream rkStream)
Registers this object with the input Stream parameter. All objects streamed to disk are registered with the Stream so that a unique list of objects is maintained.- Specified by:
Register
in interfaceStreamInterface
- Overrides:
Register
in classShader
- Parameters:
rkStream
- the Stream where the child objects are stored.- Returns:
- true if this object is registered, false if the object has already been registered.
-
Save
public void Save(Stream rkStream)
Write this object and all it's children to the Stream.- Specified by:
Save
in interfaceStreamInterface
- Overrides:
Save
in classShader
- Parameters:
rkStream
- the Stream where the child objects are stored.
-
SaveStrings
public StringTree SaveStrings(java.lang.String acTitle)
Write this object into a StringTree for the scene-graph visualization.- Specified by:
SaveStrings
in interfaceStreamInterface
- Overrides:
SaveStrings
in classShader
- Parameters:
acTitle
- the header for this object in the StringTree.- Returns:
- StringTree containing a String-based representation of this object and it's children.
-
-