Table of Contents

Class PrimitiveQuad

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Primitive quad use to draw an effect on a quad (fullscreen by default). This is directly accessible from the GraphicsDevice.DrawQuad method.

public class PrimitiveQuad : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
Inheritance
PrimitiveQuad
Implements
Inherited Members
Extension Methods

Constructors

PrimitiveQuad(GraphicsDevice)

Initializes a new instance of the PrimitiveQuad class.

public PrimitiveQuad(GraphicsDevice graphicsDevice)

Parameters

graphicsDevice GraphicsDevice

The graphics device.

Fields

PrimitiveType

public static readonly PrimitiveType PrimitiveType

Field Value

PrimitiveType

VertexDeclaration

public static readonly VertexDeclaration VertexDeclaration

Field Value

VertexDeclaration

Properties

GraphicsDevice

Gets the graphics device.

public GraphicsDevice GraphicsDevice { get; }

Property Value

GraphicsDevice

The graphics device.

Parameters

Gets the parameters used.

public ParameterCollection Parameters { get; }

Property Value

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

commandList CommandList

Draw(GraphicsContext, Texture, SamplerState, Color4, 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

graphicsContext GraphicsContext
texture Texture

The texture to draw.

samplerState SamplerState

State of the sampler. If null, default sampler is LinearClamp.

color Color4

The color.

blendState BlendStateDescription?

Exceptions

ArgumentException

Expecting a Texture;texture

Draw(GraphicsContext, Texture, 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

graphicsContext GraphicsContext
texture Texture

The texture.

blendState BlendStateDescription?

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

graphicsContext GraphicsContext
effectInstance EffectInstance