Package com.ardor3d.renderer.state
Class FragmentProgramState
java.lang.Object
com.ardor3d.renderer.state.RenderState
com.ardor3d.renderer.state.FragmentProgramState
- All Implemented Interfaces:
Savable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ardor3d.renderer.state.RenderState
RenderState.StateStack, RenderState.StateType
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected float[][]
Parameters local to this fragment programprotected ByteBuffer
protected boolean
If any local parameters for this FP state are setFields inherited from class com.ardor3d.renderer.state.RenderState
_quickCompare
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat[][]
int
void
_setProgramID
(int id) getType()
boolean
void
Loads the fragment program into a byte array.void
Loads the fragment program into a byte array.void
read
(InputCapsule capsule) void
setParameter
(float[] param, int paramID) setParameter
sets a parameter for this fragment program.void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.renderer.state.RenderState
createState, extract, getClassTag, isEnabled, needsRefresh, setEnabled, setNeedsRefresh, setQuickCompares
-
Field Details
-
usingParameters
protected boolean usingParametersIf any local parameters for this FP state are set -
parameters
protected float[][] parametersParameters local to this fragment program -
program
-
_programID
protected int _programID
-
-
Constructor Details
-
FragmentProgramState
public FragmentProgramState()
-
-
Method Details
-
setParameter
public void setParameter(float[] param, int paramID) setParameter
sets a parameter for this fragment program.- Parameters:
param
- four-element array of floating point numbersparamID
- identity number of the parameter, ranging from 0 to 23
-
getType
- Specified by:
getType
in classRenderState
- Returns:
- An statetype enum value for the subclass.
- See Also:
-
load
Loads the fragment program into a byte array.- Parameters:
file
- the URL of the file containing the fragment program to load- See Also:
-
load
Loads the fragment program into a byte array.- Parameters:
programContents
- the content of the fragment program to load- See Also:
-
getProgramAsBuffer
-
_getProgramID
public int _getProgramID() -
_setProgramID
public void _setProgramID(int id) -
isUsingParameters
public boolean isUsingParameters() -
_getParameters
public float[][] _getParameters() -
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classRenderState
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classRenderState
- Throws:
IOException
-
createStateRecord
- Specified by:
createStateRecord
in classRenderState
-