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

interface ITexture in Tinman.Terrain.Rendering

Base interface for texture resources for rendering.

interface ITexture extends INativeHandle
  IResource
  base of ITexture2D
  ITextureCube

Remarks

Textures with the resource access patterns Static and Dynamic may be used for rendering.
Textures with the resource access pattern Mappable may be used for updating other textures.
An implementation may choose to support other combinations, but is not required to do so.

Attributes

AccessPattern

Returns the access pattern of this GPU resource.

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

Format

The texture format.

property Format { get }
type TextureFormat
value [not-null] The texture format.

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 texture.

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

Remarks:

When true, the GPU is supposed to do on-the-fly sRGB decompression for the texture object (e.g. in Direct3D 10+ by using DXGI_FORMAT_B8G8R8X8_UNORM_SRGB), so that the GPU shader receives 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

Mipmaps

The number of mipmap levels.

property Mipmaps { get }
type int32
value [>=0] The number of mipmap levels.

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.

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.