TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class ShaderTechnique in Tinman.AddOns.Rendering

abstract class ShaderTechnique extends Disposable
  implements IShaderTechnique

Public / Attributes

LifecycleState

Returns the lifecycle state of this object.

public virtual property LifecycleState { get }
type LifecycleState
value The lifecycle state.
inherited Disposable.LifecycleState

Name

The name of this shader technique.

public property Name { get }
type string
value [not-null] The technique. name.
implements IShaderTechnique.Name

PassCount

The number of rendering passes of this technique.

public property PassCount { get }
type int32
value [>=1] The number of rendering passes.
implements IShaderTechnique.PassCount

PassNames

Returns the names of all passes of this technique.

public property PassNames { get }
type string[]
value [not-null] The list of technique pass names.
implements IShaderTechnique.PassNames

See also:

IShaderTechnique.Pass

Public / Methods

AcquireTry

Acquires a strong reference to this disposable object.

[OwnerReturn, ThreadSafe]
public method AcquireTry ()
type IDisposable
returns this if a new strong reference has been acquired, null if this object is already being disposed.
inherited Disposable.AcquireTry

Remarks:

The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.

This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.

AlphaToCoverage

Manually enables or disables alpha-to-coverage, if supported.

public abstract method AlphaToCoverage (bool value)
type bool
params value true to enable alpha-to-coverage, false to disable it.
returns true if alpha-to-coverage has been enabled,
false in one of these cases:
  • The value parameter is false.
  • Alpha-to-coverage is not supported.
  • Alpha-to-coverage is supported but must be enabled in the shader effect source.
implements IRenderState.AlphaToCoverage

Remarks:

If a render API does not support setting the alpha-to-coverage state in the shader effect source, this method can be used to enable it from code.

See also:

IShaderTechnique.BeginPass

Begin

Begins an access to this object.

public abstract method Begin ()
implements IBeginEnd.Begin

Remarks:

See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.

See also:

BeginEnd

BeginPass

Begins to render using the given pass of this technique.

public abstract method BeginPass (int32 pass = 0)
params pass [0..PassCount-1] Index of rendering pass. Defaults to 0.
implements IShaderTechnique.BeginPass

Remarks:

Render state can only be modified via IRenderState between calls of BeginPass and EndPass.

See also:

IShaderEffect.ApplyChanges

CullMode

The cull mode to use for rendering primitives.

public abstract method CullMode (int32 mode)
params mode The cull mode:
< 0: invert cull mode of technique.
> 0: keep cull mode of technique.
= 0: disable culling.
implements IRenderState.CullMode

See also:

IShaderTechnique.BeginPass

Dispose

Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.

[Dispose, OwnerThis, ThreadSafe]
public method Dispose ()
inherited Disposable.Dispose

Remarks:

The Dispose method silently returns if the object has already been disposed.

End

Ends the current access to this object.

public abstract method End ()
implements IBeginEnd.End

Remarks:

See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.

See also:

BeginEnd

EndPass

Ends rendering of the current pass.

public abstract method EndPass ()
implements IShaderTechnique.EndPass

See also:

IShaderEffect.ApplyChanges

HasPass

Checks if a render pass of the given name exists.

[Pure]
public method HasPass (string name)
type bool
params name [not-empty] The shader technique render pass name.
returns true if the render pass exists, false if not.
implements IShaderTechnique.HasPass

Pass

Returns a render pass of this shader technique by its name.

[Pure]
public method Pass (string name)
type ShaderPass
params name [not-null] The shader technique render pass name.
returns [not-null] The render pass.
implements IShaderTechnique.Pass

See also:

IShaderTechnique.HasPass

Exceptions:

PassAt

Returns a render pass of this shader technique by its index.

[Pure]
public method PassAt (int32 index)
type ShaderPass
params index The shader technique pass index.
returns [not-null] The render pass.
implements IShaderTechnique.PassAt

Exceptions:

Protected / Constructors

ShaderTechnique

Creates a new instance of ShaderTechnique.

protected constructor ShaderTechnique (string name)
params name [not-empty] The technique name.

Protected / Methods

Add

Adds a render pass.

protected method Add (ShaderPass pass)
params pass [not-null] The render pass.

Remarks:

Subclasses call this method to populate the shader technique.

DisposeManaged

Disposes the managed resources held by a concrete subclass. This method will be called at most once per subclass.

protected override method DisposeManaged ()
overrides Disposable.DisposeManaged

Remarks:

This method will only be called when a disposable object is explicitly destroyed by user code calling the Dispose method. It will not be called when the object is collected as garbage by the system.

Overriding methods must call the DisposeManaged method of their base class. The base call should be the last statement.

The DisposeManaged method is called before the DisposeUnmanaged method.

DisposeUnmanaged

Disposes the unmanaged resources held by a concrete subclass. This method will be called exactly once per subclass.

protected virtual method DisposeUnmanaged ()
inherited Disposable.DisposeUnmanaged

Remarks:

Overriding methods must call the DisposeUnmanaged method of their base class. The base call should be the last statement.

The DisposeUnmanaged method is called after the DisposeManaged method.