Package com.ardor3d.renderer.state
Class VertexProgramState
java.lang.Object
com.ardor3d.renderer.state.RenderState
com.ardor3d.renderer.state.VertexProgramState
- All Implemented Interfaces:
Savable
Implementation of the GL_ARB_vertex_program extension.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ardor3d.renderer.state.RenderState
RenderState.StateStack, RenderState.StateType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static float[][]Environmental parameters applied to all vertex programsprotected float[][]Parameters local to this vertex programprotected ByteBufferprotected intprotected booleanIf any local parameters for this VP state are setFields inherited from class com.ardor3d.renderer.state.RenderState
_quickCompare -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic float[][]float[][]intvoid_setProgramID(int id) getType()booleanvoidLoads the vertex program into a byte array.voidvoidread(InputCapsule capsule) static voidsetEnvParameter(float[] param, int paramID) setEnvParametersets an environmental vertex program parameter that is accessible by all vertex programs in memory.voidsetParameter(float[] param, int paramID) setParametersets a parameter for this vertex program.voidwrite(OutputCapsule capsule) Methods inherited from class com.ardor3d.renderer.state.RenderState
createState, extract, getClassTag, isEnabled, needsRefresh, setEnabled, setNeedsRefresh, setQuickCompares
-
Field Details
-
_envparameters
protected static float[][] _envparametersEnvironmental parameters applied to all vertex programs -
_usingParameters
protected boolean _usingParametersIf any local parameters for this VP state are set -
_parameters
protected float[][] _parametersParameters local to this vertex program -
_program
-
_programID
protected int _programID
-
-
Constructor Details
-
VertexProgramState
public VertexProgramState()Creates a new VertexProgramState.load(URL)must be called before the state can be used.
-
-
Method Details
-
setEnvParameter
public static void setEnvParameter(float[] param, int paramID) setEnvParametersets an environmental vertex program parameter that is accessible by all vertex programs in memory.- Parameters:
param- four-element array of floating point numbersparamID- identity number of the parameter, ranging from 0 to 95
-
setParameter
public void setParameter(float[] param, int paramID) setParametersets a parameter for this vertex program.- Parameters:
param- four-element array of floating point numbersparamID- identity number of the parameter, ranging from 0 to 95
-
getType
- Specified by:
getTypein classRenderState- Returns:
- An statetype enum value for the subclass.
- See Also:
-
load
-
load
Loads the vertex program into a byte array.- Parameters:
programContents- the content of the vertex program to load- See Also:
-
getProgramAsBuffer
-
_getProgramID
public int _getProgramID() -
_setProgramID
public void _setProgramID(int id) -
isUsingParameters
public boolean isUsingParameters() -
_getParameters
public float[][] _getParameters() -
_getEnvParameters
public static float[][] _getEnvParameters() -
write
- Specified by:
writein interfaceSavable- Overrides:
writein classRenderState- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Overrides:
readin classRenderState- Throws:
IOException
-
createStateRecord
- Specified by:
createStateRecordin classRenderState
-