Skip to main content
Version: 1.0.0-preview.38

Velaptor.Graphics.Renderers.ITextureRenderer

Velaptor

Velaptor.Graphics.Renderers

ITextureRenderer Interface

Renders textures to the screen.

public interface ITextureRenderer

Methods

Render(IAtlasData, string, Vector2, float, float, int, int)

Renders the Texture in the given atlas using the given parameters.

void Render(Velaptor.Content.IAtlasData atlas, string subTextureName, System.Numerics.Vector2 pos, float angle, float size, int frameNumber=0, int layer=0);

Parameters

atlas IAtlasData

The texture atlas data.

subTextureName System.String

The name of the sub-texture in the atlas.

pos System.Numerics.Vector2

The position of where to render the sub-texture.

angle System.Single

The angle of rotation in degrees.

size System.Single

The size to render the texture. 1 is for 100%, which is the normal size.

frameNumber System.Int32

The number of the frame if an animation.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(IAtlasData, string, Vector2, float, float, Color, int, int)

Renders the Texture in the given atlas using the given parameters.

void Render(Velaptor.Content.IAtlasData atlas, string subTextureName, System.Numerics.Vector2 pos, float angle, float size, System.Drawing.Color color, int frameNumber=0, int layer=0);

Parameters

atlas IAtlasData

The texture atlas data.

subTextureName System.String

The name of the sub-texture in the atlas.

pos System.Numerics.Vector2

The position of where to render the sub-texture.

angle System.Single

The angle of rotation in degrees.

size System.Single

The size to render the texture. 1 is for 100%, which is the normal size.

color System.Drawing.Color

The color to apply to the texture.

frameNumber System.Int32

The number of the frame if an animation.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(IAtlasData, string, Vector2, float, float, Color, RenderEffects, int, int)

Renders the Texture in the given atlas using the given parameters.

void Render(Velaptor.Content.IAtlasData atlas, string subTextureName, System.Numerics.Vector2 pos, float angle, float size, System.Drawing.Color color, Velaptor.Graphics.RenderEffects effects, int frameNumber=0, int layer=0);

Parameters

atlas IAtlasData

The texture atlas data.

subTextureName System.String

The name of the sub-texture in the atlas.

pos System.Numerics.Vector2

The position of where to render the sub-texture.

angle System.Single

The angle of rotation in degrees.

size System.Single

The size to render the texture. 1 is for 100%, which is the normal size.

color System.Drawing.Color

The color to apply to the texture.

effects RenderEffects

The rendering effects to apply to the texture when rendering.

frameNumber System.Int32

The number of the frame if an animation.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(IAtlasData, string, Vector2, float, int, int)

Renders the Texture in the given atlas using the given parameters.

void Render(Velaptor.Content.IAtlasData atlas, string subTextureName, System.Numerics.Vector2 pos, float angle, int frameNumber=0, int layer=0);

Parameters

atlas IAtlasData

The texture atlas data.

subTextureName System.String

The name of the sub-texture in the atlas.

pos System.Numerics.Vector2

The position of where to render the sub-texture.

angle System.Single

The angle of rotation in degrees.

frameNumber System.Int32

The number of the frame if an animation.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(IAtlasData, string, Vector2, float, Color, int, int)

Renders the Texture in the given atlas using the given parameters.

void Render(Velaptor.Content.IAtlasData atlas, string subTextureName, System.Numerics.Vector2 pos, float angle, System.Drawing.Color color, int frameNumber=0, int layer=0);

Parameters

atlas IAtlasData

The texture atlas data.

subTextureName System.String

The name of the sub-texture in the atlas.

pos System.Numerics.Vector2

The position of where to render the sub-texture.

angle System.Single

The angle of rotation in degrees.

color System.Drawing.Color

The color to apply to the texture.

frameNumber System.Int32

The number of the frame if an animation.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(IAtlasData, string, Vector2, int, int)

Renders the Texture in the given atlas using the given parameters.

void Render(Velaptor.Content.IAtlasData atlas, string subTextureName, System.Numerics.Vector2 pos, int frameNumber=0, int layer=0);

Parameters

atlas IAtlasData

The texture atlas data.

subTextureName System.String

The name of the sub-texture in the atlas.

pos System.Numerics.Vector2

The position of where to render the sub-texture.

frameNumber System.Int32

The number of the frame if an animation.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(IAtlasData, string, Vector2, Color, int, int)

Renders the Texture in the given atlas using the given parameters.

void Render(Velaptor.Content.IAtlasData atlas, string subTextureName, System.Numerics.Vector2 pos, System.Drawing.Color color, int frameNumber=0, int layer=0);

Parameters

atlas IAtlasData

The texture atlas data.

subTextureName System.String

The name of the sub-texture in the atlas.

pos System.Numerics.Vector2

The position of where to render the sub-texture.

color System.Drawing.Color

The color to apply to the texture.

frameNumber System.Int32

The number of the frame if an animation.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, int, int, float, float, int)

Renders the given texture at the given x and y coordinates, angle,
and size.

void Render(Velaptor.Content.ITexture texture, int x, int y, float angle, float size, int layer=0);

Parameters

texture ITexture

The texture to render.

x System.Int32

The X location of the texture.

y System.Int32

The Y location of the texture.

angle System.Single

The angle of rotation in degrees.

size System.Single

The size to render the texture. 1 is for 100%, which is the normal size.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The x and y position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, int, int, float, float, Color, int)

Renders the given texture at the given x and y coordinates, angle,
size, and color.

void Render(Velaptor.Content.ITexture texture, int x, int y, float angle, float size, System.Drawing.Color color, int layer=0);

Parameters

texture ITexture

The texture to render.

x System.Int32

The X location of the texture.

y System.Int32

The Y location of the texture.

angle System.Single

The angle of rotation in degrees.

size System.Single

The size to render the texture. 1 is for 100%, which is the normal size.

color System.Drawing.Color

The color to apply to the texture.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The x and y position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, int, int, float, int)

Renders the given texture at the given x and y coordinates, and the given angle.

void Render(Velaptor.Content.ITexture texture, int x, int y, float angle, int layer=0);

Parameters

texture ITexture

The texture to render.

x System.Int32

The X location of the texture.

y System.Int32

The Y location of the texture.

angle System.Single

The angle of rotation in degrees.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The x and y position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, int, int, int)

Renders the given texture at the given x and y coordinates.

void Render(Velaptor.Content.ITexture texture, int x, int y, int layer=0);

Parameters

texture ITexture

The texture to render.

x System.Int32

The X location of the texture.

y System.Int32

The Y location of the texture.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The x and y position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, int, int, Color, int)

Renders the given texture at the given x and y coordinates.

void Render(Velaptor.Content.ITexture texture, int x, int y, System.Drawing.Color color, int layer=0);

Parameters

texture ITexture

The texture to render.

x System.Int32

The X location of the texture.

y System.Int32

The Y location of the texture.

color System.Drawing.Color

The color to apply to the texture.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The x and y position is based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, int, int, Color, RenderEffects, int)

Renders the given texture at the given x and y coordinates.

void Render(Velaptor.Content.ITexture texture, int x, int y, System.Drawing.Color color, Velaptor.Graphics.RenderEffects effects, int layer=0);

Parameters

texture ITexture

The texture to render.

x System.Int32

The X location of the texture.

y System.Int32

The Y location of the texture.

color System.Drawing.Color

The color to apply to the texture.

effects RenderEffects

The rendering effects to apply to the texture when rendering.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The x and y position is based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, int, int, RenderEffects, int)

Renders the given texture at the given x and y coordinates.

void Render(Velaptor.Content.ITexture texture, int x, int y, Velaptor.Graphics.RenderEffects effects, int layer=0);

Parameters

texture ITexture

The texture to render.

x System.Int32

The X location of the texture.

y System.Int32

The Y location of the texture.

effects RenderEffects

The rendering effects to apply to the texture when rendering.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The x and y position is based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, Rectangle, Rectangle, float, float, Color, RenderEffects, int)

Renders the given Texture using the given parameters.

void Render(Velaptor.Content.ITexture texture, System.Drawing.Rectangle srcRect, System.Drawing.Rectangle destRect, float size, float angle, System.Drawing.Color color, Velaptor.Graphics.RenderEffects effects, int layer=0);

Parameters

texture ITexture

The texture to render.

srcRect System.Drawing.Rectangle

The rectangle of the sub texture within the texture to render.

destRect System.Drawing.Rectangle

The destination rectangle of rendering.

size System.Single

The size to render the texture. 1 is for 100%, which is the normal size.

angle System.Single

The angle of rotation in degrees.

color System.Drawing.Color

The color to apply to the rendering.

effects RenderEffects

The rendering effects to apply to the texture when rendering.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The position in the destRect is based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, Vector2, float, float, int)

Renders the given texture at the given pos coordinates, angle, and
the given size.

void Render(Velaptor.Content.ITexture texture, System.Numerics.Vector2 pos, float angle, float size, int layer=0);

Parameters

texture ITexture

The texture to render.

pos System.Numerics.Vector2

The location of the texture.

angle System.Single

The angle of rotation in degrees.

size System.Single

The size to render the texture. 1 is for 100%, which is the normal size.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The pos position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, Vector2, float, float, Color, int)

Renders the given texture at the given pos coordinates, angle,
size, and color.

void Render(Velaptor.Content.ITexture texture, System.Numerics.Vector2 pos, float angle, float size, System.Drawing.Color color, int layer=0);

Parameters

texture ITexture

The texture to render.

pos System.Numerics.Vector2

The location of the texture.

angle System.Single

The angle of rotation in degrees.

size System.Single

The size to render the texture. 1 is for 100%, which is the normal size.

color System.Drawing.Color

The color to apply to the texture.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The pos position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, Vector2, float, int)

Renders the given texture at the given pos coordinates and the given angle.

void Render(Velaptor.Content.ITexture texture, System.Numerics.Vector2 pos, float angle, int layer=0);

Parameters

texture ITexture

The texture to render.

pos System.Numerics.Vector2

The location of the texture.

angle System.Single

The angle of rotation in degrees.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The pos position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, Vector2, int)

Renders the given texture at the given pos coordinates.

void Render(Velaptor.Content.ITexture texture, System.Numerics.Vector2 pos, int layer=0);

Parameters

texture ITexture

The texture to render.

pos System.Numerics.Vector2

The location of the texture.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The pos position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, Vector2, Color, int)

Renders the given texture at the given pos coordinates.

void Render(Velaptor.Content.ITexture texture, System.Numerics.Vector2 pos, System.Drawing.Color color, int layer=0);

Parameters

texture ITexture

The texture to render.

pos System.Numerics.Vector2

The location of the texture.

color System.Drawing.Color

The color to apply to the texture.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The pos position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, Vector2, Color, RenderEffects, int)

Renders the given texture at the given pos coordinates.

void Render(Velaptor.Content.ITexture texture, System.Numerics.Vector2 pos, System.Drawing.Color color, Velaptor.Graphics.RenderEffects effects, int layer=0);

Parameters

texture ITexture

The texture to render.

pos System.Numerics.Vector2

The location of the texture.

color System.Drawing.Color

The color to apply to the texture.

effects RenderEffects

The rendering effects to apply to the texture when rendering.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The pos position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5

Render(ITexture, Vector2, RenderEffects, int)

Renders the given texture at the given pos coordinates.

void Render(Velaptor.Content.ITexture texture, System.Numerics.Vector2 pos, Velaptor.Graphics.RenderEffects effects, int layer=0);

Parameters

texture ITexture

The texture to render.

pos System.Numerics.Vector2

The location of the texture.

effects RenderEffects

The rendering effects to apply to the texture when rendering.

layer System.Int32

The layer to render the texture.

Exceptions

System.Exception
Thrown if the Begin() method has not been called.

Remarks

The pos position are based in the center of the texture.

Lower layer values will render before higher layer values.
If two separate textures have the same layer value, they will
render in the order that the method was invoked.

Example below:Render Method Invoked Order:

  1. Texture 1 (Layer -10)
  2. Texture 2 (Layer -20)
  3. Texture 3 (Layer 0)
  4. Texture 4 (Layer 0)
  5. Texture 5 (Layer 4)
  6. Texture 6 (Layer 3)Texture Render Order:
  • Texture 2
  • Texture 1
  • Texture 3
  • Texture 4
  • Texture 6
  • Texture 5