using System.Drawing; using System.IO; using System.Windows.Forms; using OpenRA.FileFormats.Graphics; using OpenRA.Graphics; [assembly: Renderer(typeof(OpenRA.Renderer.Null.NullGraphicsDevice))] namespace OpenRA.Renderer.Null { public class NullGraphicsDevice : IGraphicsDevice { public Size WindowSize { get; internal set; } public NullGraphicsDevice(int width, int height, WindowMode window, bool vsync) { WindowSize = new Size(width, height); } public void EnableScissor(int left, int top, int width, int height) { } public void DisableScissor() { } public void Begin() { } public void End() { } public void Clear(Color c) { } public void Present() { Game.HasInputFocus = false; Game.HandleModifierKeys(Modifiers.None); } public void DrawIndexedPrimitives(PrimitiveType pt, Range vertices, Range indices) { } public void DrawIndexedPrimitives(PrimitiveType pt, int numVerts, int numPrimitives) { } public IVertexBuffer CreateVertexBuffer(int size) { return new NullVertexBuffer(); } public IIndexBuffer CreateIndexBuffer(int size) { return new NullIndexBuffer(); } public ITexture CreateTexture() { return new NullTexture(); } public ITexture CreateTexture(Bitmap bitmap) { return new NullTexture(); } public IShader CreateShader(Stream stream) { return new NullShader(); } } }