Autoflush renderer. Sprite.DrawAt convenience function.

This commit is contained in:
Bob
2010-09-24 16:04:22 +12:00
parent cdcfeb6276
commit 14e517cab5
29 changed files with 87 additions and 96 deletions

View File

@@ -12,7 +12,7 @@ using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
{
public class SpriteRenderer
public class SpriteRenderer : Renderer.IBatchRenderer
{
Renderer renderer;
IShader shader;
@@ -66,6 +66,8 @@ namespace OpenRA.Graphics
public void DrawSprite(Sprite s, float2 location, int paletteIndex, float2 size)
{
Renderer.CurrentBatchRenderer = this;
if (s.sheet != currentSheet)
Flush();