Struct DeviceBufferRange
A BindableResource that represents a section of a DeviceBuffer. This can be used in place of a DeviceBuffer when creating a ResourceSet to make only a subset of the Buffer available to shaders.
Inherited Members
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct DeviceBufferRange : BindableResource, IEquatable<DeviceBufferRange>
Constructors
DeviceBufferRange(DeviceBuffer, UInt32, UInt32)
Constructs a new DeviceBufferRange.
Declaration
public DeviceBufferRange(DeviceBuffer buffer, uint offset, uint sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
DeviceBuffer | buffer | The underlying DeviceBuffer that this range will refer to. |
System.UInt32 | offset | The offset, in bytes, from the beginning of the buffer that this range will start at. |
System.UInt32 | sizeInBytes | The total number of bytes that this range will encompass. |
Fields
Buffer
The underlying DeviceBuffer that this range refers to.
Declaration
public DeviceBuffer Buffer
Field Value
Type | Description |
---|---|
DeviceBuffer |
Offset
The offset, in bytes, from the beginning of the buffer that this range starts at.
Declaration
public uint Offset
Field Value
Type | Description |
---|---|
System.UInt32 |
SizeInBytes
The total number of bytes that this range encompasses.
Declaration
public uint SizeInBytes
Field Value
Type | Description |
---|---|
System.UInt32 |
Methods
Equals(DeviceBufferRange)
Element-wise equality.
Declaration
public bool Equals(DeviceBufferRange other)
Parameters
Type | Name | Description |
---|---|---|
DeviceBufferRange | other | The instance to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | True if all elements are equal; false otherswise. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer that is the hash code for this instance. |