IGraphicsBlit

interface IGraphicsBlit

Provides basic graphics blitting functionality.

This services provides a M:Protogame.IGraphicsBlit.Blit(Protogame.IRenderContext,Microsoft.Xna.Framework.Graphics.Texture2D,Microsoft.Xna.Framework.Graphics.RenderTarget2D,Protogame.IEffect,Protogame.IEffectParameterSet,Microsoft.Xna.Framework.Graphics.BlendState,System.Nullable{Microsoft.Xna.Framework.Vector2},System.Nullable{Microsoft.Xna.Framework.Vector2}) method, which can be used to copy the contents of one render target to another render target (or the backbuffer), optionally using a different shader.

void Blit(IRenderContext renderContext, Texture2D source, RenderTarget2D destination, Protogame.IEffect shader, Protogame.IEffectParameterSet effectParameterSet, BlendState blendState, System.Nullable<Vector2> offset, System.Nullable<Vector2> size)

Blits a render target onto another render target (or the backbuffer), using either the default blit shader, or a specific effect for post-processing render passes.

Parameters:
  • renderContext (Protogame.IRenderContext) – The current render context.
  • source (Microsoft.Xna.Framework.Graphics.Texture2D) – The source render target. If null, does not load a source texture.
  • destination (Microsoft.Xna.Framework.Graphics.RenderTarget2D) – The destination render target, or the current render target if null.
  • shader (Protogame.IEffect) – The effect shader to use, or the default blit shader if null.
  • effectParameterSet (Protogame.IEffectParameterSet) – The effect parameters to use, or the default parameter set if null.
  • blendState (Microsoft.Xna.Framework.Graphics.BlendState) – The blend state to use, or opaque blend mode if null.
  • offset (System.Nullable<Vector2>) – The top left position on the target. (0, 0) is top left, (1, 1) is bottom right.
  • size (System.Nullable<Vector2>) – The size of the render onto the target. (1, 1) is the full size of the target.
void BlitMRT(IRenderContext renderContext, Texture2D source, Microsoft.Xna.Framework.Graphics.RenderTarget2D[] destinations, Protogame.IEffect shader, Protogame.IEffectParameterSet effectParameterSet, BlendState blendState, System.Nullable<Vector2> offset, System.Nullable<Vector2> size)

Blits a render target to multiple other render targets, using a specific effect that writes to multiple render targets.

Parameters:
  • renderContext (Protogame.IRenderContext) – The current render context.
  • source (Microsoft.Xna.Framework.Graphics.Texture2D) – The source render target. If null, does not load a source texture.
  • destinations (Microsoft.Xna.Framework.Graphics.RenderTarget2D[]) – The destination render targets.
  • shader (Protogame.IEffect) – The effect shader to use.
  • effectParameterSet (Protogame.IEffectParameterSet) – The effect parameters to use.
  • blendState (Microsoft.Xna.Framework.Graphics.BlendState) – The blend state to use, or opaque blend mode if null.
  • offset (System.Nullable<Vector2>) – The top left position on the target. (0, 0) is top left, (1, 1) is bottom right.
  • size (System.Nullable<Vector2>) – The size of the render onto the target. (1, 1) is the full size of the target.