Class TextureSerializationData
Texture serialization data
public sealed class TextureSerializationData
- Inheritance
-
objectTextureSerializationData
- Extension Methods
Constructors
TextureSerializationData(Image)
Initializes a new instance of the TextureSerializationData class.
public TextureSerializationData(Image image)
Parameters
imageImageThe image.
TextureSerializationData(Image, bool, ContentStorageHeader)
Initializes a new instance of the TextureSerializationData class.
public TextureSerializationData(Image image, bool enableStreaming, ContentStorageHeader storageHeader)
Parameters
imageImageThe image.
enableStreamingboolEnables/disables texture streaming
storageHeaderContentStorageHeaderStreaming storage data
Fields
EnableStreaming
Enables/disables texture streaming.
public bool EnableStreaming
Field Value
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
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
streamSerializationStreamThe source stream.
fullResDescriptionImageDescriptionThe 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
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
streamSerializationStreamThe destination stream.