|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.state.RenderState
com.jme.scene.state.VertexProgramState
public abstract class VertexProgramState
Implementation of the GL_ARB_vertex_program extension.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme.scene.state.RenderState |
---|
RenderState.StateType |
Field Summary | |
---|---|
protected static float[][] |
envparameters
Environmental parameters applied to all vertex programs |
protected float[][] |
parameters
Parameters local to this vertex program |
protected java.nio.ByteBuffer |
program
|
protected boolean |
usingParameters
If any local parameters for this VP state are set |
Fields inherited from class com.jme.scene.state.RenderState |
---|
QUICK_COMPARE, RS_BLEND, RS_CLIP, RS_COLORMASK_STATE, RS_CULL, RS_FOG, RS_FRAGMENT_PROGRAM, RS_GLSL_SHADER_OBJECTS, RS_LIGHT, RS_MATERIAL, RS_MAX_STATE, RS_SHADE, RS_STENCIL, RS_TEXTURE, RS_VERTEX_PROGRAM, RS_WIREFRAME, RS_ZBUFFER |
Constructor Summary | |
---|---|
VertexProgramState()
Creates a new VertexProgramState. |
Method Summary | |
---|---|
java.lang.Class<?> |
getClassTag()
|
abstract java.lang.String |
getProgram()
|
RenderState.StateType |
getStateType()
getStateType returns the type RenderState.StateType.VertexProgram |
int |
getType()
Deprecated. As of 2.0, use RenderState.getStateType() instead. |
abstract boolean |
isSupported()
isSupported determines if the ARB_vertex_program extension
is supported by current graphics configuration. |
abstract void |
load(java.lang.String programContents)
|
abstract void |
load(java.net.URL file)
load loads the vertex program from the specified file. |
void |
read(JMEImporter e)
|
static void |
setEnvParameter(float[] param,
int paramID)
setEnvParameter sets an environmental vertex program
parameter that is accessable by all vertex programs in memory. |
void |
setParameter(float[] param,
int paramID)
setParameter sets a parameter for this vertex program. |
void |
write(JMEExporter e)
|
Methods inherited from class com.jme.scene.state.RenderState |
---|
apply, createStateRecord, extract, isEnabled, needsRefresh, setEnabled, setNeedsRefresh, setQuickCompares |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static float[][] envparameters
protected boolean usingParameters
protected float[][] parameters
protected java.nio.ByteBuffer program
Constructor Detail |
---|
public VertexProgramState()
load(URL)
must be called before
the state can be used.
Method Detail |
---|
public static void setEnvParameter(float[] param, int paramID)
setEnvParameter
sets an environmental vertex program
parameter that is accessable by all vertex programs in memory.
param
- four-element array of floating point numbersparamID
- identity number of the parameter, ranging from 0 to 95public abstract boolean isSupported()
isSupported
determines if the ARB_vertex_program extension
is supported by current graphics configuration.
public void setParameter(float[] param, int paramID)
setParameter
sets a parameter for this vertex program.
paramID
- identity number of the parameter, ranging from 0 to 95param
- four-element array of floating point numberspublic int getType()
RenderState.getStateType()
instead.
RenderState
getType
in class RenderState
RenderState.getType()
public RenderState.StateType getStateType()
getStateType
returns the type RenderState.StateType.VertexProgram
getStateType
in class RenderState
RenderState.StateType.VertexProgram
RenderState.getStateType()
public abstract void load(java.net.URL file)
load
loads the vertex program from the specified file.
The program must be in ASCII format. We delegate the loading to each
implementation because we do not know in what format the underlying API
wants the data.
file
- text file containing the vertex programpublic abstract void load(java.lang.String programContents)
public abstract java.lang.String getProgram()
public void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class RenderState
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class RenderState
java.io.IOException
public java.lang.Class<?> getClassTag()
getClassTag
in interface Savable
getClassTag
in class RenderState
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |