Skip to main content
Version: 0.9.0

VideoTextureCpu struct

One sender-owned CPU texture. The pixel memory is not copied: VideoTextureCpu.TextureData points into the sender.

Namespace: Quaternar.Qaros · Assembly: Quaternar.Qaros.dll · Source: QarTypes.cs

public readonly struct VideoTextureCpu

Constructors​

VideoTextureCpu(TextureSize, uint, nint, nuint)​

public VideoTextureCpu(TextureSize size, uint pitch, nint textureData, nuint textureDataSize)

Parameters

NameTypeDescription
sizeTextureSize
pitchuint
textureDatanint
textureDataSizenuint

Properties​

MemberDescription
Size
PitchRow stride in bytes.
TextureDataThe sender's pixel buffer, VideoTextureCpu.TextureDataSize bytes. Write into it only inside a frame cycle, and never after the sender is disposed.
TextureDataSizeSize of VideoTextureCpu.TextureData in bytes.
TextureDataSpanRead-only view of VideoTextureCpu.TextureData; empty when there is none. Write pixels through VideoTextureCpu.TextureData.

Size​

public TextureSize Size { get; }

Value: TextureSize

Pitch​

Row stride in bytes.

public uint Pitch { get; }

Value: uint

TextureData​

The sender's pixel buffer, VideoTextureCpu.TextureDataSize bytes. Write into it only inside a frame cycle, and never after the sender is disposed.

public nint TextureData { get; }

Value: nint

TextureDataSize​

Size of VideoTextureCpu.TextureData in bytes.

public nuint TextureDataSize { get; }

Value: nuint

TextureDataSpan​

Read-only view of VideoTextureCpu.TextureData; empty when there is none. Write pixels through VideoTextureCpu.TextureData.

public ReadOnlySpan<byte> TextureDataSpan { get; }

Value: ReadOnlySpan<byte>