reckfellENGINE

RDUniform

Description of resource type, binding and RIDs for a uniform set.

On this page
class RDUniformReckfellSharpInherits RefCounted

RDUniform describes resource binding at one shader binding index. It does not allocate a buffer or texture and does not replace a uniform set. Supply the set index separately; resource type and RIDs must match the layout and a single device.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

RDUniformConstructor
# RDUniform
C#
public RDUniform();

Creates a descriptor: Binding=0, UniformType=Image and an empty RID list. Creates no GPU resource or uniform set. Explicitly set the type, binding and RIDs to match the shader layout.

Properties3

BindingProperty
# Binding
C#
public int Binding { get; set; }

Binding index within the shader set. Must match GLSL layout(binding=...); the set index is supplied separately when creating and binding the set.

UniformTypeProperty
# UniformType
C#
public RenderingDevice.UniformType UniformType { get; set; }

Resource kind for the binding, such as StorageBuffer. Must match the shader declaration and supplied RIDs; this setting does not allocate the GPU resource.

_IdsProperty
# _Ids
C#
public Reckfell.Collections.Array<Rid> _Ids { get; set; }

Internal RID-list serialization property. The getter returns a separate container; editing it does not edit the descriptor. The setter clears the descriptor first, then appends nonzero RIDs; an entry error can leave a partial list. Use AddId/ClearIds in ordinary code instead. The descriptor owns no GPU resources.

Methods7

AddIdvoid
# AddId
C#
public void AddId(Rid id);

Adds a RID to the binding description. The resource must belong to the device used for the uniform set; appending an identifier does not copy the GPU resource.

Parameters
NameTypeDefault
idRid—
id

RID of a suitable resource on the same device.

ClearIdsvoid
# ClearIds
C#
public void ClearIds();

Clears identifiers from the binding description. Does not free the GPU resources or recreate an existing uniform set.

GetBindingint
# GetBinding
C#
public int GetBinding();

Returns stored Binding, initially 0. This is a binding within a set, not the set index, RDUniform array position or a query of an existing GPU uniform set.

Returns int

Stored binding number, initially 0.

GetIdsReckfell.Collections.Array<Rid>
# GetIds
C#
public Reckfell.Collections.Array<Rid> GetIds();

Returns a new collection of the descriptor current RIDs. Editing this collection does not edit the descriptor; use AddId and ClearIds. GPU resources are not copied.

Returns Reckfell.Collections.Array<Rid>

New collection of identifiers referring to the same resources.

GetUniformTypeRenderingDevice.UniformType
# GetUniformType
C#
public RenderingDevice.UniformType GetUniformType();

Returns the stored type, initially UniformType.Image. It is not inferred from RIDs: explicitly select StorageBuffer or SamplerWithTexture. Uniform-set creation checks layout compatibility.

Returns RenderingDevice.UniformType

Stored UniformType, initially Image.

SetBindingvoid
# SetBinding
C#
public void SetBinding(int pMember);

Stores a descriptor binding without checking shader compatibility. A negative int can be stored but is not a valid way to select a GLSL binding. Changes no existing uniform set; create a new set for another binding.

Parameters
NameTypeDefault
pMemberint—
pMember

New shader-layout binding number, not a descriptor-set index.

SetUniformTypevoid
# SetUniformType
C#
public void SetUniformType(RenderingDevice.UniformType pMember);

Stores the descriptor type. Converts no RIDs, allocates no buffer and changes no existing set. Select the type from the shader layout; for a combined sampler use SamplerWithTexture and sampler-RID, texture-RID pairs.

Parameters
NameTypeDefault
pMemberRenderingDevice.UniformType—
pMember

Layout resource type, such as StorageBuffer or SamplerWithTexture; not inferred from RIDs.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.