Class GraphicsDeviceExtensions
Extensions for the GraphicsDevice
public static class GraphicsDeviceExtensions
- Inheritance
-
GraphicsDeviceExtensions
Methods
DrawQuad(CommandList)
Draws a full screen quad. An Effect must be applied before calling this method.
public static void DrawQuad(this CommandList commandList)
Parameters
commandList
CommandList
DrawQuad(GraphicsContext, EffectInstance)
Draws a fullscreen quad with the specified effect and parameters.
public static void DrawQuad(this GraphicsContext graphicsContext, EffectInstance effectInstance)
Parameters
graphicsContext
GraphicsContextThe graphics context used for drawing.
effectInstance
EffectInstanceThe effect instance to apply when drawing the quad.
Exceptions
- ArgumentNullException
Thrown when
effectInstance
isnull
.
DrawTexture(GraphicsContext, Texture, Color4, BlendStateDescription?)
Draws a fullscreen texture using a LinearClamp sampler and the texture color multiplied by a custom color. See Draw+a+texture to learn how to use it.
public static void DrawTexture(this GraphicsContext graphicsContext, Texture texture, Color4 color, BlendStateDescription? blendState = null)
Parameters
graphicsContext
GraphicsContexttexture
TextureThe texture. Expecting an instance of Texture.
color
Color4The color.
blendState
BlendStateDescription?
DrawTexture(GraphicsContext, Texture, SamplerState, Color4, BlendStateDescription?)
Draws a fullscreen texture using the specified sampler and the texture color multiplied by a custom color. See Draw+a+texture to learn how to use it.
public static void DrawTexture(this GraphicsContext graphicsContext, Texture texture, SamplerState sampler, Color4 color, BlendStateDescription? blendState = null)
Parameters
graphicsContext
GraphicsContexttexture
TextureThe texture. Expecting an instance of Texture.
sampler
SamplerStateThe sampler.
color
Color4The color.
blendState
BlendStateDescription?
DrawTexture(GraphicsContext, Texture, SamplerState, BlendStateDescription?)
Draws a fullscreen texture using the specified sampler. See Draw+a+texture to learn how to use it.
public static void DrawTexture(this GraphicsContext graphicsContext, Texture texture, SamplerState sampler, BlendStateDescription? blendState = null)
Parameters
graphicsContext
GraphicsContexttexture
TextureThe texture. Expecting an instance of Texture.
sampler
SamplerStateThe sampler.
blendState
BlendStateDescription?
DrawTexture(GraphicsContext, Texture, BlendStateDescription?)
Draws a fullscreen texture using a LinearClamp sampler. See Draw+a+texture to learn how to use it.
public static void DrawTexture(this GraphicsContext graphicsContext, Texture texture, BlendStateDescription? blendState = null)
Parameters
graphicsContext
GraphicsContexttexture
TextureThe texture. Expecting an instance of Texture.
blendState
BlendStateDescription?
GetSharedWhiteTexture(GraphicsDevice)
public static Texture GetSharedWhiteTexture(this GraphicsDevice device)
Parameters
device
GraphicsDevice