Murl::Graph::IFixedProgram Interface Referenceabstract

The IFixedProgram graph node interface. More...

#include "murl_graph_i_fixed_program.h"

Inheritance diagram for Murl::Graph::IFixedProgram:

Public Member Functions

virtual Bool SetInputPremultiplied (Bool premultiplied)=0
 Define if the input color is supposed to be used in a premultiplied way. More...
 
virtual Bool IsInputPremultiplied () const =0
 Check if the input color is supposed to be used in a premultiplied way. More...
 
virtual Bool SetOutputPremultiplied (Bool premultiplied)=0
 Define if the output color is supposed to be used in a premultiplied way. More...
 
virtual Bool IsOutputPremultiplied () const =0
 Check if the output color is supposed to be used in a premultiplied way. More...
 
virtual Bool SetColoringEnabled (Bool enabled)=0
 Enable/disable the use of color parameters. More...
 
virtual Bool IsColoringEnabled () const =0
 Check if color parameters are used. More...
 
virtual Bool SetVertexColoringEnabled (Bool enabled)=0
 Enable/disable the use of per-vertex colors. More...
 
virtual Bool IsVertexColoringEnabled () const =0
 Check if per-vertex colors are used. More...
 
virtual Bool SetLightingEnabled (Bool enabled)=0
 Enable/disable simple (1 source) lighting. More...
 
virtual Bool IsLightingEnabled () const =0
 Check if lighting is enabled. More...
 
virtual Bool SetEmissiveTintingEnabled (Bool enabled)=0
 Enable/disable emissive tinting. More...
 
virtual Bool IsEmissiveTintingEnabled () const =0
 Check if emissive tinting is enabled. More...
 
virtual Bool SetTexturingEnabled (UInt32 unit, Bool enabled)=0
 Enable/disable texturing for a given texture unit. More...
 
virtual Bool IsTexturingEnabled (UInt32 unit) const =0
 Check if texturing is enabled for a given unit. More...
 
virtual Bool SetLightModel (IEnums::LightModel lightModel)=0
 Set the light model used for rendering. More...
 
virtual IEnums::LightModel GetLightModel () const =0
 Get the light model used for rendering. More...
 
- Public Member Functions inherited from Murl::Graph::IProgram
virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual IProgramNodeTargetGetFallbackProgramNodeTarget ()=0
 Get the mutable Graph::IShaderProgram container storing an optional fallback program. More...
 
virtual const IProgramNodeTargetGetFallbackProgramNodeTarget () const =0
 Get the constant Graph::IProgram container storing an optional fallback program. More...
 
virtual UInt32 GetNumberOfStages () const =0
 Get the program's number of stages. More...
 
virtual Video::IProgramGetVideoProgramObject (UInt32 stage) const =0
 Get the program's internal video renderer object. More...
 
virtual Bool IsValid (Bool checkFallback) const =0
 Check if the program is valid. More...
 
virtual const StringGetLinkerLog () const =0
 Get the shader linker log. More...
 

Detailed Description

The IFixedProgram graph node interface.

Fixed programs represent an easy way to define simple material shaders without having to actually write any GPU shader code. However, they are quite restricted regarding any possible graphical effects; fixed programs are mainly used for simple tasks like flat shading with not more than 2 active texture units, e.g. for rendering HUDs or any othe 2D-only content.

See Graph::IMaterial for attaching a fixed program to a given material. See Graph::IFixedParameters for defining actual program parameters.

Member Function Documentation

◆ SetInputPremultiplied()

virtual Bool Murl::Graph::IFixedProgram::SetInputPremultiplied ( Bool  premultiplied)
pure virtual

Define if the input color is supposed to be used in a premultiplied way.

Parameters
premultipliedIf true, the input RGB components are multiplied by their alpha component.
Returns
true if successful.

◆ IsInputPremultiplied()

virtual Bool Murl::Graph::IFixedProgram::IsInputPremultiplied ( ) const
pure virtual

Check if the input color is supposed to be used in a premultiplied way.

Returns
true if premultiplied.

◆ SetOutputPremultiplied()

virtual Bool Murl::Graph::IFixedProgram::SetOutputPremultiplied ( Bool  premultiplied)
pure virtual

Define if the output color is supposed to be used in a premultiplied way.

Parameters
premultipliedIf true, the output RGB components are multiplied by the alpha component of the vertex color.
Returns
true if successful.

◆ IsOutputPremultiplied()

virtual Bool Murl::Graph::IFixedProgram::IsOutputPremultiplied ( ) const
pure virtual

Check if the output color is supposed to be used in a premultiplied way.

Returns
true if premultiplied.

◆ SetColoringEnabled()

virtual Bool Murl::Graph::IFixedProgram::SetColoringEnabled ( Bool  enabled)
pure virtual

Enable/disable the use of color parameters.

If coloring is enabled, the program will make use of the actual color parameters stored in the currently active Graph::IParameters node. If disabled, 100% white is used. Note, that the global alpha (transparency) value of an object is controlled via the alpha value of the diffuse lighting component. If coloring is disabled, alpha fading of the object is also disabled. See also SetLightingEnabled() and SetTexturingEnabled(). If per-vertex colors are enabled (see SetVertexColoringEnabled()), they override the parameter's ambient and diffuse components.

Parameters
enabledIf true, color parameters are used.
Returns
true if successful.

◆ IsColoringEnabled()

virtual Bool Murl::Graph::IFixedProgram::IsColoringEnabled ( ) const
pure virtual

Check if color parameters are used.

Returns
true if color parameters are used.

◆ SetVertexColoringEnabled()

virtual Bool Murl::Graph::IFixedProgram::SetVertexColoringEnabled ( Bool  enabled)
pure virtual

Enable/disable the use of per-vertex colors.

If vertex coloring is enabled, the program will make use of individual per-vertex color values present in the currently active vertex buffer, to be applied for the ambient and diffuse components. If color parameters are also enabled (see SetColoringEnabled()), ambient and diffuse components are taken from per-vertex information, and only specular and emissive components are used from the currently set parameters.

Parameters
enabledIf true, vertex colors are used.
Returns
true if successful.

◆ IsVertexColoringEnabled()

virtual Bool Murl::Graph::IFixedProgram::IsVertexColoringEnabled ( ) const
pure virtual

Check if per-vertex colors are used.

Returns
true if per-vertex colors are used.

◆ SetLightingEnabled()

virtual Bool Murl::Graph::IFixedProgram::SetLightingEnabled ( Bool  enabled)
pure virtual

Enable/disable simple (1 source) lighting.

If lighting is enabled, the program evaluates the lighting equation for a single light source at unit 0, using the four possible lighting components defined in IEnums::LightingComponent. If disabled, only the IEnums::LIGHTING_COMPONENT_DIFFUSE is used. Note: If coloring is disabled, all of these components are set to 100% white (with 100% alpha for the diffuse component). See also SetColoringEnabled() and SetTexturingEnabled().

Parameters
enabledIf true, lighting is enabled.
Returns
true if successful.

◆ IsLightingEnabled()

virtual Bool Murl::Graph::IFixedProgram::IsLightingEnabled ( ) const
pure virtual

Check if lighting is enabled.

Returns
true if lighting is enabled.

◆ SetEmissiveTintingEnabled()

virtual Bool Murl::Graph::IFixedProgram::SetEmissiveTintingEnabled ( Bool  enabled)
pure virtual

Enable/disable emissive tinting.

Parameters
enabledIf true, emissive tinting is enabled.
Returns
true if successful.

◆ IsEmissiveTintingEnabled()

virtual Bool Murl::Graph::IFixedProgram::IsEmissiveTintingEnabled ( ) const
pure virtual

Check if emissive tinting is enabled.

Returns
true if emissive tinting is enabled.

◆ SetTexturingEnabled()

virtual Bool Murl::Graph::IFixedProgram::SetTexturingEnabled ( UInt32  unit,
Bool  enabled 
)
pure virtual

Enable/disable texturing for a given texture unit.

If texturing is enabled, the resulting color from the color & lighting evaluation at each pixel is multiplied component-wise with the color retrieved from the active texture at that pixel. If disabled, only the plain color is used. See also SetColoringEnabled() and SetLightingEnabled().

Parameters
unitThe texture unit to enable or disable.
enabledIf true, texturing is enabled for the given unit.
Returns
true if successful.

◆ IsTexturingEnabled()

virtual Bool Murl::Graph::IFixedProgram::IsTexturingEnabled ( UInt32  unit) const
pure virtual

Check if texturing is enabled for a given unit.

Parameters
unitThe texture unit to check.
Returns
true if texturing is enabled.

◆ SetLightModel()

virtual Bool Murl::Graph::IFixedProgram::SetLightModel ( IEnums::LightModel  lightModel)
pure virtual

Set the light model used for rendering.

Parameters
lightModelthe light model to use.
Returns
true if successful.

◆ GetLightModel()

virtual IEnums::LightModel Murl::Graph::IFixedProgram::GetLightModel ( ) const
pure virtual

Get the light model used for rendering.

Returns
The light model used.

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


Copyright © 2011-2024 Spraylight GmbH.