IModelTextureDynamic

Description

interface Tinman.Engine.Models.IModelTextureDynamic

Base interface for model textures that can be updated at runtime.

To update a model texture, perform the following steps:

  1. Obtain the TexelBuffer object that represents the texture content by getting the Content property.

  2. Modify the contents of the returned TexelBuffer object.

  3. Call Update. This will trigger GPU uploads, if necessary.

Public / Methods

Content


[Constant] [Pure]
public method Content → (1)

slice opt : int32 = 0

[0..IModelTextureDynamic.SliceCount-1]
The model texture slice index.

returns → TexelBuffer

The texel buffer that represents the texture content.

Begins to update the texture content.

An application may modify the contents of the returned buffer at any time, from any thread. However, it must ensure that no concurrent modifications are performed during calls to Update.

Update


public method Update → (1)

region in : Box3I

The region of texture content that has been updated (XY is the updated rectangle, Z is the updated slice range). Set to Box3I.Max to indicate that the whole texture content has been updated.

Finishes the texture content update and triggers GPU uploads.

Public / Attributes

Slice​Count


[Constant]
public attribute SliceCount → (get)

value : int32

[>=1]
The model texture slice count.

The number of model texture slices.

Extensions

As​Streaming​Target


public static method AsStreamingTarget → ()

returns → IStreamingTarget<TexelBuffer>

The streaming target.

Wraps this dynamic model texture as a target for streaming.

Update


public static method Update → ()

Finishes the texture content update and triggers GPU uploads.

This method delegates to IModelTextureDynamic.Update, passing Box3I.Max, which updates the whole texture content.