C# Class Sharpex2D.Rendering.OpenGL.OpenGLRenderer

Inheritance: IRenderer, IDisposable
Mostra file Open project: ThuCommix/Sharpex2D

Public Methods

Method Description
Begin ( ) : void

Begins the draw operation.

CreateResource ( string fontFamily, float size, TextAccessoire accessoire ) : IFont

Creates a new Resource.

CreateResource ( int width, int height ) : ITexture

Creates a new Resource.

CreateResource ( string path ) : ITexture

Creates a new Resource.

Dispose ( ) : void

Disposes the object.

DrawString ( string text, IFont font, Rectangle rectangle, Color color ) : void

Draws a string.

DrawString ( string text, IFont font, Vector2 position, Color color ) : void

Draws a string.

DrawTexture ( ITexture texture, Rectangle rectangle, Color color, float opacity = 1 ) : void

Draws a Texture.

DrawTexture ( ITexture texture, Rectangle source, Rectangle destination, Color color, float opacity = 1 ) : void

Draws a Texture.

DrawTexture ( ITexture texture, SpriteSheet spriteSheet, Rectangle rectangle, Color color, float opacity = 1 ) : void

Draws a Texture.

DrawTexture ( ITexture texture, SpriteSheet spriteSheet, Vector2 position, Color color, float opacity = 1 ) : void

Draws a Texture.

DrawTexture ( ITexture texture, Vector2 position, Color color, float opacity = 1 ) : void

Draws a Texture.

End ( ) : void

Ends the draw operation.

Initialize ( ) : void

Initializes the renderer.

MeasureString ( string text, IFont font ) : Vector2

Measures the string.

OpenGLRenderer ( ) : System

Initializes a new OpenGLRenderer class.

ResetTransform ( ) : void

Resets the Transform.

SetTransform ( Matrix2x3 matrix ) : void

Sets the Transform.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes the object.

Private Methods

Method Description
GraphicsDeviceClearColorChanged ( object sender, EventArgs e ) : void

Triggered if the clear color changed.

WindowScreenSizeChanged ( object sender, EventArgs e ) : void

Triggered if the screen size changed.

Method Details

Begin() public method

Begins the draw operation.
public Begin ( ) : void
return void

CreateResource() public method

Creates a new Resource.
public CreateResource ( string fontFamily, float size, TextAccessoire accessoire ) : IFont
fontFamily string The FontFamily.
size float The Size.
accessoire TextAccessoire The TextAccessoire.
return IFont

CreateResource() public method

Creates a new Resource.
public CreateResource ( int width, int height ) : ITexture
width int The Width.
height int The Height.
return ITexture

CreateResource() public method

Creates a new Resource.
public CreateResource ( string path ) : ITexture
path string The Path.
return ITexture

Dispose() public method

Disposes the object.
public Dispose ( ) : void
return void

Dispose() protected method

Disposes the object.
protected Dispose ( bool disposing ) : void
disposing bool The disposing state.
return void

DrawString() public method

Draws a string.
public DrawString ( string text, IFont font, Rectangle rectangle, Color color ) : void
text string The Text.
font IFont The Font.
rectangle Sharpex2D.Math.Rectangle The Rectangle.
color Color The Color.
return void

DrawString() public method

Draws a string.
public DrawString ( string text, IFont font, Vector2 position, Color color ) : void
text string The Text.
font IFont The Font.
position Vector2 The Position.
color Color The Color.
return void

DrawTexture() public method

Draws a Texture.
public DrawTexture ( ITexture texture, Rectangle rectangle, Color color, float opacity = 1 ) : void
texture ITexture The Texture.
rectangle Sharpex2D.Math.Rectangle The Rectangle.
color Color The Color.
opacity float The Opacity.
return void

DrawTexture() public method

Draws a Texture.
public DrawTexture ( ITexture texture, Rectangle source, Rectangle destination, Color color, float opacity = 1 ) : void
texture ITexture The Texture.
source Sharpex2D.Math.Rectangle The SourceRectangle.
destination Sharpex2D.Math.Rectangle The DestinationRectangle.
color Color The Color.
opacity float The Opacity.
return void

DrawTexture() public method

Draws a Texture.
public DrawTexture ( ITexture texture, SpriteSheet spriteSheet, Rectangle rectangle, Color color, float opacity = 1 ) : void
texture ITexture The Texture.
spriteSheet SpriteSheet The SpriteSheet.
rectangle Sharpex2D.Math.Rectangle The Rectangle.
color Color The Color.
opacity float The Opacity.
return void

DrawTexture() public method

Draws a Texture.
public DrawTexture ( ITexture texture, SpriteSheet spriteSheet, Vector2 position, Color color, float opacity = 1 ) : void
texture ITexture The Texture.
spriteSheet SpriteSheet The SpriteSheet.
position Vector2 The Position.
color Color The Color.
opacity float The Opacity.
return void

DrawTexture() public method

Draws a Texture.
public DrawTexture ( ITexture texture, Vector2 position, Color color, float opacity = 1 ) : void
texture ITexture The Texture.
position Vector2 The Position.
color Color The Color.
opacity float The Opacity.
return void

End() public method

Ends the draw operation.
public End ( ) : void
return void

Initialize() public method

Initializes the renderer.
public Initialize ( ) : void
return void

MeasureString() public method

Measures the string.
public MeasureString ( string text, IFont font ) : Vector2
text string The String.
font IFont The Font.
return Vector2

OpenGLRenderer() public method

Initializes a new OpenGLRenderer class.
public OpenGLRenderer ( ) : System
return System

ResetTransform() public method

Resets the Transform.
public ResetTransform ( ) : void
return void

SetTransform() public method

Sets the Transform.
public SetTransform ( Matrix2x3 matrix ) : void
matrix Sharpex2D.Math.Matrix2x3 The Matrix.
return void