com.jme.scene.state.lwjgl
Class LWJGLVertexProgramState
java.lang.Object
com.jme.scene.state.RenderState
com.jme.scene.state.VertexProgramState
com.jme.scene.state.lwjgl.LWJGLVertexProgramState
- All Implemented Interfaces:
- Savable
public class LWJGLVertexProgramState
- extends VertexProgramState
Implementation of the GL_ARB_vertex_program extension.
- Version:
- $Id: LWJGLVertexProgramState.java,v 1.10 2004/08/07 21:53:18
ericthered Exp $
- Author:
- Eric Woroshow, Joshua Slack - reworked for StateRecords.
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 |
Method Summary |
void |
apply()
Applies this vertex program to the current scene. |
StateRecord |
createStateRecord()
|
java.lang.String |
getProgram()
|
boolean |
isSupported()
Determines if the current OpenGL context supports the
GL_ARB_vertex_program extension. |
void |
load(java.lang.String programContents)
Loads the vertex program into a byte array. |
void |
load(java.net.URL file)
Loads the vertex program into a byte array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LWJGLVertexProgramState
public LWJGLVertexProgramState()
isSupported
public boolean isSupported()
- Determines if the current OpenGL context supports the
GL_ARB_vertex_program extension.
- Specified by:
isSupported
in class VertexProgramState
- Returns:
- if ARB vertex programs are supported
- See Also:
VertexProgramState.isSupported()
load
public void load(java.net.URL file)
- Loads the vertex program into a byte array.
- Specified by:
load
in class VertexProgramState
- Parameters:
file
- text file containing the vertex program- See Also:
VertexProgramState.load(java.net.URL)
load
public void load(java.lang.String programContents)
- Loads the vertex program into a byte array.
- Specified by:
load
in class VertexProgramState
- See Also:
VertexProgramState.load(java.net.URL)
getProgram
public java.lang.String getProgram()
- Specified by:
getProgram
in class VertexProgramState
apply
public void apply()
- Applies this vertex program to the current scene. Checks if the
GL_ARB_vertex_program extension is supported before attempting to enable
this program.
- Specified by:
apply
in class RenderState
- See Also:
RenderState.apply()
createStateRecord
public StateRecord createStateRecord()
- Specified by:
createStateRecord
in class RenderState