Struct GorgonStreamOutBinding
A binding to allow the streaming of data from the GPU to an arbitrary buffer.
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public readonly struct GorgonStreamOutBinding : IGorgonEquatableByRef<GorgonStreamOutBinding>, IEquatable<GorgonStreamOutBinding>
Remarks
This type of binding allows the GPU to send data to one of the available buffer types (except the GorgonConstantBuffer type). Data can be generated by a shader and pushed into a buffer attached to the binding for later use.
Constructors
| Edit this page View SourceGorgonStreamOutBinding(GorgonBufferCommon, int)
Initializes a new instance of the GorgonStreamOutBinding struct.
Declaration
public GorgonStreamOutBinding(GorgonBufferCommon buffer, int offset = 0)
Parameters
Type | Name | Description |
---|---|---|
GorgonBufferCommon | buffer | The buffer to bind. |
int | offset | [Optional] The offset within the buffer to use. |
Remarks
If the buffer
passed did not have a stream out binding set on creation, then an exception will be thrown.
Exceptions
Type | Condition |
---|---|
GorgonException | Thrown when the |
See Also
Fields
| Edit this page View SourceBuffer
The buffer used for the binding.
Declaration
public readonly GorgonBufferCommon Buffer
Field Value
Type | Description |
---|---|
GorgonBufferCommon |
See Also
| Edit this page View SourceEmpty
An empty binding.
Declaration
public static readonly GorgonStreamOutBinding Empty
Field Value
Type | Description |
---|---|
GorgonStreamOutBinding |
See Also
| Edit this page View SourceOffset
The offset within the buffer to use, in bytes.
Declaration
public readonly int Offset
Field Value
Type | Description |
---|---|
int |
Remarks
A value of -1 will cause the buffer to append data after the last location written in a previous stream out operation.
See Also
Methods
| Edit this page View SourceEquals(GorgonStreamOutBinding)
Function to determine if two instances are equal.
Declaration
public bool Equals(GorgonStreamOutBinding other)
Parameters
Type | Name | Description |
---|---|---|
GorgonStreamOutBinding | other | The other instance. |
Returns
Type | Description |
---|---|
bool | true if equal, false if not. |
See Also
| Edit this page View SourceEquals(in GorgonStreamOutBinding)
Function to determine if two instances are equal.
Declaration
public bool Equals(in GorgonStreamOutBinding other)
Parameters
Type | Name | Description |
---|---|---|
GorgonStreamOutBinding | other | The other instance. |
Returns
Type | Description |
---|---|
bool | true if equal, false if not. |
See Also
| Edit this page View SourceEquals(in GorgonStreamOutBinding, in GorgonStreamOutBinding)
Function to determine if two instances are equal.
Declaration
public static bool Equals(in GorgonStreamOutBinding left, in GorgonStreamOutBinding right)
Parameters
Type | Name | Description |
---|---|---|
GorgonStreamOutBinding | left | The left instance to compare. |
GorgonStreamOutBinding | right | The right instance to compare. |
Returns
Type | Description |
---|---|
bool | true if equal, false if not. |
See Also
| Edit this page View SourceEquals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to this instance; otherwise, false. |
Overrides
See Also
| Edit this page View SourceGetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
See Also
| Edit this page View SourceToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents this instance. |
Overrides
See Also
Operators
| Edit this page View Sourceoperator ==(in GorgonStreamOutBinding, in GorgonStreamOutBinding)
Implements the operator ==.
Declaration
public static bool operator ==(in GorgonStreamOutBinding left, in GorgonStreamOutBinding right)
Parameters
Type | Name | Description |
---|---|---|
GorgonStreamOutBinding | left | The left. |
GorgonStreamOutBinding | right | The right. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |
See Also
| Edit this page View Sourceoperator !=(in GorgonStreamOutBinding, in GorgonStreamOutBinding)
Implements the operator ==.
Declaration
public static bool operator !=(in GorgonStreamOutBinding left, in GorgonStreamOutBinding right)
Parameters
Type | Name | Description |
---|---|---|
GorgonStreamOutBinding | left | The left. |
GorgonStreamOutBinding | right | The right. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |