com.jme.scene.state.jogl
Class JOGLShaderObjectsState
java.lang.Object
com.jme.scene.state.RenderState
com.jme.scene.state.GLSLShaderObjectsState
com.jme.scene.state.jogl.JOGLShaderObjectsState
- All Implemented Interfaces:
- Savable
public class JOGLShaderObjectsState
- extends GLSLShaderObjectsState
Implementation of the GL_ARB_shader_objects extension.
- Author:
- Thomas Hourdel, Joshua Slack (attributes and StateRecord), Rikard Herlitz (MrCoder)
| 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 those shader objects to the current scene. |
void |
checkAttributeSizeLimits()
Check if we are keeping the size limits in terms of attribute locations
on the card. |
void |
checkUniformSizeLimits()
Check if we are keeping the size limits in terms of uniform locations
on the card. |
void |
cleanup()
Frees the memory and invalidates the shader handle |
StateRecord |
createStateRecord()
|
protected void |
sendToGL(java.nio.ByteBuffer vertexByteBuffer,
java.nio.ByteBuffer fragmentByteBuffer)
Loads the shader object. |
| Methods inherited from class com.jme.scene.state.GLSLShaderObjectsState |
clearAttributes, clearUniforms, getAttributeByName, getClassTag, getFragmentShader, getShaderAttributes, getShaderUniforms, getStateType, getType, getUniformByName, getVertexShader, isSupported, load, load, load, load, overrideSupport, read, resetSupport, setAttributePointer, setAttributePointer, setAttributePointer, setAttributePointer, setGeometry, setShaderDataLogic, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JOGLShaderObjectsState
public JOGLShaderObjectsState()
JOGLShaderObjectsState
public JOGLShaderObjectsState(JOGLContextCapabilities caps)
sendToGL
protected void sendToGL(java.nio.ByteBuffer vertexByteBuffer,
java.nio.ByteBuffer fragmentByteBuffer)
- Loads the shader object. Use null for an empty vertex or empty fragment
shader.
- Specified by:
sendToGL in class GLSLShaderObjectsState
- Parameters:
vertexByteBuffer - vertex shaderfragmentByteBuffer - fragment shader- See Also:
GLSLShaderObjectsState.load(java.net.URL,
java.net.URL)
apply
public void apply()
- Applies those shader objects to the current scene. Checks if the
GL_ARB_shader_objects extension is supported before attempting to enable
those objects.
- Specified by:
apply in class RenderState
- See Also:
RenderState.apply()
createStateRecord
public StateRecord createStateRecord()
- Specified by:
createStateRecord in class RenderState
checkAttributeSizeLimits
public void checkAttributeSizeLimits()
- Description copied from class:
GLSLShaderObjectsState
- Check if we are keeping the size limits in terms of attribute locations
on the card.
- Overrides:
checkAttributeSizeLimits in class GLSLShaderObjectsState
checkUniformSizeLimits
public void checkUniformSizeLimits()
- Description copied from class:
GLSLShaderObjectsState
- Check if we are keeping the size limits in terms of uniform locations
on the card.
- Overrides:
checkUniformSizeLimits in class GLSLShaderObjectsState
cleanup
public void cleanup()
- Description copied from class:
GLSLShaderObjectsState
- Frees the memory and invalidates the shader handle
- Specified by:
cleanup in class GLSLShaderObjectsState
- See Also:
GLSLShaderObjectsState.cleanup()
Copyright 2003-2009 jMonkeyEngine