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

interface IRenderTarget in Tinman.Engine.Rendering

A render target surface.

interface IRenderTarget extends INativeHandle
  IResource
  base of DirectX9RenderTarget
  IPipelineRenderTarget
  ISwapChain

See also:

IGraphicsContext.SetRenderTarget
IGraphicsContext.CreateRenderTarget

Attributes

AccessPattern

Returns the access pattern of this GPU resource.

property AccessPattern { get }
type ResourceAccessPattern
value The access pattern.
inherited IResource.AccessPattern

IsSoleOwnership

Will this object be disposed upon the next call to Dispose?

[ThreadSafe]
property IsSoleOwnership { get }
type bool
value true if the object will be disposed when Dispose is called,
false if the object will not be disposed, because some other code is still holding shared ownership (see AcquireBase).
inherited IDisposable.IsSoleOwnership

IsSrgb

The sRGB behaviour of this render target.

property IsSrgb { get }
type bool
value The sRGB behaviour flag.

Remarks:

When true, the GPU is supposed to do on-the-fly sRGB compression for the render target object (e.g. in Direct3D 10+ by using DXGI_FORMAT_B8G8R8X8_UNORM_SRGB), so that the GPU shader may output linear color values.

LifecycleState

Returns the lifecycle state of this object.

property LifecycleState { get }
type LifecycleState
value The lifecycle state.
inherited ILifecycleState.LifecycleState

MemoryConsumption

Returns the estimated memory consumption of this object.

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

Name

A human-readable name for debugging and testing.

property Name { get set }
type string
value The name or null.
inherited IResource.Name

NativeHandle

Returns the raw handle value of the native resource that is contained in this object.

property NativeHandle { get }
type IntPtr
value The raw handle value.
inherited INativeHandle.NativeHandle

Remarks:

The documentation of the implementing class will contain information on how to interpret the raw handle value.

Size

The size of this render target.

property Size { get }
type Vec2I
value The render target size, in pixels.

Texture

The texture resource that holds the rendered pixels.

property Texture { get }
type ITexture2D
value The texture resource or null if this render target represents the backbuffer of a swap chain.

See also:

Finish

Methods

Acquire

Acquires a strong reference to this disposable object.

[OwnerReturn, Pure]
method Acquire (bool allowNull = false)
type T
params allowNull Depicts what to do when this object is no longer valid:
true: return null
false: throw an exception
returns The strong reference to this disposable object or null iff allowNull is true and this object is no longer valid.
inherited IDisposableGeneric.Acquire

Remarks:

The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls this 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.

Exceptions:

AcquireBase

Acquires a strong reference to this disposable object.

[OwnerReturn, Pure]
method AcquireBase (bool allowNull = false)
type IDisposable
params allowNull Depicts what to do when this object is no longer valid:
true: return null
false: throw an exception
returns The strong reference to this disposable object or null iff allowNull is true and this object is no longer valid.
inherited IDisposable.AcquireBase

Remarks:

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

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

Using this method usually requires type casting. Subclasses may additionally implement IDisposableGeneric, in order to provide some syntactic sugar for that.

Exceptions:

Binding

Checks if there is at least one graphics API binding for this resource object.

method Binding ()
type bool
returns true if there is at least one graphics API binding,
false if this resource object is not bound to the graphics API.
inherited IResource.Binding

Updates the graphics API binding counter of this resource object.

method Binding (int32 balance)
params balance The binding counter delta.
inherited IResource.Binding

Exceptions:

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]
method Dispose ()
inherited IDisposable.Dispose

Remarks:

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

Implementing methods must not throw any exceptions.

Finish

Use of this render target as output (see SetRenderTarget) has finished, it is now going to be used as input for subsequent work, for example rendering or presentation.

method Finish ()

Remarks:

This method must be called once after having used the IRenderTarget object as output during one or more render cycles (see SetRenderTarget) and before using it as input for subsequent work, for example rendering or presentation. Reading the current pixel contents via ReadPixels does not count as rendering work.

Exceptions: