The IMaterial graph node interface. More...

#include "murl_graph_i_material.h"

Inheritance diagram for Murl::Graph::IMaterial:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual IMaterialNodeTargetGetSubMaterialNodeTarget ()=0
 Get the mutable container holding the optional child materials. More...
 
virtual const IMaterialNodeTargetGetSubMaterialNodeTarget () const =0
 Get the constant container holding the optional child materials. More...
 
virtual IProgramNodeTargetGetProgramNodeTarget ()=0
 Get the mutable Graph::IProgramNodeTarget container. More...
 
virtual const IProgramNodeTargetGetProgramNodeTarget () const =0
 Get the constant Graph::IProgramNodeTarget container. More...
 
virtual Bool SetVisibleFaces (IEnums::PolygonFaces faces)=0
 Set which faces of a triangle are visible for rendering. More...
 
virtual IEnums::PolygonFaces GetVisibleFaces () const =0
 Check which faces of a triangle are visible for rendering. More...
 
virtual Bool SetColorBufferMode (IEnums::ColorBufferMode mode)=0
 Set the material's color buffer access mode. More...
 
virtual IEnums::ColorBufferMode GetColorBufferMode () const =0
 Get the material's color buffer access mode. More...
 
virtual Bool SetColorBufferMask (IEnums::ColorBufferMask mask)=0
 Set the material's color buffer mask. More...
 
virtual IEnums::ColorBufferMask GetColorBufferMask () const =0
 Get the material's color buffer mask. More...
 
virtual Bool SetDepthBufferMode (IEnums::DepthBufferMode mode)=0
 Set the material's depth buffer access mode. More...
 
virtual IEnums::DepthBufferMode GetDepthBufferMode () const =0
 Get the material's depth buffer access mode. More...
 
virtual Bool SetDepthBufferMask (IEnums::DepthBufferMask mask)=0
 Set the material's depth buffer mask. More...
 
virtual IEnums::DepthBufferMask GetDepthBufferMask () const =0
 Get the material's depth buffer mask. More...
 
virtual Bool SetDepthTestFunction (IEnums::DepthTestFunction function)=0
 Set the material's depth test function. More...
 
virtual IEnums::DepthTestFunction GetDepthTestFunction () const =0
 Get the material's depth test function. More...
 
virtual Bool SetStencilBufferMode (IEnums::StencilBufferMode mode)=0
 Set the material's stencil buffer access mode. More...
 
virtual IEnums::StencilBufferMode GetStencilBufferMode () const =0
 Get the material's stencil buffer access mode. More...
 
virtual Bool SetStencilBufferMask (IEnums::StencilBufferMask mask)=0
 Set the material's stencil buffer mask. More...
 
virtual IEnums::StencilBufferMask GetStencilBufferMask () const =0
 Get the material's stencil buffer mask. More...
 
virtual Bool SetStencilTestFunction (IEnums::StencilTestFunction frontFunction, IEnums::StencilTestFunction backFunction)=0
 Set the material's stencil test functions. More...
 
virtual IEnums::StencilTestFunction GetFrontStencilTestFunction () const =0
 Set the material's stencil test function for front-facing primitives. More...
 
virtual IEnums::StencilTestFunction GetBackStencilTestFunction () const =0
 Set the material's stencil test function for back-facing primitives. More...
 
virtual Bool SetStencilTestReferenceValue (UInt32 frontValue, UInt32 backValue)=0
 Set the material's stencil test reference values. More...
 
virtual UInt32 GetFrontStencilTestReferenceValue () const =0
 Get the material's stencil test reference value for testing front-facing primitives. More...
 
virtual UInt32 GetBackStencilTestReferenceValue () const =0
 Get the material's stencil test reference value for testing back-facing primitives. More...
 
virtual Bool SetStencilTestMask (UInt32 frontMask, UInt32 backMask)=0
 Set the material's stencil test masks. More...
 
virtual UInt32 GetFrontStencilTestMask () const =0
 Get the material's stencil test mask for front-facing primitives. More...
 
virtual UInt32 GetBackStencilTestMask () const =0
 Get the material's stencil test mask for back-facing primitives. More...
 
virtual Bool SetStencilBufferActionForFailedStencilTest (IEnums::StencilBufferAction frontAction, IEnums::StencilBufferAction backAction)=0
 Set the actions to be performed if the stencil test fails. More...
 
virtual IEnums::StencilBufferAction GetFrontStencilBufferActionForFailedStencilTest () const =0
 Get the front-facing primitive stencil buffer action for failed stencil tests. More...
 
virtual IEnums::StencilBufferAction GetBackStencilBufferActionForFailedStencilTest () const =0
 Get the back-facing primitive stencil buffer action for failed stencil tests. More...
 
virtual Bool SetStencilBufferActionForFailedDepthTest (IEnums::StencilBufferAction frontAction, IEnums::StencilBufferAction backAction)=0
 Set the actions to be performed if the stencil test passes, but the depth test fails. More...
 
virtual IEnums::StencilBufferAction GetFrontStencilBufferActionForFailedDepthTest () const =0
 Get the front-facing primitive stencil buffer action for failed depth tests. More...
 
virtual IEnums::StencilBufferAction GetBackStencilBufferActionForFailedDepthTest () const =0
 Get the back-facing primitive stencil buffer action for failed depth tests. More...
 
virtual Bool SetStencilBufferActionForPassedDepthTest (IEnums::StencilBufferAction frontAction, IEnums::StencilBufferAction backAction)=0
 Set the actions to be performed if both the stencil test and the depth test pass. More...
 
virtual IEnums::StencilBufferAction GetFrontStencilBufferActionForPassedDepthTest () const =0
 Get the front-facing primitive stencil buffer action for passed depth tests. More...
 
virtual IEnums::StencilBufferAction GetBackStencilBufferActionForPassedDepthTest () const =0
 Get the back-facing primitive stencil buffer action for passed depth tests. More...
 
virtual Bool SetBlendMode (IEnums::BlendMode mode)=0
 Set the material's blend mode. More...
 
virtual IEnums::BlendMode GetBlendMode () const =0
 Get the material's blend mode. More...
 
virtual Bool SetBlendFunction (IEnums::BlendFunction srcColorFunction, IEnums::BlendFunction srcAlphaFunction, IEnums::BlendFunction dstColorFunction, IEnums::BlendFunction dstAlphaFunction)=0
 Set the material's blending functions. More...
 
virtual IEnums::BlendFunction GetSrcColorBlendFunction () const =0
 Get the material's blending function used for the source pixels' RGB values. More...
 
virtual IEnums::BlendFunction GetSrcAlphaBlendFunction () const =0
 Get the material's blending function used for the source pixels' alpha value. More...
 
virtual IEnums::BlendFunction GetDstColorBlendFunction () const =0
 Get the material's blending function used for the destination pixels' RGB values. More...
 
virtual IEnums::BlendFunction GetDstAlphaBlendFunction () const =0
 Get the material's blending function used for the destination pixels' alpha value. More...
 
virtual Bool SetBlendEquation (IEnums::BlendEquation colorEquation, IEnums::BlendEquation alphaEquation)=0
 Set the material's blending equations. More...
 
virtual IEnums::BlendEquation GetColorBlendEquation () const =0
 Get the material's blending equation for RGB values. More...
 
virtual IEnums::BlendEquation GetAlphaBlendEquation () const =0
 Get the material's blending equation for alpha values. More...
 
virtual Bool SetColorBufferClearingEnabled (Bool enabled)=0
 Enable/disable clearing of the render target's color buffer. More...
 
virtual Bool IsColorBufferClearingEnabled () const =0
 Check if clearing of the render target's color buffer is enabled. More...
 
virtual Bool SetDepthBufferClearingEnabled (Bool enabled)=0
 Enable/disable clearing of the render target's depth buffer. More...
 
virtual Bool IsDepthBufferClearingEnabled () const =0
 Check if clearing of the render target's depth buffer is enabled. More...
 
virtual Bool SetStencilBufferClearingEnabled (Bool enabled)=0
 Enable/disable clearing of the render target's stencil buffer. More...
 
virtual Bool IsStencilBufferClearingEnabled () const =0
 Check if clearing of the render target's stencil buffer is enabled. More...
 
virtual Bool SetColorBufferClearValue (const Color &value)=0
 Set the clear color in effect when color buffer clearing is enabled. More...
 
virtual const ColorGetColorBufferClearValue () const =0
 Get the clear color in effect when color buffer clearing is enabled. More...
 
virtual Bool SetDepthBufferClearValue (Real value)=0
 Set the clear value in effect when depth buffer clearing is enabled. More...
 
virtual Real GetDepthBufferClearValue () const =0
 Get the clear value in effect when depth buffer clearing is enabled. More...
 
virtual Bool SetStencilBufferClearValue (UInt32 value)=0
 Set the clear value in effect when stencil buffer clearing is enabled. More...
 
virtual UInt32 GetStencilBufferClearValue () const =0
 Get the clear value in effect when stencil buffer clearing is enabled. More...
 
virtual Bool SetObjectSortMode (IEnums::ObjectSortMode mode)=0
 Set the material's object sorting mode. More...
 
virtual IEnums::ObjectSortMode GetObjectSortMode () const =0
 Get the material's object sorting mode. More...
 
virtual Bool SetSortOrder (SInt32 order)=0
 Set the material's sorting order relative to other materials. More...
 
virtual SInt32 GetSortOrder () const =0
 Get the material's sorting order relative to other materials. More...
 
virtual Bool SetVariableDepthOffset (Real offset)=0
 Set the variable offset for depth buffer value calculation. More...
 
virtual Real GetVariableDepthOffset () const =0
 Get the variable offset for depth buffer value calculation. More...
 
virtual Bool SetConstantDepthOffset (Real offset)=0
 Set the constant offset for depth buffer value calculation. More...
 
virtual Real GetConstantDepthOffset () const =0
 Get the constant offset for depth buffer value calculation. More...
 
virtual Bool SetCameraSlot (SInt32 cameraSlot)=0
 Set the material's camera slot. More...
 
virtual Bool SetLayerOffset (SInt32 layerOffset)=0
 Set the material's layer offset. More...
 
virtual Bool SetParametersStage (SInt32 parametersStage)=0
 Set the material's parameters pass. More...
 
virtual Bool SetTextureStage (UInt32 unit, SInt32 textureStage)=0
 Set the material's texture pass for a given unit. More...
 
virtual Bool SetLightStageUnit (SInt32 unit)=0
 Set the light stage unit used for multi-pass lighting. More...
 
virtual Bool SetLightMaskEnabled (Bool enabled)=0
 Set if the light should be masked for multi-pass lighting. More...
 
virtual Bool SetMinNumberOfLightStages (UInt32 minNumStages)=0
 Set the material's minimum number of light stages. More...
 
virtual Bool SetMaxNumberOfLightStages (UInt32 maxNumStages)=0
 Set the material's maximum number of light stages. More...
 
virtual UInt32 GetNumberOfDetailLevels () const =0
 Get the material's number of detail levels. More...
 
virtual UInt32 GetNumberOfStages (UInt32 detailLevel) const =0
 Get the material's number of stages for a given detail level. More...
 
virtual SInt32 GetCameraSlot (UInt32 detailLevel, UInt32 stage) const =0
 Get the material's camera slot for a given stage. More...
 
virtual SInt32 GetLayerOffset (UInt32 detailLevel, UInt32 stage) const =0
 Get the material's layer offset for a given stage. More...
 
virtual SInt32 GetParametersStage (UInt32 detailLevel, UInt32 stage) const =0
 Get the material's parameter stage for a given material stage. More...
 
virtual SInt32 GetTextureStage (UInt32 detailLevel, UInt32 stage, UInt32 unit) const =0
 Get the material's texture stage for a given material stage and texture unit. More...
 
virtual SInt32 GetLightStageUnit (UInt32 detailLevel, UInt32 stage) const =0
 Get the light stage unit used for multi-stage lighting for a given material stage. More...
 
virtual Bool IsLightMaskEnabled (UInt32 detailLevel, UInt32 stage) const =0
 Check if the light is masked for multi-pass lighting. More...
 
virtual UInt32 GetMinNumberOfLightStages (UInt32 detailLevel, UInt32 stage) const =0
 Get the material's minimum number of light stages for a given material stage. More...
 
virtual UInt32 GetMaxNumberOfLightStages (UInt32 detailLevel, UInt32 stage) const =0
 Get the material's maximum number of light stages for a given material stage. More...
 
virtual UInt32 GetNumberOfLightStages (UInt32 detailLevel, UInt32 stage, UInt32 numLights) const =0
 Get the material's minimum number of light stages for a given material stage. More...
 
virtual Video::IMaterialGetVideoMaterialObject (UInt32 detailLevel, UInt32 stage) const =0
 Get the material's internal video renderer object for a given index. More...
 
- Public Member Functions inherited from Murl::Graph::IStateSlot
virtual Bool SetSlot (SInt32 slot)=0
 Set the slot index to use. More...
 
virtual SInt32 GetSlot () const =0
 Get the slot index to use. More...
 

Detailed Description

The IMaterial graph node interface.

Material nodes hold common rendering parameters that cannot be controlled via GPU shader programs or fixed function programs, such as e.g. depth and stencil buffer access modes and actions, or different blend modes and blend equations.

A material must always refer to exactly one Graph::IProgram, which is used to calculate actual per-pixel color values.

Use the Graph::IStateSlot base interface to set or get the material slot index this material is temporarily attached to if any children are present.

See Output-States, Slots und Units for an overview of state handling during scene graph traversal.
See Graph::IMaterialState for activating a material for rendering. See Graph::IProgram for defining GPU programs to refer to. See Graph::IParameters for defining actual program parameters.

Member Function Documentation

◆ GetNodeInterface() [1/2]

virtual INode* Murl::Graph::IMaterial::GetNodeInterface ( )
pure virtual

Get the mutable Graph::INode interface.

This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.

Returns
The mutable Graph::INode interface, or null if not available

◆ GetNodeInterface() [2/2]

virtual const INode* Murl::Graph::IMaterial::GetNodeInterface ( ) const
pure virtual

Get the constant Graph::INode interface.

This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Returns
The constant Graph::INode interface, or null if not available

◆ GetSubMaterialNodeTarget() [1/2]

virtual IMaterialNodeTarget* Murl::Graph::IMaterial::GetSubMaterialNodeTarget ( )
pure virtual

Get the mutable container holding the optional child materials.

This method returns a mutable pointer to the node's Graph::IMaterialNodeTarget sub container, which is used to store multiple sub-materials.

Returns
The mutable Graph::IMaterialNodeTarget container, or null if not available.

◆ GetSubMaterialNodeTarget() [2/2]

virtual const IMaterialNodeTarget* Murl::Graph::IMaterial::GetSubMaterialNodeTarget ( ) const
pure virtual

Get the constant container holding the optional child materials.

This method returns a constant pointer to the node's Graph::IMaterialNodeTarget sub container, which is used to store multiple sub-materials.

Returns
The constant Graph::IMaterialNodeTarget container, or null if not available.

◆ GetProgramNodeTarget() [1/2]

virtual IProgramNodeTarget* Murl::Graph::IMaterial::GetProgramNodeTarget ( )
pure virtual

Get the mutable Graph::IProgramNodeTarget container.

This method returns a mutable pointer to the node's Graph::IProgramNodeTarget container, which allows to set or query the program object used with this material.

Returns
The mutable Graph::IProgramNodeTarget container, or null if not available.

◆ GetProgramNodeTarget() [2/2]

virtual const IProgramNodeTarget* Murl::Graph::IMaterial::GetProgramNodeTarget ( ) const
pure virtual

Get the constant Graph::IProgramNodeTarget container.

This method returns a constant pointer to the node's Graph::IProgramNodeTarget container, which allows to query the program object used with this material.

Returns
The mutable Graph::IProgramNodeTarget container, or null if not available.

◆ SetVisibleFaces()

virtual Bool Murl::Graph::IMaterial::SetVisibleFaces ( IEnums::PolygonFaces  faces)
pure virtual

Set which faces of a triangle are visible for rendering.

Parameters
facesOne of the available IEnums::PolygonFaces enumeration values.
Returns
true if successful.

◆ GetVisibleFaces()

virtual IEnums::PolygonFaces Murl::Graph::IMaterial::GetVisibleFaces ( ) const
pure virtual

Check which faces of a triangle are visible for rendering.

Returns
One of the available IEnums::PolygonFaces enumeration values.

◆ SetColorBufferMode()

virtual Bool Murl::Graph::IMaterial::SetColorBufferMode ( IEnums::ColorBufferMode  mode)
pure virtual

Set the material's color buffer access mode.

The color buffer access mode can be set to either IEnums::COLOR_BUFFER_MODE_WRITE_ONLY to enable writing to the color buffer, or IEnums::COLOR_BUFFER_MODE_NONE to disable color output. Use SetColorBufferMask() to enable/disable specific color channels when writing is enabled.

Parameters
modeThe color buffer access mode.
Returns
true if successful.

◆ GetColorBufferMode()

virtual IEnums::ColorBufferMode Murl::Graph::IMaterial::GetColorBufferMode ( ) const
pure virtual

Get the material's color buffer access mode.

Returns
The color buffer access mode.

◆ SetColorBufferMask()

virtual Bool Murl::Graph::IMaterial::SetColorBufferMask ( IEnums::ColorBufferMask  mask)
pure virtual

Set the material's color buffer mask.

If color buffer writes are enabled, and a specific bit is set in the given mask, the respective color channel is enabled for writing, otherwise that channel is not written to the output pixels. To generally enable/disable color buffer writes, use SetColorBufferMode().

Parameters
maskThe color buffer write mask.
Returns
true if successful.

◆ GetColorBufferMask()

virtual IEnums::ColorBufferMask Murl::Graph::IMaterial::GetColorBufferMask ( ) const
pure virtual

Get the material's color buffer mask.

Returns
The color buffer write mask.

◆ SetDepthBufferMode()

virtual Bool Murl::Graph::IMaterial::SetDepthBufferMode ( IEnums::DepthBufferMode  mode)
pure virtual

Set the material's depth buffer access mode.

The depth buffer access mode can be set to enable/disable both depth buffer reads and writes, through one of the available IEnums::DepthBufferMode values.

Parameters
modeThe depth buffer access mode.
Returns
true if successful.

◆ GetDepthBufferMode()

virtual IEnums::DepthBufferMode Murl::Graph::IMaterial::GetDepthBufferMode ( ) const
pure virtual

Get the material's depth buffer access mode.

Returns
The depth buffer access mode.

◆ SetDepthBufferMask()

virtual Bool Murl::Graph::IMaterial::SetDepthBufferMask ( IEnums::DepthBufferMask  mask)
pure virtual

Set the material's depth buffer mask.

This method can be used to independently enable/disable depth buffer writes in addition to the general depth buffer access mode set via SetDepthBufferMode().

Parameters
maskThe depth buffer write mask.
Returns
true if successful.

◆ GetDepthBufferMask()

virtual IEnums::DepthBufferMask Murl::Graph::IMaterial::GetDepthBufferMask ( ) const
pure virtual

Get the material's depth buffer mask.

Returns
The depth buffer write mask.

◆ SetDepthTestFunction()

virtual Bool Murl::Graph::IMaterial::SetDepthTestFunction ( IEnums::DepthTestFunction  function)
pure virtual

Set the material's depth test function.

If the material's depth buffer access mode is set to either IEnums::DEPTH_BUFFER_MODE_READ_ONLY or IEnums::DEPTH_BUFFER_MODE_READ_AND_WRITE, the given function is used for all depth buffer comparisons using this material. The output pixel is only written if the result of its depth comparison is true using the given function.

Parameters
functionThe depth test function.
Returns
true if successful.

◆ GetDepthTestFunction()

virtual IEnums::DepthTestFunction Murl::Graph::IMaterial::GetDepthTestFunction ( ) const
pure virtual

Get the material's depth test function.

Returns
The depth test function.

◆ SetStencilBufferMode()

virtual Bool Murl::Graph::IMaterial::SetStencilBufferMode ( IEnums::StencilBufferMode  mode)
pure virtual

Set the material's stencil buffer access mode.

The stencil buffer access mode can be set to enable/disable both stencil buffer reads and writes, through one of the available IEnums::StencilBufferMode values.

Parameters
modeThe stencil buffer access mode.
Returns
true if successful.

◆ GetStencilBufferMode()

virtual IEnums::StencilBufferMode Murl::Graph::IMaterial::GetStencilBufferMode ( ) const
pure virtual

Get the material's stencil buffer access mode.

Returns
The stencil buffer access mode.

◆ SetStencilBufferMask()

virtual Bool Murl::Graph::IMaterial::SetStencilBufferMask ( IEnums::StencilBufferMask  mask)
pure virtual

Set the material's stencil buffer mask.

If stencil buffer writes are enabled, and a specific bit is set in the given mask, the respective stencil bit is enabled for writing, otherwise that bit is not written to the output pixels. To generally enable/disable stencil buffer writes, use SetStencilBufferMode().

Parameters
maskThe stencil buffer write mask.
Returns
true if successful.

◆ GetStencilBufferMask()

virtual IEnums::StencilBufferMask Murl::Graph::IMaterial::GetStencilBufferMask ( ) const
pure virtual

Get the material's stencil buffer mask.

Returns
The stencil buffer write mask.

◆ SetStencilTestFunction()

virtual Bool Murl::Graph::IMaterial::SetStencilTestFunction ( IEnums::StencilTestFunction  frontFunction,
IEnums::StencilTestFunction  backFunction 
)
pure virtual

Set the material's stencil test functions.

If the material's stencil buffer access mode is set to either IEnums::STENCIL_BUFFER_MODE_READ_ONLY or IEnums::STENCIL_BUFFER_MODE_READ_AND_WRITE, the given functions are used for all stencil buffer comparisons using this material. The output pixel is only written if the result of its stencil comparison is true using the given function.

Parameters
frontFunctionThe stencil test function used for front-facing primitives.
backFunctionThe stencil test function used for back-facing primitives.
Returns
true if successful.

◆ GetFrontStencilTestFunction()

virtual IEnums::StencilTestFunction Murl::Graph::IMaterial::GetFrontStencilTestFunction ( ) const
pure virtual

Set the material's stencil test function for front-facing primitives.

Returns
The stencil test function.

◆ GetBackStencilTestFunction()

virtual IEnums::StencilTestFunction Murl::Graph::IMaterial::GetBackStencilTestFunction ( ) const
pure virtual

Set the material's stencil test function for back-facing primitives.

Returns
The stencil test function.

◆ SetStencilTestReferenceValue()

virtual Bool Murl::Graph::IMaterial::SetStencilTestReferenceValue ( UInt32  frontValue,
UInt32  backValue 
)
pure virtual

Set the material's stencil test reference values.

If stencil test is enabled (see SetStencilBufferMode()), the values given represent the actual reference values used for the per-pixel stencil test with the respective functions specified via SetStencilTestFunction(). In addition, before each comparison, both test value and reference value are ANDed with the test mask given via SetStencilTestMask().

Parameters
frontValueThe reference value used for comparing pixels of front-facing primitives.
backValueThe reference value used for comparing pixels of back-facing primitives.
Returns
true if successful.

◆ GetFrontStencilTestReferenceValue()

virtual UInt32 Murl::Graph::IMaterial::GetFrontStencilTestReferenceValue ( ) const
pure virtual

Get the material's stencil test reference value for testing front-facing primitives.

Returns
The stencil test reference value.

◆ GetBackStencilTestReferenceValue()

virtual UInt32 Murl::Graph::IMaterial::GetBackStencilTestReferenceValue ( ) const
pure virtual

Get the material's stencil test reference value for testing back-facing primitives.

Returns
The stencil test reference value.

◆ SetStencilTestMask()

virtual Bool Murl::Graph::IMaterial::SetStencilTestMask ( UInt32  frontMask,
UInt32  backMask 
)
pure virtual

Set the material's stencil test masks.

See SetStencilTestReferenceValue().

Parameters
frontMaskThe comparison mask for front-facing primitives.
backMaskThe comparison mask for back-facing primitives.
Returns
true if successful.

◆ GetFrontStencilTestMask()

virtual UInt32 Murl::Graph::IMaterial::GetFrontStencilTestMask ( ) const
pure virtual

Get the material's stencil test mask for front-facing primitives.

Returns
The stencil test mask.

◆ GetBackStencilTestMask()

virtual UInt32 Murl::Graph::IMaterial::GetBackStencilTestMask ( ) const
pure virtual

Get the material's stencil test mask for back-facing primitives.

Returns
The stencil test mask.

◆ SetStencilBufferActionForFailedStencilTest()

virtual Bool Murl::Graph::IMaterial::SetStencilBufferActionForFailedStencilTest ( IEnums::StencilBufferAction  frontAction,
IEnums::StencilBufferAction  backAction 
)
pure virtual

Set the actions to be performed if the stencil test fails.

If stencil test is enabled (see SetStencilBufferMode()), the given actions specify how the stencil buffer is modified whenever the stencil test fails for a pixel.

Parameters
frontActionThe action to perform for front-facing primitives.
backActionThe action to perform for back-facing primitives.
Returns
true if successful.

◆ GetFrontStencilBufferActionForFailedStencilTest()

virtual IEnums::StencilBufferAction Murl::Graph::IMaterial::GetFrontStencilBufferActionForFailedStencilTest ( ) const
pure virtual

Get the front-facing primitive stencil buffer action for failed stencil tests.

Returns
The stencil buffer action.

◆ GetBackStencilBufferActionForFailedStencilTest()

virtual IEnums::StencilBufferAction Murl::Graph::IMaterial::GetBackStencilBufferActionForFailedStencilTest ( ) const
pure virtual

Get the back-facing primitive stencil buffer action for failed stencil tests.

Returns
The stencil buffer action.

◆ SetStencilBufferActionForFailedDepthTest()

virtual Bool Murl::Graph::IMaterial::SetStencilBufferActionForFailedDepthTest ( IEnums::StencilBufferAction  frontAction,
IEnums::StencilBufferAction  backAction 
)
pure virtual

Set the actions to be performed if the stencil test passes, but the depth test fails.

If stencil test is enabled (see SetStencilBufferMode()), the given actions specify how the stencil buffer is modified whenever the depth test fails for a pixel (after successfully passing the stencil test).

Parameters
frontActionThe action to perform for front-facing primitives.
backActionThe action to perform for back-facing primitives.
Returns
true if successful.

◆ GetFrontStencilBufferActionForFailedDepthTest()

virtual IEnums::StencilBufferAction Murl::Graph::IMaterial::GetFrontStencilBufferActionForFailedDepthTest ( ) const
pure virtual

Get the front-facing primitive stencil buffer action for failed depth tests.

Returns
The stencil buffer action.

◆ GetBackStencilBufferActionForFailedDepthTest()

virtual IEnums::StencilBufferAction Murl::Graph::IMaterial::GetBackStencilBufferActionForFailedDepthTest ( ) const
pure virtual

Get the back-facing primitive stencil buffer action for failed depth tests.

Returns
The stencil buffer action.

◆ SetStencilBufferActionForPassedDepthTest()

virtual Bool Murl::Graph::IMaterial::SetStencilBufferActionForPassedDepthTest ( IEnums::StencilBufferAction  frontAction,
IEnums::StencilBufferAction  backAction 
)
pure virtual

Set the actions to be performed if both the stencil test and the depth test pass.

If stencil test is enabled (see SetStencilBufferMode()), the given actions specify how the stencil buffer is modified whenever both stencil and depth test succeed for a pixel.

Parameters
frontActionThe action to perform for front-facing primitives.
backActionThe action to perform for back-facing primitives.
Returns
true if successful.

◆ GetFrontStencilBufferActionForPassedDepthTest()

virtual IEnums::StencilBufferAction Murl::Graph::IMaterial::GetFrontStencilBufferActionForPassedDepthTest ( ) const
pure virtual

Get the front-facing primitive stencil buffer action for passed depth tests.

Returns
The stencil buffer action.

◆ GetBackStencilBufferActionForPassedDepthTest()

virtual IEnums::StencilBufferAction Murl::Graph::IMaterial::GetBackStencilBufferActionForPassedDepthTest ( ) const
pure virtual

Get the back-facing primitive stencil buffer action for passed depth tests.

Returns
The stencil buffer action.

◆ SetBlendMode()

virtual Bool Murl::Graph::IMaterial::SetBlendMode ( IEnums::BlendMode  mode)
pure virtual

Set the material's blend mode.

Parameters
modeThe blend mode.
Returns
true if successful.

◆ GetBlendMode()

virtual IEnums::BlendMode Murl::Graph::IMaterial::GetBlendMode ( ) const
pure virtual

Get the material's blend mode.

Returns
The blend mode.

◆ SetBlendFunction()

virtual Bool Murl::Graph::IMaterial::SetBlendFunction ( IEnums::BlendFunction  srcColorFunction,
IEnums::BlendFunction  srcAlphaFunction,
IEnums::BlendFunction  dstColorFunction,
IEnums::BlendFunction  dstAlphaFunction 
)
pure virtual

Set the material's blending functions.

If alpha blending is enabled (SetBlendMode() with a parameter of IEnums::BLEND_MODE_ALPHA), this method sets the combiner factors used for calculating the actual output pixel RGBA values depending on the source and destination pixel's color and alpha values. The values resulting from evaluating these functions are then combined using the blending equations set via SetBlendEquation().

Parameters
srcColorFunctionThe combiner function for the source pixel's RGB values.
srcAlphaFunctionThe combiner function for the source pixel's alpha value.
dstColorFunctionThe combiner function for the destination pixel's RGB values.
dstAlphaFunctionThe combiner function for the destination pixel's alpha value.
Returns
true if successful.

◆ GetSrcColorBlendFunction()

virtual IEnums::BlendFunction Murl::Graph::IMaterial::GetSrcColorBlendFunction ( ) const
pure virtual

Get the material's blending function used for the source pixels' RGB values.

Returns
The blending function.

◆ GetSrcAlphaBlendFunction()

virtual IEnums::BlendFunction Murl::Graph::IMaterial::GetSrcAlphaBlendFunction ( ) const
pure virtual

Get the material's blending function used for the source pixels' alpha value.

Returns
The blending function.

◆ GetDstColorBlendFunction()

virtual IEnums::BlendFunction Murl::Graph::IMaterial::GetDstColorBlendFunction ( ) const
pure virtual

Get the material's blending function used for the destination pixels' RGB values.

Returns
The blending function.

◆ GetDstAlphaBlendFunction()

virtual IEnums::BlendFunction Murl::Graph::IMaterial::GetDstAlphaBlendFunction ( ) const
pure virtual

Get the material's blending function used for the destination pixels' alpha value.

Returns
The blending function.

◆ SetBlendEquation()

virtual Bool Murl::Graph::IMaterial::SetBlendEquation ( IEnums::BlendEquation  colorEquation,
IEnums::BlendEquation  alphaEquation 
)
pure virtual

Set the material's blending equations.

If alpha blending is enabled (SetBlendMode() with a parameter of IEnums::BLEND_MODE_ALPHA), this method sets the actual equations used to combine the outcome of transforming the source and destination pixels according to the functions specified via SetBlendFunction().

Parameters
colorEquationThe blending equation used to combine source and destination RGB values.
alphaEquationThe blending equation used to combine source and destination alpha values.
Returns
true if successful.

◆ GetColorBlendEquation()

virtual IEnums::BlendEquation Murl::Graph::IMaterial::GetColorBlendEquation ( ) const
pure virtual

Get the material's blending equation for RGB values.

Returns
The blending equation.

◆ GetAlphaBlendEquation()

virtual IEnums::BlendEquation Murl::Graph::IMaterial::GetAlphaBlendEquation ( ) const
pure virtual

Get the material's blending equation for alpha values.

Returns
The blending equation.

◆ SetColorBufferClearingEnabled()

virtual Bool Murl::Graph::IMaterial::SetColorBufferClearingEnabled ( Bool  enabled)
pure virtual

Enable/disable clearing of the render target's color buffer.

If color buffer clearing is enabled for a material, the output color buffer gets cleared every time the material is activated (off by default). See SetColorBufferClearValue() for setting the color used for clearing. See also SetDepthBufferClearingEnabled() and SetStencilBufferClearingEnabled().

Parameters
enabledSet to true to enable color buffer clearing.
Returns
true if successful.

◆ IsColorBufferClearingEnabled()

virtual Bool Murl::Graph::IMaterial::IsColorBufferClearingEnabled ( ) const
pure virtual

Check if clearing of the render target's color buffer is enabled.

Returns
true if color buffer clearing is enabled.

◆ SetDepthBufferClearingEnabled()

virtual Bool Murl::Graph::IMaterial::SetDepthBufferClearingEnabled ( Bool  enabled)
pure virtual

Enable/disable clearing of the render target's depth buffer.

If depth buffer clearing is enabled for a material, the output depth buffer gets cleared every time the material is activated (off by default). See SetDepthBufferClearValue() for setting the depth value used for clearing. See also SetStencilBufferClearingEnabled().

Parameters
enabledSet to true to enable depth buffer clearing.
Returns
true if successful.

◆ IsDepthBufferClearingEnabled()

virtual Bool Murl::Graph::IMaterial::IsDepthBufferClearingEnabled ( ) const
pure virtual

Check if clearing of the render target's depth buffer is enabled.

Returns
true if depth buffer clearing is enabled.

◆ SetStencilBufferClearingEnabled()

virtual Bool Murl::Graph::IMaterial::SetStencilBufferClearingEnabled ( Bool  enabled)
pure virtual

Enable/disable clearing of the render target's stencil buffer.

If stencil buffer clearing is enabled for a material, the output stencil buffer gets cleared every time the material is activated (off by default). See SetStencilBufferClearValue() for setting the stencil value used for clearing. See SetDepthBufferClearingEnabled() and SetColorBufferClearingEnabled().

Parameters
enabledSet to true to enable stencil buffer clearing.
Returns
true if successful.

◆ IsStencilBufferClearingEnabled()

virtual Bool Murl::Graph::IMaterial::IsStencilBufferClearingEnabled ( ) const
pure virtual

Check if clearing of the render target's stencil buffer is enabled.

Returns
true if stencil buffer clearing is enabled.

◆ SetColorBufferClearValue()

virtual Bool Murl::Graph::IMaterial::SetColorBufferClearValue ( const Color value)
pure virtual

Set the clear color in effect when color buffer clearing is enabled.

Parameters
valueThe clear color.
Returns
true if successful.

◆ GetColorBufferClearValue()

virtual const Color& Murl::Graph::IMaterial::GetColorBufferClearValue ( ) const
pure virtual

Get the clear color in effect when color buffer clearing is enabled.

Returns
The clear color.

◆ SetDepthBufferClearValue()

virtual Bool Murl::Graph::IMaterial::SetDepthBufferClearValue ( Real  value)
pure virtual

Set the clear value in effect when depth buffer clearing is enabled.

Parameters
valueThe clear value.
Returns
true if successful.

◆ GetDepthBufferClearValue()

virtual Real Murl::Graph::IMaterial::GetDepthBufferClearValue ( ) const
pure virtual

Get the clear value in effect when depth buffer clearing is enabled.

Returns
The clear value.

◆ SetStencilBufferClearValue()

virtual Bool Murl::Graph::IMaterial::SetStencilBufferClearValue ( UInt32  value)
pure virtual

Set the clear value in effect when stencil buffer clearing is enabled.

Parameters
valueThe clear value.
Returns
true if successful.

◆ GetStencilBufferClearValue()

virtual UInt32 Murl::Graph::IMaterial::GetStencilBufferClearValue ( ) const
pure virtual

Get the clear value in effect when stencil buffer clearing is enabled.

Returns
The clear value.

◆ SetObjectSortMode()

virtual Bool Murl::Graph::IMaterial::SetObjectSortMode ( IEnums::ObjectSortMode  mode)
pure virtual

Set the material's object sorting mode.

If not specified, the object sort mode is set to IEnums::OBJECT_SORT_MODE_BY_MATERIAL when the material writes to the depth buffer, and to IEnums::OBJECT_SORT_MODE_BY_DEPTH if depth writes are disabled. During rendering a layer, first all drawables are processed that do update the depth buffer (usually opaque geometry) without and depth sorting, and afterwards all other drawables are rendered back-to-front. The actual depth measure (either Z-distance or squared distance) for the latter case is defined per-camera via Graph::ICamera::SetDepthSortMode().

Parameters
modeThe object sorting mode.
Returns
true if successful.

◆ GetObjectSortMode()

virtual IEnums::ObjectSortMode Murl::Graph::IMaterial::GetObjectSortMode ( ) const
pure virtual

Get the material's object sorting mode.

Returns
The object sorting mode.

◆ SetSortOrder()

virtual Bool Murl::Graph::IMaterial::SetSortOrder ( SInt32  order)
pure virtual

Set the material's sorting order relative to other materials.

This is useful when doing multi-pass rendering using e.g. a Graph::MultiMaterial. Materials with higher values are rendered later.

Parameters
orderThe sorting order.
Returns
true if successful.

◆ GetSortOrder()

virtual SInt32 Murl::Graph::IMaterial::GetSortOrder ( ) const
pure virtual

Get the material's sorting order relative to other materials.

Returns
The sorting order.

◆ SetVariableDepthOffset()

virtual Bool Murl::Graph::IMaterial::SetVariableDepthOffset ( Real  offset)
pure virtual

Set the variable offset for depth buffer value calculation.

This value specifies a variable offset for the generated depth values, before they are written to the depth buffer. See the description of the "factor" parameter at http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPolygonOffset.xml for OpenGL|ES, or the "D3DRS_SLOPESCALEDEPTHBIAS" parameter at http://msdn.microsoft.com/en-us/library/windows/desktop/bb205599(v=vs.85).aspx for DirectX 9. The default offset value is 0.

Parameters
offsetThe variable depth offset.
Returns
true if successful.

◆ GetVariableDepthOffset()

virtual Real Murl::Graph::IMaterial::GetVariableDepthOffset ( ) const
pure virtual

Get the variable offset for depth buffer value calculation.

Returns
The variable depth offset.

◆ SetConstantDepthOffset()

virtual Bool Murl::Graph::IMaterial::SetConstantDepthOffset ( Real  offset)
pure virtual

Set the constant offset for depth buffer value calculation.

This value specifies a constant offset for the generated depth values, before they are written to the depth buffer. See the description of the "units" parameter at http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPolygonOffset.xml for OpenGL|ES, or the "D3DRS_DEPTHBIAS" parameter at http://msdn.microsoft.com/en-us/library/windows/desktop/bb205599(v=vs.85).aspx for DirectX 9. The default offset value is 0.

Parameters
offsetThe constant depth offset.
Returns
true if successful.

◆ GetConstantDepthOffset()

virtual Real Murl::Graph::IMaterial::GetConstantDepthOffset ( ) const
pure virtual

Get the constant offset for depth buffer value calculation.

Returns
The constant depth offset.

◆ SetCameraSlot()

virtual Bool Murl::Graph::IMaterial::SetCameraSlot ( SInt32  cameraSlot)
pure virtual

Set the material's camera slot.

Parameters
cameraSlotThe camera slot.
Returns
true if successful.

◆ SetLayerOffset()

virtual Bool Murl::Graph::IMaterial::SetLayerOffset ( SInt32  layerOffset)
pure virtual

Set the material's layer offset.

Parameters
layerOffsetThe layer offset.
Returns
true if successful.

◆ SetParametersStage()

virtual Bool Murl::Graph::IMaterial::SetParametersStage ( SInt32  parametersStage)
pure virtual

Set the material's parameters pass.

Parameters
parametersStageThe parameters pass.
Returns
true if successful.

◆ SetTextureStage()

virtual Bool Murl::Graph::IMaterial::SetTextureStage ( UInt32  unit,
SInt32  textureStage 
)
pure virtual

Set the material's texture pass for a given unit.

Parameters
unitThe texture unit
textureStageThe texture pass.
Returns
true if successful.

◆ SetLightStageUnit()

virtual Bool Murl::Graph::IMaterial::SetLightStageUnit ( SInt32  unit)
pure virtual

Set the light stage unit used for multi-pass lighting.

Parameters
unitThe light stage unit, or -1 to disable multi-pass lighting.
Returns
true if successful.

◆ SetLightMaskEnabled()

virtual Bool Murl::Graph::IMaterial::SetLightMaskEnabled ( Bool  enabled)
pure virtual

Set if the light should be masked for multi-pass lighting.

When multi-pass lighting is performed, this property defines whether rendering should only happen within the light's bounding volume projected on screen. This value only has effect when the light pass unit is set to a defined value (other than -1), otherwise the light is never masked. Setting this value to true can considerably speed up multi-light rendering, as only necessary screen areas are updated.

Parameters
enabledSet to true if the light should be masked.
Returns
true if successful.

◆ SetMinNumberOfLightStages()

virtual Bool Murl::Graph::IMaterial::SetMinNumberOfLightStages ( UInt32  minNumStages)
pure virtual

Set the material's minimum number of light stages.

Parameters
minNumStagesThe minimum number of light stages.
Returns
true if successful.

◆ SetMaxNumberOfLightStages()

virtual Bool Murl::Graph::IMaterial::SetMaxNumberOfLightStages ( UInt32  maxNumStages)
pure virtual

Set the material's maximum number of light stages.

Parameters
maxNumStagesThe maximum number of light stages.
Returns
true if successful.

◆ GetNumberOfDetailLevels()

virtual UInt32 Murl::Graph::IMaterial::GetNumberOfDetailLevels ( ) const
pure virtual

Get the material's number of detail levels.

Returns
The number of detail levels.

◆ GetNumberOfStages()

virtual UInt32 Murl::Graph::IMaterial::GetNumberOfStages ( UInt32  detailLevel) const
pure virtual

Get the material's number of stages for a given detail level.

Parameters
detailLevelThe detail level to query.
Returns
The number of stages.

◆ GetCameraSlot()

virtual SInt32 Murl::Graph::IMaterial::GetCameraSlot ( UInt32  detailLevel,
UInt32  stage 
) const
pure virtual

Get the material's camera slot for a given stage.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
The camera slot.

◆ GetLayerOffset()

virtual SInt32 Murl::Graph::IMaterial::GetLayerOffset ( UInt32  detailLevel,
UInt32  stage 
) const
pure virtual

Get the material's layer offset for a given stage.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
The layer offset.

◆ GetParametersStage()

virtual SInt32 Murl::Graph::IMaterial::GetParametersStage ( UInt32  detailLevel,
UInt32  stage 
) const
pure virtual

Get the material's parameter stage for a given material stage.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
The parameter stage.

◆ GetTextureStage()

virtual SInt32 Murl::Graph::IMaterial::GetTextureStage ( UInt32  detailLevel,
UInt32  stage,
UInt32  unit 
) const
pure virtual

Get the material's texture stage for a given material stage and texture unit.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
unitThe texture unit
Returns
The parameter stage.

◆ GetLightStageUnit()

virtual SInt32 Murl::Graph::IMaterial::GetLightStageUnit ( UInt32  detailLevel,
UInt32  stage 
) const
pure virtual

Get the light stage unit used for multi-stage lighting for a given material stage.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
The light stage unit, or -1 if multi-pass lighting is disabled.

◆ IsLightMaskEnabled()

virtual Bool Murl::Graph::IMaterial::IsLightMaskEnabled ( UInt32  detailLevel,
UInt32  stage 
) const
pure virtual

Check if the light is masked for multi-pass lighting.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
true if the light is masked.

◆ GetMinNumberOfLightStages()

virtual UInt32 Murl::Graph::IMaterial::GetMinNumberOfLightStages ( UInt32  detailLevel,
UInt32  stage 
) const
pure virtual

Get the material's minimum number of light stages for a given material stage.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
The minimum number of light stages.

◆ GetMaxNumberOfLightStages()

virtual UInt32 Murl::Graph::IMaterial::GetMaxNumberOfLightStages ( UInt32  detailLevel,
UInt32  stage 
) const
pure virtual

Get the material's maximum number of light stages for a given material stage.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
The maximum number of light stages.

◆ GetNumberOfLightStages()

virtual UInt32 Murl::Graph::IMaterial::GetNumberOfLightStages ( UInt32  detailLevel,
UInt32  stage,
UInt32  numLights 
) const
pure virtual

Get the material's minimum number of light stages for a given material stage.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
numLightsThe actual number of currently active lights.
Returns
The layer offset.

◆ GetVideoMaterialObject()

virtual Video::IMaterial* Murl::Graph::IMaterial::GetVideoMaterialObject ( UInt32  detailLevel,
UInt32  stage 
) const
pure virtual

Get the material's internal video renderer object for a given index.

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
A pointer to the mutable video renderer object.

The documentation for this interface was generated from the following file:
  • murl_graph_i_material.h


Copyright © 2011-2024 Spraylight GmbH.