Class GpuRenderState
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
~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
slotIndexuintThe fragment uniform slot index to push data to
dataNativeMemoryThe 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
slotIndexuintThe fragment uniform slot index to push data to
dataReadOnlySpan<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
slotIndexuintThe fragment uniform slot index to push data to
datavoid*The client data to write
lenghtuintThe 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)