Skip to main content

RendererService

Namespace: MonineEngine.Graphics

The service to manage rendering. Can be inherited for a custom renderer, although that is not recommended.

public class RendererService : MonineEngine.Core.IRendererService, MonineEngine.Core.IService, System.IDisposable

Inheritance ObjectRendererService
Implements IRendererService, IService, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Properties

CurrentSpriteBatch

The current used by the renderer.

public SpriteBatch CurrentSpriteBatch { get; }

Property Value

SpriteBatch

Constructors

RendererService(GraphicsDevice)

Constructs a new RendererService, with a to go along with it.

public RendererService(GraphicsDevice device)

Parameters

device GraphicsDevice
The currently used.

Methods

SetSpriteBatch(SpriteBatch)

public void SetSpriteBatch(SpriteBatch spriteBatch)

Parameters

spriteBatch SpriteBatch

Update(GameTime)

public void Update(GameTime gameTime)

Parameters

gameTime GameTime

GetSpriteBatch()

public SpriteBatch GetSpriteBatch()

Returns

SpriteBatch

Begin(SpriteSortMode, BlendState, SamplerState, DepthStencilState, RasterizerState, Effect, Nullable<Matrix>)

public void Begin(SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Nullable<Matrix> transformMatrix)

Parameters

sortMode SpriteSortMode

blendState BlendState

samplerState SamplerState

depthStencilState DepthStencilState

rasterizerState RasterizerState

effect Effect

transformMatrix Nullable<Matrix>

End()

public void End()

Draw(Texture2D, Vector2, Color)

public void Draw(Texture2D texture, Vector2 position, Color color)

Parameters

texture Texture2D

position Vector2

color Color

Draw(Texture2D, Vector2, Color, Single, Vector2, Single)

public void Draw(Texture2D texture, Vector2 position, Color color, float rotation, Vector2 scale, float layerDepth)

Parameters

texture Texture2D

position Vector2

color Color

rotation Single

scale Vector2

layerDepth Single

Draw(Texture2D, Vector2, Color, Single, Single, Single)

public void Draw(Texture2D texture, Vector2 position, Color color, float rotation, float scale, float layerDepth)

Parameters

texture Texture2D

position Vector2

color Color

rotation Single

scale Single

layerDepth Single

Draw(Texture2D, Vector2, Nullable<Rectangle>, Color, Single, Vector2, Single, SpriteEffects, Single)

public void Draw(Texture2D texture, Vector2 position, Nullable<Rectangle> sourceRectangle, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)

Parameters

texture Texture2D

position Vector2

sourceRectangle Nullable<Rectangle>

color Color

rotation Single

origin Vector2

scale Single

effects SpriteEffects

layerDepth Single

Draw(Texture2D, Vector2, Nullable<Rectangle>, Color, Single, Vector2, Vector2, SpriteEffects, Single)

public void Draw(Texture2D texture, Vector2 position, Nullable<Rectangle> sourceRectangle, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)

Parameters

texture Texture2D

position Vector2

sourceRectangle Nullable<Rectangle>

color Color

rotation Single

origin Vector2

scale Vector2

effects SpriteEffects

layerDepth Single

DrawString(SpriteFont, String, Vector2, Color)

public void DrawString(SpriteFont spriteFont, string text, Vector2 position, Color color)

Parameters

spriteFont SpriteFont

text String

position Vector2

color Color

DrawString(SpriteFont, String, Vector2, Color, Single, Vector2, Single)

public void DrawString(SpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 scale, float layerDepth)

Parameters

spriteFont SpriteFont

text String

position Vector2

color Color

rotation Single

scale Vector2

layerDepth Single

DrawString(SpriteFont, String, Vector2, Color, Single, Single, Single)

public void DrawString(SpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, float scale, float layerDepth)

Parameters

spriteFont SpriteFont

text String

position Vector2

color Color

rotation Single

scale Single

layerDepth Single

DrawString(SpriteFont, String, Vector2, Color, Single, Vector2, Single, SpriteEffects, Single, Boolean)

public void DrawString(SpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth, bool rtl)

Parameters

spriteFont SpriteFont

text String

position Vector2

color Color

rotation Single

origin Vector2

scale Single

effects SpriteEffects

layerDepth Single

rtl Boolean

DrawString(SpriteFont, String, Vector2, Color, Single, Vector2, Vector2, SpriteEffects, Single, Boolean)

public void DrawString(SpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth, bool rtl)

Parameters

spriteFont SpriteFont

text String

position Vector2

color Color

rotation Single

origin Vector2

scale Vector2

effects SpriteEffects

layerDepth Single

rtl Boolean

Dispose()

Disposes of the current .

public void Dispose()