Table of Contents

Class TextureSerializationData

Namespace
Stride.Graphics.Data
Assembly
Stride.Graphics.dll

Texture serialization data

public sealed class TextureSerializationData
Inheritance
object
TextureSerializationData
Extension Methods

Constructors

TextureSerializationData(Image)

Initializes a new instance of the TextureSerializationData class.

public TextureSerializationData(Image image)

Parameters

image Image

The image.

TextureSerializationData(Image, bool, ContentStorageHeader)

Initializes a new instance of the TextureSerializationData class.

public TextureSerializationData(Image image, bool enableStreaming, ContentStorageHeader storageHeader)

Parameters

image Image

The image.

enableStreaming bool

Enables/disables texture streaming

storageHeader ContentStorageHeader

Streaming storage data

Fields

EnableStreaming

Enables/disables texture streaming.

public bool EnableStreaming

Field Value

bool

Image

The texture image.

public Image Image

Field Value

Image

StorageHeader

The raw bytes with a content storage header description.

public ContentStorageHeader StorageHeader

Field Value

ContentStorageHeader

Methods

Read(SerializationStream, out ImageDescription)

Opposite of Write(SerializationStream), loads an instance from the stream provided.

public static TextureSerializationData Read(SerializationStream stream, out ImageDescription fullResDescription)

Parameters

stream SerializationStream

The source stream.

fullResDescription ImageDescription

The image returned, when marked as streamed, may correspond to a lower mip of the whole texture. This variable returns the description of the fully loaded texture.

Returns

TextureSerializationData

Remarks

Similar to Write(SerializationStream), a streamed image is serialized separately from this range in the stream. In that specific case, the image returned may correspond to a lower mip of the whole texture or an empty full-size image if the mip's format was incompatible (InitialImage).
You will have to go through ContentStreamingService and its ContentStorage to retrieve the full resolution data, see Stride.Graphics.Data.TextureContentSerializer's implementation.

Write(SerializationStream)

Saves this instance to a stream.

public void Write(SerializationStream stream)

Parameters

stream SerializationStream

The destination stream.