Class PrimitiveQuad
Primitive quad use to draw an effect on a quad (fullscreen by default). This is directly accessible from the DrawQuad(GraphicsContext, EffectInstance) method.
public class PrimitiveQuad : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
- Inheritance
-
objectPrimitiveQuad
- Implements
- Inherited Members
- Extension Methods
Constructors
PrimitiveQuad(GraphicsDevice)
Initializes a new instance of the PrimitiveQuad class.
public PrimitiveQuad(GraphicsDevice graphicsDevice)
Parameters
graphicsDeviceGraphicsDeviceThe graphics device.
Fields
PrimitiveType
public static readonly PrimitiveType PrimitiveType
Field Value
VertexDeclaration
public static readonly VertexDeclaration VertexDeclaration
Field Value
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
commandListCommandList
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
graphicsContextGraphicsContexttextureTextureThe texture to draw.
samplerStateSamplerStateState of the sampler. If null, default sampler is LinearClamp.
colorColor4The color.
blendStateBlendStateDescription?
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
graphicsContextGraphicsContexttextureTextureThe texture.
blendStateBlendStateDescription?
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
graphicsContextGraphicsContexteffectInstanceEffectInstance