Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    PrimitiveQuad Class

    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 method.

    System.Object → DisposeBase → ComponentBase → PrimitiveQuad
    Derived from PrimitiveQuad:

    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.

    | Improve this Doc View Source

    Constructors


    PrimitiveQuad(GraphicsDevice)

    Initializes a new instance of the PrimitiveQuad class.

    public PrimitiveQuad(GraphicsDevice graphicsDevice)
    Parameters
    Type Name Description
    GraphicsDevice graphicsDevice

    The graphics device.

    | Improve this Doc View Source

    Fields


    PrimitiveType

    public static readonly PrimitiveType PrimitiveType
    Field Value
    Type Description
    PrimitiveType

    VertexDeclaration

    public static readonly VertexDeclaration VertexDeclaration
    Field Value
    Type Description
    VertexDeclaration
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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

    Inherited Members

    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.Destroy()
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation