Skip to content

DrawCallTexture Class

Draws an image ot the active SharedSpriteBatch.

C#
public class DrawCallTexture : IDrawCall

Inheritance object

Implements IDrawCall

DrawCallTexture(Texture2D, Vector2, Color?, Effect)

Section titled “DrawCallTexture(Texture2D, Vector2, Color?, Effect)”

Creates a new instance of this draw call.

C#
public DrawCallTexture(Texture2D texture, Vector2 position, Color? tint = null, Effect effect = null)

texture Microsoft.Xna.Framework.Graphics.Texture2D
The image to draw.

position Microsoft.Xna.Framework.Vector2
The position on the SharedSpriteBatch to draw the image.

tint System.NullableMicrosoft.Xna.Framework.Color
A color tint to apply to the drawn image.

effect Microsoft.Xna.Framework.Graphics.Effect
A shader to apply to the texture being drawn.

NullReferenceException
Thrown when texture is null.

The image to draw.

C#
public Texture2D Texture

The shader to use when drawing the texture.

C#
public Effect ShaderEffect

Where on the SharedSpriteBatch to draw the texture.

C#
public Vector2 Position

A color tint to apply when drawn.

C#
public Color Tint

Draws an object.

C#
public void Draw()