Expose FBOs to engine code.

This commit is contained in:
Paul Chote
2013-06-07 22:20:19 +12:00
parent 0e1c12131a
commit 4c8c010506
7 changed files with 145 additions and 2 deletions

View File

@@ -59,6 +59,7 @@ namespace OpenRA.Renderer.Null
public IVertexBuffer<Vertex> CreateVertexBuffer(int size) { return new NullVertexBuffer<Vertex>(); }
public ITexture CreateTexture() { return new NullTexture(); }
public ITexture CreateTexture(Bitmap bitmap) { return new NullTexture(); }
public IFrameBuffer CreateFrameBuffer(Size s) { return new NullFrameBuffer(); }
public IShader CreateShader(string name) { return new NullShader(); }
}
@@ -80,6 +81,13 @@ namespace OpenRA.Renderer.Null
public void SetData(byte[] colors, int width, int height) { }
}
public class NullFrameBuffer : IFrameBuffer
{
public void Bind() { }
public void Unbind() { }
public ITexture Texture { get { return new NullTexture(); } }
}
class NullVertexBuffer<T> : IVertexBuffer<T>
{
public void Bind() { }