S
- The type of shader state identifiersM
- The type of shader parameterspublic abstract class R2AbstractShader<S extends Enum<S>,M> extends Object implements R2ShaderType<M>
Modifier | Constructor and Description |
---|---|
protected |
R2AbstractShader(com.io7m.jcanephora.core.api.JCGLShadersType in_shaders,
R2ShaderPreprocessingEnvironmentReadableType in_shader_env,
R2IDPoolType in_pool,
String in_name,
String in_vertex,
Optional<String> in_geometry,
String in_fragment) |
Modifier and Type | Method and Description |
---|---|
void |
delete(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)
Delete the current object.
|
Map<String,String> |
environment() |
boolean |
isDeleted() |
void |
onActivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)
Activate the shader for rendering.
|
protected abstract void |
onCheckActivated() |
protected abstract void |
onCheckDeactivated() |
protected abstract com.io7m.jfsm.core.FSMEnumMutable<S> |
onCheckGetFSM() |
protected abstract void |
onCheckValidated() |
void |
onDeactivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)
Deactivate the shader.
|
void |
onValidate()
Validate the shader prior to executing a draw call.
|
long |
shaderID() |
com.io7m.jcanephora.core.JCGLProgramShaderUsableType |
shaderProgram() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
wrap
shaderParametersType
protected R2AbstractShader(com.io7m.jcanephora.core.api.JCGLShadersType in_shaders, R2ShaderPreprocessingEnvironmentReadableType in_shader_env, R2IDPoolType in_pool, String in_name, String in_vertex, Optional<String> in_geometry, String in_fragment) throws R2ExceptionShaderPreprocessingFailed
public final Map<String,String> environment()
environment
in interface R2ShaderUsableType<M>
protected abstract com.io7m.jfsm.core.FSMEnumMutable<S> onCheckGetFSM()
protected abstract void onCheckActivated()
protected abstract void onCheckDeactivated()
protected abstract void onCheckValidated()
public final void onValidate() throws R2ExceptionShaderValidationFailed
R2ShaderUsableType
onValidate
in interface R2ShaderUsableType<M>
R2ExceptionShaderValidationFailed
- If validation failspublic final boolean isDeleted()
isDeleted
in interface com.io7m.jcanephora.core.JCGLResourceUsableType
public final void onActivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)
R2ShaderUsableType
onActivate
in interface R2ShaderUsableType<M>
g
- A GL interfacepublic final void onDeactivate(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)
R2ShaderUsableType
onDeactivate
in interface R2ShaderUsableType<M>
g
- A GL interfacepublic final void delete(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g)
R2DeletableType
delete
in interface R2DeletableType
g
- An OpenGL interfacepublic final com.io7m.jcanephora.core.JCGLProgramShaderUsableType shaderProgram()
shaderProgram
in interface R2ShaderUsableType<M>
public final long shaderID()
shaderID
in interface R2ShaderUsableType<M>
Copyright © 2017 <code@io7m.com> http://io7m.com