Package jni
Class JniMaterialPass
- java.lang.Object
-
- jni.JniMaterialPass
-
public class JniMaterialPass extends Object
- Author:
- Grégory Van den Borre
-
-
Constructor Summary
Constructors Constructor Description JniMaterialPass()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
blend(long pointer, int blendOperation)
Set the blend operation to apply to this pass.void
complexBlend(long pointerAddress, int blend1, int blend2)
Set a complex blend effect.long
createUnit(long pointer)
Call to native code to create a new unit.void
disableColor(long pointer)
Call to native code to disable color.void
disableLight(long pointer)
Call to native code to disable lights affecting this material pass.void
enableColor(long pointer)
Call to native code to enable color.long
getUnit(long pointer, int index)
Get a unit from its index.void
setAlphaRejection(long address, int value)
Set the alpha rejection.void
setAlphaTransparency(long pointer)
Call to native code to enable alpha transparency.void
setAmbient(long pointer, float red, float green, float blue)
Call to native code to set the ambient color.void
setColorTransparency(long pointer)
Call to native code to enable color transparency.void
setDepthWrite(long address, boolean enabled)
Enable or disable depth write.void
setDiffuse(long pointer, float red, float green, float blue, float alpha)
Call to native code to set the diffuse color.void
setEmissive(long pointer, float red, float green, float blue)
Set the emissive color in native code.void
setFragmentProgram(long pointer, String name)
Set a shader fragment program.void
setFragmentProgramParameterAuto(long pointerAddress, String name, int constant)
Set an automatic parameter to a fragment program.void
setFragmentProgramParameterAutoP(long pointerAddress, String name, int constant, int param)
Set an automatic parameter to a fragment program.void
setFragmentProgramParameterColor(long pointer, String name, float v1, float v2, float v3, float v4)
Set a parameter to a fragment program.void
setFragmentProgramParameterFloat(long pointer, String name, float value)
Set a parameter to a fragment program.void
setFragmentProgramParameterFloat2(long pointer, String name, float v1, float v2)
Set a parameter to a fragment program.void
setFragmentProgramParameterFloat3(long pointer, String name, float v1, float v2, float v3)
Set a parameter to a fragment program.void
setFragmentProgramParameterFloat4(long pointer, String name, float v1, float v2, float v3, float v4)
Set a parameter to a fragment program.void
setVertexProgram(long pointer, String name)
Set a shader vertex program.void
setVertexProgramParameterAuto(long pointerAddress, String name, int constant)
Set an automatic parameter to a vertex program.void
setVertexProgramParameterAutoP(long pointerAddress, String name, int constant, int param)
Set an automatic parameter to a vertex program.void
setVertexProgramParameterColor(long pointer, String name, float v1, float v2, float v3, float v4)
Set a parameter to a vertex program.void
setVertexProgramParameterFloat(long pointer, String name, float value)
Set a parameter to a vertex program.void
setVertexProgramParameterFloat2(long pointer, String name, float v1, float v2)
Set a parameter to a vertex program.void
setVertexProgramParameterFloat3(long pointer, String name, float v1, float v2, float v3)
Set a parameter to a vertex program.void
setVertexProgramParameterFloat4(long pointer, String name, float v1, float v2, float v3, float v4)
Set a parameter to a vertex program.
-
-
-
Method Detail
-
enableColor
public void enableColor(long pointer)
Call to native code to enable color.- Parameters:
pointer
- Native pointer value.
-
disableColor
public void disableColor(long pointer)
Call to native code to disable color.- Parameters:
pointer
- Native pointer value.
-
createUnit
public long createUnit(long pointer)
Call to native code to create a new unit.- Parameters:
pointer
- Native pointer value.- Returns:
- The new unit pointer value.
-
setAlphaTransparency
public void setAlphaTransparency(long pointer)
Call to native code to enable alpha transparency.- Parameters:
pointer
- Native pointer value.
-
setColorTransparency
public void setColorTransparency(long pointer)
Call to native code to enable color transparency.- Parameters:
pointer
- Native pointer value.
-
setDiffuse
public void setDiffuse(long pointer, float red, float green, float blue, float alpha)
Call to native code to set the diffuse color.- Parameters:
pointer
- Native pointer value.red
- Red value.green
- Green value.blue
- Blue value.alpha
- Alpha value.
-
setAmbient
public void setAmbient(long pointer, float red, float green, float blue)
Call to native code to set the ambient color.- Parameters:
pointer
- Native pointer value.red
- Red value.green
- Green value.blue
- Blue value.
-
disableLight
public void disableLight(long pointer)
Call to native code to disable lights affecting this material pass.- Parameters:
pointer
- Native pointer value.
-
blend
public void blend(long pointer, int blendOperation)
Set the blend operation to apply to this pass.- Parameters:
pointer
- Native pointer value.blendOperation
- 0 is add, 1 subtract, 2 reverse subtract, 3 min, 4 max.
-
setEmissive
public void setEmissive(long pointer, float red, float green, float blue)
Set the emissive color in native code.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.red
- Emissive red value.green
- Emissive green value.blue
- Emissive blue value.
-
complexBlend
public void complexBlend(long pointerAddress, int blend1, int blend2)
Set a complex blend effect.- Parameters:
pointerAddress
- Pointer address to the native Ogre::Pass.blend1
- First blend effect to apply.blend2
- Second blend effect to apply.
-
setDepthWrite
public void setDepthWrite(long address, boolean enabled)
Enable or disable depth write.- Parameters:
address
- Pointer address to the native Ogre::Pass.enabled
-true
to enable,false
to disable.
-
setAlphaRejection
public void setAlphaRejection(long address, int value)
Set the alpha rejection.- Parameters:
address
- Pointer address to the native Ogre::Pass.value
- Alpha value for pixel, between 0 and 255 but for hardware compatibility, max should be 128.
-
getUnit
public long getUnit(long pointer, int index)
Get a unit from its index.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.index
- Unit index.- Returns:
- The found unit pointer.
-
setVertexProgram
public void setVertexProgram(long pointer, String name)
Set a shader vertex program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Vertex program name.
-
setFragmentProgram
public void setFragmentProgram(long pointer, String name)
Set a shader fragment program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Fragment program name.
-
setFragmentProgramParameterColor
public void setFragmentProgramParameterColor(long pointer, String name, float v1, float v2, float v3, float v4)
Set a parameter to a fragment program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Parameter name.v1
- Parameter red.v2
- Parameter green.v3
- Parameter blue.v4
- Parameter alpha.
-
setFragmentProgramParameterFloat
public void setFragmentProgramParameterFloat(long pointer, String name, float value)
Set a parameter to a fragment program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Parameter name.value
- Parameter value.
-
setFragmentProgramParameterFloat2
public void setFragmentProgramParameterFloat2(long pointer, String name, float v1, float v2)
Set a parameter to a fragment program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Parameter name.v1
- Parameter value 1.v2
- Parameter value 2.
-
setFragmentProgramParameterFloat3
public void setFragmentProgramParameterFloat3(long pointer, String name, float v1, float v2, float v3)
Set a parameter to a fragment program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Parameter name.v1
- Parameter value 1.v2
- Parameter value 2.v3
- Parameter value 3.
-
setFragmentProgramParameterFloat4
public void setFragmentProgramParameterFloat4(long pointer, String name, float v1, float v2, float v3, float v4)
Set a parameter to a fragment program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Parameter name.v1
- Parameter value 1.v2
- Parameter value 2.v3
- Parameter value 3.v4
- Parameter value 4.
-
setFragmentProgramParameterAuto
public void setFragmentProgramParameterAuto(long pointerAddress, String name, int constant)
Set an automatic parameter to a fragment program.- Parameters:
pointerAddress
- Pointer address to the native Ogre::Pass.name
- Parameter name.constant
- Automatic parameter enum value.
-
setFragmentProgramParameterAutoP
public void setFragmentProgramParameterAutoP(long pointerAddress, String name, int constant, int param)
Set an automatic parameter to a fragment program.- Parameters:
pointerAddress
- Pointer address to the native Ogre::Pass.name
- Parameter name.constant
- Automatic parameter enum value.param
- Additional parameter.
-
setVertexProgramParameterColor
public void setVertexProgramParameterColor(long pointer, String name, float v1, float v2, float v3, float v4)
Set a parameter to a vertex program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Parameter name.v1
- Parameter red.v2
- Parameter green.v3
- Parameter blue.v4
- Parameter alpha.
-
setVertexProgramParameterFloat
public void setVertexProgramParameterFloat(long pointer, String name, float value)
Set a parameter to a vertex program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Parameter name.value
- Parameter value.
-
setVertexProgramParameterFloat2
public void setVertexProgramParameterFloat2(long pointer, String name, float v1, float v2)
Set a parameter to a vertex program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Parameter name.v1
- Parameter value 1.v2
- Parameter value 2.
-
setVertexProgramParameterFloat3
public void setVertexProgramParameterFloat3(long pointer, String name, float v1, float v2, float v3)
Set a parameter to a vertex program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Parameter name.v1
- Parameter value 1.v2
- Parameter value 2.v3
- Parameter value 3.
-
setVertexProgramParameterFloat4
public void setVertexProgramParameterFloat4(long pointer, String name, float v1, float v2, float v3, float v4)
Set a parameter to a vertex program.- Parameters:
pointer
- Pointer address to the native Ogre::Pass.name
- Parameter name.v1
- Parameter value 1.v2
- Parameter value 2.v3
- Parameter value 3.v4
- Parameter value 4.
-
setVertexProgramParameterAuto
public void setVertexProgramParameterAuto(long pointerAddress, String name, int constant)
Set an automatic parameter to a vertex program.- Parameters:
pointerAddress
- Pointer address to the native Ogre::Pass.name
- Parameter name.constant
- Automatic parameter enum value.
-
setVertexProgramParameterAutoP
public void setVertexProgramParameterAutoP(long pointerAddress, String name, int constant, int param)
Set an automatic parameter to a vertex program.- Parameters:
pointerAddress
- Pointer address to the native Ogre::Pass.name
- Parameter name.constant
- Automatic parameter enum value.param
- Additional parameter.
-
-