M
- The type of shader parameterspublic abstract class R2AbstractInstanceShaderSingle<M> extends R2AbstractShader<R2AbstractInstanceShaderSingle.State,M> implements R2ShaderInstanceSingleType<M>
Modifier and Type | Class and Description |
---|---|
protected static class |
R2AbstractInstanceShaderSingle.State |
Modifier | Constructor and Description |
---|---|
protected |
R2AbstractInstanceShaderSingle(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,
R2ShaderStateChecking in_check) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
onActualReceiveInstanceTransformValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g,
R2MatricesInstanceSingleValuesType m) |
protected abstract void |
onActualReceiveMaterialValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g,
R2ShaderParametersMaterialType<M> mat_parameters) |
protected abstract void |
onActualReceiveViewValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g,
R2ShaderParametersViewType view_parameters) |
protected void |
onCheckActivated() |
protected void |
onCheckDeactivated() |
protected com.io7m.jfsm.core.FSMEnumMutable<R2AbstractInstanceShaderSingle.State> |
onCheckGetFSM() |
protected void |
onCheckValidated() |
void |
onReceiveInstanceTransformValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g,
R2MatricesInstanceSingleValuesType m)
Set shader values that are derived from the current instance
transform.
|
void |
onReceiveMaterialValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g,
R2ShaderParametersMaterialType<M> mat_parameters)
Set material values.
|
void |
onReceiveViewValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g,
R2ShaderParametersViewType view_parameters)
Set shader values that are derived from the current view.
|
delete, environment, isDeleted, onActivate, onDeactivate, onValidate, shaderID, shaderProgram
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delete, wrap
environment, onActivate, onDeactivate, onValidate, shaderID, shaderParametersType, shaderProgram
protected R2AbstractInstanceShaderSingle(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, R2ShaderStateChecking in_check) throws R2ExceptionShaderPreprocessingFailed
protected abstract void onActualReceiveViewValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g, R2ShaderParametersViewType view_parameters)
protected abstract void onActualReceiveMaterialValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g, R2ShaderParametersMaterialType<M> mat_parameters)
protected abstract void onActualReceiveInstanceTransformValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g, R2MatricesInstanceSingleValuesType m)
protected final com.io7m.jfsm.core.FSMEnumMutable<R2AbstractInstanceShaderSingle.State> onCheckGetFSM()
onCheckGetFSM
in class R2AbstractShader<R2AbstractInstanceShaderSingle.State,M>
protected final void onCheckActivated()
onCheckActivated
in class R2AbstractShader<R2AbstractInstanceShaderSingle.State,M>
protected final void onCheckDeactivated()
onCheckDeactivated
in class R2AbstractShader<R2AbstractInstanceShaderSingle.State,M>
protected final void onCheckValidated()
onCheckValidated
in class R2AbstractShader<R2AbstractInstanceShaderSingle.State,M>
public final void onReceiveViewValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g, R2ShaderParametersViewType view_parameters)
R2ShaderInstanceSingleUsableType
Set shader values that are derived from the current view.
This method will be called exactly once between calls to R2ShaderUsableType.onActivate(JCGLInterfaceGL33Type)
and R2ShaderUsableType.onValidate()
.
onReceiveViewValues
in interface R2ShaderInstanceSingleUsableType<M>
g
- An OpenGL interfaceview_parameters
- The view parameterspublic final void onReceiveMaterialValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g, R2ShaderParametersMaterialType<M> mat_parameters)
R2ShaderInstanceSingleUsableType
Set material values.
This method will be called once for each group of instances that use the
material M
.
This method will be called after a call to R2ShaderUsableType.onActivate(JCGLInterfaceGL33Type)
and before a call to R2ShaderUsableType.onValidate()
.
onReceiveMaterialValues
in interface R2ShaderInstanceSingleUsableType<M>
g
- A texture interfacemat_parameters
- The material parameterspublic final void onReceiveInstanceTransformValues(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g, R2MatricesInstanceSingleValuesType m)
R2ShaderInstanceSingleUsableType
Set shader values that are derived from the current instance transform.
This method will be called exactly once for each single instance that uses the shader.
This method will be called after a call to R2ShaderUsableType.onActivate(JCGLInterfaceGL33Type)
and before a call to R2ShaderUsableType.onValidate()
.
onReceiveInstanceTransformValues
in interface R2ShaderInstanceSingleUsableType<M>
g
- An OpenGL interfacem
- The instance matricesCopyright © 2017 <code@io7m.com> http://io7m.com