Skip to content

GraphicsAPI reference

Struct ShaderResources

Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device

Resource counts of a shader, produced by the offline tool’s reflection and validated at creation. Bindings follow the SDL_GPU register-space rules (vertex uniforms space1; fragment samplers space2, fragment uniforms space3).

C#
public readonly struct ShaderResources : IEquatable<ShaderResources>

Implements

IEquatable<ShaderResources>

Constructors

ShaderResources(int, int, int, int)

Resource counts of a shader, produced by the offline tool’s reflection and validated at creation. Bindings follow the SDL_GPU register-space rules (vertex uniforms space1; fragment samplers space2, fragment uniforms space3).

C#
public ShaderResources(int Samplers = 0, int UniformBuffers = 0, int StorageTextures = 0, int StorageBuffers = 0)

Parameters

Samplers int

Texture-sampler pairs, slots 0..n-1.

UniformBuffers int

Uniform slots, 0..n-1.

StorageTextures int

Storage textures (reserved; must be 0 in this contract version).

StorageBuffers int

Storage buffers (reserved; must be 0 in this contract version).

Properties

Samplers

Texture-sampler pairs, slots 0..n-1.

C#
public int Samplers { get; init; }

Property Value

int

StorageBuffers

Storage buffers (reserved; must be 0 in this contract version).

C#
public int StorageBuffers { get; init; }

Property Value

int

StorageTextures

Storage textures (reserved; must be 0 in this contract version).

C#
public int StorageTextures { get; init; }

Property Value

int

UniformBuffers

Uniform slots, 0..n-1.

C#
public int UniformBuffers { get; init; }

Property Value

int

Methods

Deconstruct(out int, out int, out int, out int)

C#
public void Deconstruct(out int Samplers, out int UniformBuffers, out int StorageTextures, out int StorageBuffers)

Parameters

Samplers int

UniformBuffers int

StorageTextures int

StorageBuffers int

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(ShaderResources)

C#
public bool Equals(ShaderResources other)

Parameters

other ShaderResources

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(ShaderResources, ShaderResources)

C#
public static bool operator ==(ShaderResources left, ShaderResources right)

Parameters

left ShaderResources

right ShaderResources

Returns

bool

operator !=(ShaderResources, ShaderResources)

C#
public static bool operator !=(ShaderResources left, ShaderResources right)

Parameters

left ShaderResources

right ShaderResources

Returns

bool