The IFixedProgram graph node interface. More...
#include "murl_graph_i_fixed_program.h"
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 INode * | GetNodeInterface ()=0 |
Get the mutable Graph::INode interface. More... | |
virtual const INode * | GetNodeInterface () const =0 |
Get the constant Graph::INode interface. More... | |
virtual IProgramNodeTarget * | GetFallbackProgramNodeTarget ()=0 |
Get the mutable Graph::IShaderProgram container storing an optional fallback program. More... | |
virtual const IProgramNodeTarget * | GetFallbackProgramNodeTarget () 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::IProgram * | GetVideoProgramObject (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 String & | GetLinkerLog () 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()
Define if the input color is supposed to be used in a premultiplied way.
- Parameters
-
premultiplied If true, the input RGB components are multiplied by their alpha component.
- Returns
- true if successful.
◆ IsInputPremultiplied()
|
pure virtual |
Check if the input color is supposed to be used in a premultiplied way.
- Returns
- true if premultiplied.
◆ SetOutputPremultiplied()
Define if the output color is supposed to be used in a premultiplied way.
- Parameters
-
premultiplied If true, the output RGB components are multiplied by the alpha component of the vertex color.
- Returns
- true if successful.
◆ IsOutputPremultiplied()
|
pure virtual |
Check if the output color is supposed to be used in a premultiplied way.
- Returns
- true if premultiplied.
◆ SetColoringEnabled()
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
-
enabled If true, color parameters are used.
- Returns
- true if successful.
◆ IsColoringEnabled()
|
pure virtual |
Check if color parameters are used.
- Returns
- true if color parameters are used.
◆ SetVertexColoringEnabled()
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
-
enabled If true, vertex colors are used.
- Returns
- true if successful.
◆ IsVertexColoringEnabled()
|
pure virtual |
Check if per-vertex colors are used.
- Returns
- true if per-vertex colors are used.
◆ SetLightingEnabled()
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
-
enabled If true, lighting is enabled.
- Returns
- true if successful.
◆ IsLightingEnabled()
|
pure virtual |
Check if lighting is enabled.
- Returns
- true if lighting is enabled.
◆ SetEmissiveTintingEnabled()
Enable/disable emissive tinting.
- Parameters
-
enabled If true, emissive tinting is enabled.
- Returns
- true if successful.
◆ IsEmissiveTintingEnabled()
|
pure virtual |
Check if emissive tinting is enabled.
- Returns
- true if emissive tinting is enabled.
◆ SetTexturingEnabled()
|
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
-
unit The texture unit to enable or disable. enabled If true, texturing is enabled for the given unit.
- Returns
- true if successful.
◆ IsTexturingEnabled()
Check if texturing is enabled for a given unit.
- Parameters
-
unit The texture unit to check.
- Returns
- true if texturing is enabled.
◆ SetLightModel()
|
pure virtual |
Set the light model used for rendering.
- Parameters
-
lightModel the light model to use.
- Returns
- true if successful.
◆ GetLightModel()
|
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