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

class ShadowMappingResource in Tinman.AddOns.Components

Wraps the GPU resources of a ShadowMapping object.

sealed class ShadowMappingResource extends Disposable
  implements IResource

Public / Constants

ClearColor

The color to use for clearing the shadow map render targets.

public constant ClearColor = Colors.Yellow
type int64

Public / Attributes

LifecycleState

Returns the lifecycle state of this object.

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

MemoryConsumption

Returns the estimated memory consumption of this object.

public property MemoryConsumption { get }
type int64
value [>=0] The estimated memory consumption, in bytes.
implements IMemoryConsumption.MemoryConsumption

TextureSize

Size of the shadow-map render target textures.

public property TextureSize { get }
type int32
value [pow2] The texture size.

Public / Constructors

ShadowMappingResource

Creates a new instance of ShadowMappingResource.

public constructor ShadowMappingResource (ShadowMapping shadowMapping, IGraphicsContext context)
params shadowMapping [not-null] The owning ShadowMapping object.
  context [not-null] The graphics context.

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.

ApplyShadowMap

Applies the render state that is necessary for performing shadow-mapping.

public method ApplyShadowMap (ShadowMappingState state)
params state [not-null] The render state wrapper.

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.

GetShadowMapTexture

Returns the shadow map texture for the given cascade.

public method GetShadowMapTexture (int32 cascade)
type ITexture2D
params cascade The shadow map cascade (see Cascade).
returns [not-null] The shadow map texture.

RenderShadowMapBegin

Begins to render the shadow map for the given cascade.

public method RenderShadowMapBegin (int32 cascade)
type IRenderTarget
params cascade The shadow map cascade (see Cascade).
returns The render target to use or null if the cascade is empty.

See also:

RenderShadowMapEnd

RenderShadowMapEnd

Finishes rendering of the shadow map of the current cascade.

public method RenderShadowMapEnd (ShadowMappingState state)
params state The render state wrapper to use for blurring the shadow map using a 7x7 Gauss filter.

See also:

RenderShadowMapBegin