![]() |
Murl Engine API
Version 2018.3
|
The IFixedProgram graph node interface. More...
#include <murl_graph_i_fixed_program.h>
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.
Public Member Functions | |
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 | 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... | |
![]() | |
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 checkFallbacks) const =0 |
Check if the program is valid. More... | |
virtual const String & | GetLinkerLog () const =0 |
Get the shader linker log. More... | |
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.
enabled | If true, color parameters are used. |
|
pure virtual |
Check if color parameters are used.
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.
enabled | If true, vertex colors are used. |
|
pure virtual |
Check if per-vertex colors are used.
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().
enabled | If true, lighting is enabled. |
|
pure virtual |
Check if lighting is 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().
unit | The texture unit to enable or disable. |
enabled | If true, texturing is enabled for the given unit. |
Check if texturing is enabled for a given unit.
unit | The texture unit to check. |
|
pure virtual |
Set the light model used for rendering.
lightModel | the light model to use. |
|
pure virtual |
Get the light model used for rendering.