Table of Contents

Class GpuRenderState

Namespace
Sdl3Sharp.Video.Rendering
Assembly
Sdl3Sharp.dll

Represents a custom GPU render state

public sealed class GpuRenderState : IDisposable
Inheritance
GpuRenderState
Implements
Inherited Members

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Remarks

This method should be called on the thread that created the Renderer<Gpu>.

~GpuRenderState()

protected ~GpuRenderState()

TrySetFragmentUniforms(uint, NativeMemory)

Tries to set fragment shader uniform variables in the GPU render state

public bool TrySetFragmentUniforms(uint slotIndex, NativeMemory data)

Parameters

slotIndex uint

The fragment uniform slot index to push data to

data NativeMemory

The client data to write

Returns

bool

true, if the fragment shader uniform variables were successfully set; otherwise, false (check TryGet(out string?) for more information)

Remarks

This given data is copied and will be pushed using SDL_PushGPUFragmentUniformData during draw call execution.

This method should be called on the thread that created the Renderer<Gpu>.

TrySetFragmentUniforms(uint, ReadOnlySpan<byte>)

Tries to set fragment shader uniform variables in the GPU render state

public bool TrySetFragmentUniforms(uint slotIndex, ReadOnlySpan<byte> data)

Parameters

slotIndex uint

The fragment uniform slot index to push data to

data ReadOnlySpan<byte>

The client data to write

Returns

bool

true, if the fragment shader uniform variables were successfully set; otherwise, false (check TryGet(out string?) for more information)

Remarks

This given data is copied and will be pushed using SDL_PushGPUFragmentUniformData during draw call execution.

This method should be called on the thread that created the Renderer<Gpu>.

TrySetFragmentUniforms(uint, void*, uint)

Tries to set fragment shader uniform variables in the GPU render state

public bool TrySetFragmentUniforms(uint slotIndex, void* data, uint lenght)

Parameters

slotIndex uint

The fragment uniform slot index to push data to

data void*

The client data to write

lenght uint

The length of the data to write

Returns

bool

true, if the fragment shader uniform variables were successfully set; otherwise, false (check TryGet(out string?) for more information)

Remarks

This given data is copied and will be pushed using SDL_PushGPUFragmentUniformData during draw call execution.

This method should be called on the thread that created the Renderer<Gpu>.