RDUniform
Description of resource type, binding and RIDs for a uniform set.
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
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
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
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
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
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.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
idRID of a suitable resource on the same device.
ClearIdsvoid
public void ClearIds();Clears identifiers from the binding description. Does not free the GPU resources or recreate an existing uniform set.
GetBindingint
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.
intStored binding number, initially 0.
GetIdsReckfell.Collections.Array<Rid>
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.
Reckfell.Collections.Array<Rid>New collection of identifiers referring to the same resources.
GetUniformTypeRenderingDevice.UniformType
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.
RenderingDevice.UniformTypeStored UniformType, initially Image.
SetBindingvoid
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.
| Name | Type | Default |
|---|---|---|
pMember | int | — |
pMemberNew shader-layout binding number, not a descriptor-set index.
SetUniformTypevoid
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.
| Name | Type | Default |
|---|---|---|
pMember | RenderingDevice.UniformType | — |
pMemberLayout resource type, such as StorageBuffer or SamplerWithTexture; not inferred from RIDs.