Fixed issue with incorrect delegate signature.
This commit is contained in:
@@ -1,13 +1,27 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using SlatedGameToolkit.Framework.Graphics.Textures;
|
||||
|
||||
namespace SlatedGameToolkit.Framework.Graphics.Render
|
||||
{
|
||||
public class Renderer
|
||||
public class Renderer : IDisposable
|
||||
{
|
||||
private Batch batch;
|
||||
private Texture currentTexture;
|
||||
|
||||
public Renderer(Batch batch) {
|
||||
this.batch = batch;
|
||||
}
|
||||
|
||||
public Renderer() {
|
||||
this.batch = new Batch();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
batch.Dispose();
|
||||
}
|
||||
|
||||
public void Queue(IRenderable renderable, Color color) {
|
||||
if (renderable.Texture != currentTexture) {
|
||||
if (batch.Batching) batch.End();
|
||||
@@ -15,7 +29,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Render
|
||||
currentTexture.Use();
|
||||
batch.Begin(currentTexture);
|
||||
}
|
||||
batch.Draw(renderable, color);
|
||||
batch.Add(renderable, color);
|
||||
}
|
||||
|
||||
public void Render() {
|
||||
|
||||
Reference in New Issue
Block a user