public abstract class MaterialPass extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
MaterialPass.BlendMode |
Blend the pass with the rest of the scene.
|
static class |
MaterialPass.SceneBlend |
Different options for scene blending transparency.
|
static class |
MaterialPass.Transparency |
The transparency can be computed in different ways, they are exposed in
this enum.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
MaterialPass() |
Full constructor.
|
protected |
MaterialPass(List<TextureUnit> unitList,
MaterialPass.Transparency transparency,
MaterialPass.BlendMode blend) |
Copy constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
TextureUnit |
createUnit() |
Create a texture unit for this pass.
|
protected abstract TextureUnit |
createUnitImpl(int index) |
Create the unit in implementation.
|
MaterialPass |
disableLight() |
The lights will no longer affect the material pass.
|
protected abstract void |
disableLightImpl() |
Disable the light for this material in implementation.
|
MaterialPass |
enableColor(boolean show) |
Show or hide colors for this pass units.
|
protected abstract void |
enableColorImpl(boolean show) |
Enable or disable color in implementation.
|
MaterialPass.BlendMode |
getBlendMode() |
|
MaterialPass.Transparency |
getTransparency() |
|
TextureUnit |
getUnit(int index) |
|
MaterialPass |
passProjectionMatrixToVertexShader() |
Pass the projection matrix to the 'projectionMatrix' vertex shader parameter.
|
MaterialPass |
passViewMatrixToVertexShader() |
Pass the view matrix to the 'viewMatrix' vertex shader parameter.
|
MaterialPass |
setAmbient(Color color) |
Set the ambient color value.
|
protected abstract void |
setAmbientImpl(Color color) |
Set the ambient color in implementation.
|
MaterialPass |
setBlendMode(MaterialPass.BlendMode mode) |
Apply a blend mode to the pass.
|
protected abstract MaterialPass |
setBlendModeImpl(MaterialPass.BlendMode mode) |
Set the blend mode in implementation.
|
abstract MaterialPass |
setDepthWrite(boolean enable) |
Enable or disable the depth write.
|
MaterialPass |
setDiffuse(Color color) |
Set a diffuse color.
|
protected abstract void |
setDiffuseImpl(Color color) |
Set the diffuse color in implementation.
|
abstract MaterialPass |
setEmissive(Color color) |
Set the emissive color.
|
MaterialPass |
setFragmentShader(FragmentShader shader) |
Set a shader fragment program to this pass.
|
abstract MaterialPass |
setFragmentShader(String name) |
Set a shader fragment program to this pass.
|
abstract MaterialPass |
setFragmentShaderParameter(ShaderParamColor param) |
Set the parameters for a fragment program.
|
abstract MaterialPass |
setFragmentShaderParameter(ShaderParamFloat param) |
Set the parameters for a fragment program.
|
abstract MaterialPass |
setFragmentShaderParameter(ShaderParamFloat2 param) |
Set the parameters for a fragment program.
|
abstract MaterialPass |
setFragmentShaderParameter(ShaderParamFloat3 param) |
Set the parameters for a fragment program.
|
abstract MaterialPass |
setFragmentShaderParameter(ShaderParamFloat4 param) |
Set the parameters for a fragment program.
|
abstract MaterialPass |
setFragmentShaderParameterAuto(String name,
ShaderConstantType auto) |
Set the auto parameters for a fragment program.
|
abstract MaterialPass |
setFragmentShaderParameterAuto(String name,
ShaderConstantType auto,
int param) |
Set the auto parameters for a fragment program.
|
abstract MaterialPass |
setSceneBlend(MaterialPass.SceneBlend blend1,
MaterialPass.SceneBlend blend2) |
The the scene blending.
|
MaterialPass |
setTransparency(MaterialPass.Transparency capability) |
Modify the transparent capability of this pass.
|
protected abstract MaterialPass |
setTransparentCapabilityImpl(MaterialPass.Transparency capability) |
Set the transparent capability in implementation.
|
MaterialPass |
setVertexShader(VertexShader shader) |
Set a shader fragment program to this pass.
|
abstract MaterialPass |
setVertexShader(String name) |
Set a shader vertex program to this pass.
|
abstract MaterialPass |
setVertexShaderParameter(ShaderParamColor param) |
Set the parameters for a fragment program.
|
abstract MaterialPass |
setVertexShaderParameter(ShaderParamFloat param) |
Set the parameters for a vertex program.
|
abstract MaterialPass |
setVertexShaderParameter(ShaderParamFloat2 param) |
Set the parameters for a vertex program.
|
abstract MaterialPass |
setVertexShaderParameter(ShaderParamFloat3 param) |
Set the parameters for a vertex program.
|
abstract MaterialPass |
setVertexShaderParameter(ShaderParamFloat4 param) |
Set the parameters for a vertex program.
|
abstract MaterialPass |
setVertexShaderParameterAuto(String name,
ShaderConstantType auto) |
Set the auto parameters for a vertex program.
|
abstract MaterialPass |
setVertexShaderParameterAuto(String name,
ShaderConstantType auto,
int param) |
Set the auto parameters for a vertex program.
|
protected MaterialPass()
protected MaterialPass(List<TextureUnit> unitList, MaterialPass.Transparency transparency, MaterialPass.BlendMode blend)
unitList - List of associated texture units.transparency - Transparency value.blend - Blend mode value.public final TextureUnit createUnit()
public final MaterialPass setDiffuse(Color color)
color - Diffuse color value.public final MaterialPass enableColor(boolean show)
show - true to show, false to hide.public final MaterialPass disableLight()
protected abstract void disableLightImpl()
public abstract MaterialPass setSceneBlend(MaterialPass.SceneBlend blend1, MaterialPass.SceneBlend blend2)
blend1 - Source blending factor.blend2 - Destination blending factor.public final MaterialPass setAmbient(Color color)
color - Ambient color to use.protected abstract TextureUnit createUnitImpl(int index)
index - Associated index.protected abstract void enableColorImpl(boolean show)
show - true will enable the color, false
will disable it.protected abstract void setDiffuseImpl(Color color)
color - Diffuse color value.protected abstract void setAmbientImpl(Color color)
color - Ambient color value.public final TextureUnit getUnit(int index)
index - Texture unit index.public final MaterialPass setTransparency(MaterialPass.Transparency capability)
capability - New capability value.public final MaterialPass setBlendMode(MaterialPass.BlendMode mode)
mode - Mode to use.public final MaterialPass.Transparency getTransparency()
public final MaterialPass.BlendMode getBlendMode()
public final MaterialPass passViewMatrixToVertexShader()
public final MaterialPass passProjectionMatrixToVertexShader()
protected abstract MaterialPass setTransparentCapabilityImpl(MaterialPass.Transparency capability)
capability - Value to set.protected abstract MaterialPass setBlendModeImpl(MaterialPass.BlendMode mode)
mode - Mode to apply.public abstract MaterialPass setEmissive(Color color)
color - Color to set as emissive.public abstract MaterialPass setDepthWrite(boolean enable)
enable - true to enable, false to disable.public abstract MaterialPass setVertexShader(String name)
name - Program name.public abstract MaterialPass setFragmentShader(String name)
name - Program name.public final MaterialPass setFragmentShader(FragmentShader shader)
shader - Shader to set.public final MaterialPass setVertexShader(VertexShader shader)
shader - Shader to set.public abstract MaterialPass setFragmentShaderParameter(ShaderParamFloat4 param)
param - Parameter param.public abstract MaterialPass setFragmentShaderParameter(ShaderParamFloat3 param)
param - Parameter param.public abstract MaterialPass setFragmentShaderParameter(ShaderParamFloat2 param)
param - Parameter param.public abstract MaterialPass setFragmentShaderParameter(ShaderParamFloat param)
param - Parameter param.public abstract MaterialPass setFragmentShaderParameter(ShaderParamColor param)
param - Parameter param.public abstract MaterialPass setFragmentShaderParameterAuto(String name, ShaderConstantType auto)
name - Parameter name.auto - Parameter automatically updated from graphic engine.public abstract MaterialPass setFragmentShaderParameterAuto(String name, ShaderConstantType auto, int param)
name - Parameter name.auto - Parameter automatically updated from graphic engine.param - Additional parameter.public abstract MaterialPass setVertexShaderParameter(ShaderParamFloat4 param)
param - Parameter param.public abstract MaterialPass setVertexShaderParameter(ShaderParamFloat3 param)
param - Parameter param.public abstract MaterialPass setVertexShaderParameter(ShaderParamFloat2 param)
param - Parameter param.public abstract MaterialPass setVertexShaderParameter(ShaderParamFloat param)
param - Parameter param.public abstract MaterialPass setVertexShaderParameter(ShaderParamColor param)
param - Parameter param.public abstract MaterialPass setVertexShaderParameterAuto(String name, ShaderConstantType auto, int param)
name - Parameter name.auto - Parameter automatically updated from graphic engine.param - Additional parameter.public abstract MaterialPass setVertexShaderParameterAuto(String name, ShaderConstantType auto)
name - Parameter name.auto - Parameter automatically updated from graphic engine.Copyright © 2014–2018. All rights reserved.