Class GorgonGeometryShader
A shader that can be used to produce new geometry.
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public sealed class GorgonGeometryShader : GorgonShader, IGorgonNamedObject, IDisposable, IGorgonGraphicsObject
Remarks
A geometry shader is a program that is used to build new geometry on the GPU. This allows for effects like point sprites.
In Gorgon, shaders can be compiled from a string containing source code via the GorgonShaderFactory, or loaded from a Stream or file for quicker access. The
GorgonShaderFactory is required to compile or read shaders, they cannot be created via the new
keyword.
Properties
| Edit this page View SourceShaderType
Property to return the type of shader.
Declaration
public override ShaderType ShaderType { get; }
Property Value
Type | Description |
---|---|
ShaderType |
Overrides
| Edit this page View SourceStreamOutLayout
Property to return the GorgonStreamOutLayout for this geometry shader.
Declaration
public GorgonStreamOutLayout StreamOutLayout { get; }
Property Value
Type | Description |
---|---|
GorgonStreamOutLayout |
Remarks
If this geometry shader is capable of performing stream output, then this value will be non null. Otherwise, it will not be capable of supporting stream output.
Methods
| Edit this page View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public override void Dispose()
Overrides
| Edit this page View SourceToStreamOut(GorgonStreamOutLayout, IEnumerable<int>)
Function to convert this geometry shader to use a stream output.
Declaration
public GorgonGeometryShader ToStreamOut(GorgonStreamOutLayout streamOutLayout, IEnumerable<int> strides = null)
Parameters
Type | Name | Description |
---|---|---|
GorgonStreamOutLayout | streamOutLayout | The stream output layout for the shader. |
IEnumerable<int> | strides | [Optional] A list of strides that define the size of an element for each buffer. |
Returns
Type | Description |
---|---|
GorgonGeometryShader | A new GorgonGeometryShader that is capable of stream output. |
Remarks
A base geometry shader must be converted to use stream output if an application wants to send data from the shader into a buffer.
If the strides
parameter is supplied, then it will be limited to 4 items at most, any more than that and the list will be truncated.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |