Gorgon
Show / Hide Table of Contents

Struct GorgonStreamOutBinding

A binding to allow the streaming of data from the GPU to an arbitrary buffer.

Implements
IGorgonEquatableByRef<GorgonStreamOutBinding>
IEquatable<GorgonStreamOutBinding>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
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 Source

GorgonStreamOutBinding(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 buffer is not a stream out buffer, or is a constant buffer.

See Also
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer

Fields

| Edit this page View Source

Buffer

The buffer used for the binding.

Declaration
public readonly GorgonBufferCommon Buffer
Field Value
Type Description
GorgonBufferCommon
See Also
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer
| Edit this page View Source

Empty

An empty binding.

Declaration
public static readonly GorgonStreamOutBinding Empty
Field Value
Type Description
GorgonStreamOutBinding
See Also
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer
| Edit this page View Source

Offset

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
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer

Methods

| Edit this page View Source

Equals(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
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer
| Edit this page View Source

Equals(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
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer
| Edit this page View Source

Equals(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
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer
| Edit this page View Source

Equals(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
ValueType.Equals(object)
See Also
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer
| Edit this page View Source

GetHashCode()

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
ValueType.GetHashCode()
See Also
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer
| Edit this page View Source

ToString()

Returns a string that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents this instance.

Overrides
ValueType.ToString()
See Also
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer

Operators

| Edit this page View Source

operator ==(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
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer
| Edit this page View Source

operator !=(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
GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer

Implements

IGorgonEquatableByRef<T>
IEquatable<T>

Extension Methods

GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)

See Also

GorgonBuffer
GorgonVertexBuffer
GorgonIndexBuffer
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author