PrimitiveQuad Class
Namespace: Stride.GraphicsAssembly: Stride.Graphics.dll
Primitive quad use to draw an effect on a quad (fullscreen by default). This is directly accessible from the
public class PrimitiveQuad : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
Name | Description | |
---|---|---|
Constructors | ||
PrimitiveQuad(GraphicsDevice) | Initializes a new instance of the PrimitiveQuad class. |
|
Fields | ||
PrimitiveType | ||
VertexDeclaration | ||
Properties | ||
GraphicsDevice | Gets the graphics device. |
|
Parameters | Gets the parameters used. |
|
Methods | ||
Draw(CommandList) | Draws a quad. The effect must have been applied before calling this method with pixel shader having the signature float2:TEXCOORD. |
|
Draw(GraphicsContext, Texture, SamplerState, Color4, Nullable<BlendStateDescription>) | Draws a quad with a texture. This Draw method is using a simple pixel shader that is sampling the texture. |
|
Draw(GraphicsContext, Texture, Nullable<BlendStateDescription>) | Draws a quad with a texture. This Draw method is using the current effect bound to this instance. |
|
Draw(GraphicsContext, EffectInstance) | Draws a quad. The effect must have been applied before calling this method with pixel shader having the signature float2:TEXCOORD. |
Constructors
PrimitiveQuad(GraphicsDevice)
Initializes a new instance of the PrimitiveQuad class.
public PrimitiveQuad(GraphicsDevice graphicsDevice)
Parameters
Type | Name | Description |
---|---|---|
GraphicsDevice | graphicsDevice | The graphics device. |
Fields
PrimitiveType
public static readonly PrimitiveType PrimitiveType
Field Value
Type | Description |
---|---|
PrimitiveType |
VertexDeclaration
public static readonly VertexDeclaration VertexDeclaration
Field Value
Type | Description |
---|---|
VertexDeclaration |
Properties
GraphicsDevice
Gets the graphics device.
public GraphicsDevice GraphicsDevice { get; }
Property Value
Type | Description |
---|---|
GraphicsDevice | The graphics device. |
Parameters
Gets the parameters used.
public ParameterCollection Parameters { get; }
Property Value
Type | Description |
---|---|
ParameterCollection | The parameters. |
Methods
Draw(CommandList)
Draws a quad. The effect must have been applied before calling this method with pixel shader having the signature float2:TEXCOORD.
public void Draw(CommandList commandList)
Parameters
Type | Name | Description |
---|---|---|
CommandList | commandList |
Draw(GraphicsContext, Texture, SamplerState, Color4, Nullable<BlendStateDescription>)
Draws a quad with a texture. This Draw method is using a simple pixel shader that is sampling the texture.
public void Draw(GraphicsContext graphicsContext, Texture texture, SamplerState samplerState, Color4 color, BlendStateDescription? blendState = null)
Parameters
Type | Name | Description |
---|---|---|
GraphicsContext | graphicsContext | |
Texture | texture | The texture to draw. |
SamplerState | samplerState | State of the sampler. If null, default sampler is LinearClamp. |
Color4 | color | The color. |
System.Nullable<BlendStateDescription> | blendState |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Expecting a Texture;texture |
Draw(GraphicsContext, Texture, Nullable<BlendStateDescription>)
Draws a quad with a texture. This Draw method is using the current effect bound to this instance.
public void Draw(GraphicsContext graphicsContext, Texture texture, BlendStateDescription? blendState = null)
Parameters
Type | Name | Description |
---|---|---|
GraphicsContext | graphicsContext | |
Texture | texture | The texture. |
System.Nullable<BlendStateDescription> | blendState |
Draw(GraphicsContext, EffectInstance)
Draws a quad. The effect must have been applied before calling this method with pixel shader having the signature float2:TEXCOORD.
public void Draw(GraphicsContext graphicsContext, EffectInstance effectInstance)
Parameters
Type | Name | Description |
---|---|---|
GraphicsContext | graphicsContext | |
EffectInstance | effectInstance |