RenderEffectParameters

Description

abstract class Tinman.Engine.Rendering.RenderEffectParameters

Base interface for classes that represent the parameters of a GPU program.

GPU program parameters are defined by implementing classes and are usually provided as properties.

Parameter modifications are tracked with a 64-bit integer value, where each bit may be interpreted freely by an implementing class, which should define public Changed* constants according to the parameter properties.

A subclass may define low-level parameter slots by overriding the Declare and Apply methods.

Public / Methods

Apply


[EmptyBody]
public virtual method Apply → (2)

effect in : IRenderEffectParameters

The effect.

forceTextures opt : bool = false

Force setting of texture parameters, even if their changed flag is not set?

Updates the low-level render effect parameter slots according to the changed parameter values in this object.

This method may optionally be used to provide a standardized mechanism for setting low-level render effect parameters, which can be used for multiple rendering APIs.

The parameter slots must have been declared with Declare. If not, this method will return silently, without applying any parameter values.

Changed

2 overloads


public method Changed1 → (1)

changed in : int64

The modification bits to set.

Sets the given modification bits.


[Pure]
public virtual method Changed2 → ()

returns → int64

Bitmask of changed parameters. See the Changed* constants that are defined by the respective subclass.

Returns the changed parameters.

Changed​All


public virtual method ChangedAll → (1)

changed in : bool

true to set the changed flags, false to clear them.

Sets or clears the changed flags for all parameters.

Changed​Mask


[Pure]
public method ChangedMask → (1)

mask in : int64

The bitmask to return.

returns → int64

The value of mask in if Changed2 returns non-zero,
0 zero otherwise.

Returns a bitmask if at least one parameter has changed.

Clear​Resources


public abstract method ClearResources → ()

Clears all resources by setting all parameters to null.

Declare


[EmptyBody]
public virtual method Declare → (2)

effect in : IRenderEffectParameters

The render effect for which to declare the low-level parameter slots.

flags opt : int32 = 0

Optional flags, to be interpreted by overriding methods. Please refer to the documentation of the respective subclass for details.

Declares all low-level render effect parameter slots.

This method may optionally be used to provide a standardized mechanism for setting low-level render effect parameters, which can be used for multiple rendering APIs.

Different instances of the same RenderEffectParameters class may use different slot indices, which allows instances to be aggregated into different render effects.

RenderException

If an error has occurred while declaring low-level render effect parameter slots.

Pass​Name


public virtual method PassName → (1)

pass in : int32

The pass index.

returns → string

The human-readable name.

Returns a human-readable name for the given pass.

The default implementation returns a string in the form 'Pass-#', where '#' is the zero-based pass index.

Public / Attributes

Name


public attribute Name → (get)

value : string

[not-empty]
The name.

Human-readable name for this set of render effect parameters.

Protected / Constructors

Render​Effect​Parameters


protected constructor RenderEffectParameters → (1)

name in : string

[not-empty]
Human-readable name for this set of render effect parameters.

Creates a new instance of RenderEffectParameters.