C# Class RTSEngine.Graphics.RTSRenderer

Inheritance: IDisposable
Mostra file Open project: RegrowthStudios/VoxelRTS Class Usage Examples

Public Methods

Method Description
CreateDynamicVertexBuffer ( VertexDeclaration vd, int s, BufferUsage usage = BufferUsage.WriteOnly ) : DynamicVertexBuffer
CreateEffect ( ) : BasicEffect
CreateIndexBuffer ( IndexElementSize id, int s, BufferUsage usage = BufferUsage.WriteOnly ) : IndexBuffer
CreateRenderTarget2D ( int w, int h, SurfaceFormat sf = SurfaceFormat.Color, DepthFormat df = DepthFormat.Depth24Stencil8, RenderTargetUsage usage = RenderTargetUsage.DiscardContents, int msc = 1, bool mipmap = false ) : RenderTarget2D
CreateTexture2D ( int w, int h, SurfaceFormat format = SurfaceFormat.Color, bool mipmap = false ) : Microsoft.Xna.Framework.Graphics.Texture2D
CreateVertexBuffer ( VertexDeclaration vd, int s, BufferUsage usage = BufferUsage.WriteOnly ) : VertexBuffer
CreateVoxGeos ( VoxAtlas atlas ) : void
Dispose ( ) : void
Draw ( GameState s, float dt ) : void
DrawHealth ( ) : void
DrawMap ( Matrix mV, Matrix mP ) : void
HookToGame ( GameState state, int ti, Camera camera ) : void
LoadEffect ( string file ) : Effect
LoadFont ( string file ) : SpriteFont
LoadTexture2D ( Stream s ) : Microsoft.Xna.Framework.Graphics.Texture2D
LoadTexture2D ( string file ) : Microsoft.Xna.Framework.Graphics.Texture2D
RTSRenderer ( GraphicsDeviceManager gdm, Microsoft.Xna.Framework.Content.ContentManager cm, RendererInitArgs ria, GameWindow w ) : System
Update ( GameState state ) : void
UpdateAnimations ( GameState s, float dt ) : void
UpdateSelections ( Microsoft.Xna.Framework.Graphics.VertexPositionColorTexture &verts, int &inds ) : void
UpdateVisible ( CollisionGrid cg ) : void

Private Methods

Method Description
DrawBuildings ( ) : void
DrawParticles ( float t ) : void
DrawSelectionBox ( ) : void
DrawSelectionCircles ( Vector3 c ) : void
DrawUnits ( ) : void
LoadTeamVisuals ( GameState state, int ti ) : void
OnFOWChange ( int x, int y, int p, FogOfWar f ) : void
OnMouseMove ( Vector2 p, Vector2 d ) : void
OnMousePress ( Vector2 p, MouseButton b ) : void
OnMouseRelease ( Vector2 p, MouseButton b ) : void

Method Details

CreateDynamicVertexBuffer() public method

public CreateDynamicVertexBuffer ( VertexDeclaration vd, int s, BufferUsage usage = BufferUsage.WriteOnly ) : DynamicVertexBuffer
vd Microsoft.Xna.Framework.Graphics.VertexDeclaration
s int
usage BufferUsage
return DynamicVertexBuffer

CreateEffect() public method

public CreateEffect ( ) : BasicEffect
return Microsoft.Xna.Framework.Graphics.BasicEffect

CreateIndexBuffer() public method

public CreateIndexBuffer ( IndexElementSize id, int s, BufferUsage usage = BufferUsage.WriteOnly ) : IndexBuffer
id IndexElementSize
s int
usage BufferUsage
return IndexBuffer

CreateRenderTarget2D() public method

public CreateRenderTarget2D ( int w, int h, SurfaceFormat sf = SurfaceFormat.Color, DepthFormat df = DepthFormat.Depth24Stencil8, RenderTargetUsage usage = RenderTargetUsage.DiscardContents, int msc = 1, bool mipmap = false ) : RenderTarget2D
w int
h int
sf SurfaceFormat
df DepthFormat
usage RenderTargetUsage
msc int
mipmap bool
return Microsoft.Xna.Framework.Graphics.RenderTarget2D

CreateTexture2D() public method

public CreateTexture2D ( int w, int h, SurfaceFormat format = SurfaceFormat.Color, bool mipmap = false ) : Microsoft.Xna.Framework.Graphics.Texture2D
w int
h int
format SurfaceFormat
mipmap bool
return Microsoft.Xna.Framework.Graphics.Texture2D

CreateVertexBuffer() public method

public CreateVertexBuffer ( VertexDeclaration vd, int s, BufferUsage usage = BufferUsage.WriteOnly ) : VertexBuffer
vd Microsoft.Xna.Framework.Graphics.VertexDeclaration
s int
usage BufferUsage
return VertexBuffer

CreateVoxGeos() public method

public CreateVoxGeos ( VoxAtlas atlas ) : void
atlas Grey.Vox.VoxAtlas
return void

Dispose() public method

public Dispose ( ) : void
return void

Draw() public method

public Draw ( GameState s, float dt ) : void
s RTSEngine.Data.GameState
dt float
return void

DrawHealth() public method

public DrawHealth ( ) : void
return void

DrawMap() public method

public DrawMap ( Matrix mV, Matrix mP ) : void
mV Matrix
mP Matrix
return void

HookToGame() public method

public HookToGame ( GameState state, int ti, Camera camera ) : void
state RTSEngine.Data.GameState
ti int
camera RTSEngine.Data.Camera
return void

LoadEffect() public method

public LoadEffect ( string file ) : Effect
file string
return Microsoft.Xna.Framework.Graphics.Effect

LoadFont() public method

public LoadFont ( string file ) : SpriteFont
file string
return Microsoft.Xna.Framework.Graphics.SpriteFont

LoadTexture2D() public method

public LoadTexture2D ( Stream s ) : Microsoft.Xna.Framework.Graphics.Texture2D
s Stream
return Microsoft.Xna.Framework.Graphics.Texture2D

LoadTexture2D() public method

public LoadTexture2D ( string file ) : Microsoft.Xna.Framework.Graphics.Texture2D
file string
return Microsoft.Xna.Framework.Graphics.Texture2D

RTSRenderer() public method

public RTSRenderer ( GraphicsDeviceManager gdm, Microsoft.Xna.Framework.Content.ContentManager cm, RendererInitArgs ria, GameWindow w ) : System
gdm GraphicsDeviceManager
cm Microsoft.Xna.Framework.Content.ContentManager
ria RendererInitArgs
w Microsoft.Xna.Framework.GameWindow
return System

Update() public method

public Update ( GameState state ) : void
state RTSEngine.Data.GameState
return void

UpdateAnimations() public method

public UpdateAnimations ( GameState s, float dt ) : void
s RTSEngine.Data.GameState
dt float
return void

UpdateSelections() public method

public UpdateSelections ( Microsoft.Xna.Framework.Graphics.VertexPositionColorTexture &verts, int &inds ) : void
verts Microsoft.Xna.Framework.Graphics.VertexPositionColorTexture
inds int
return void

UpdateVisible() public method

public UpdateVisible ( CollisionGrid cg ) : void
cg CollisionGrid
return void