diff --git a/ANX.Framework.Windows.DX10/GraphicsDeviceWindowsDX10.cs b/ANX.Framework.Windows.DX10/GraphicsDeviceWindowsDX10.cs index 26f155bc..2578c926 100644 --- a/ANX.Framework.Windows.DX10/GraphicsDeviceWindowsDX10.cs +++ b/ANX.Framework.Windows.DX10/GraphicsDeviceWindowsDX10.cs @@ -333,5 +333,21 @@ namespace ANX.Framework.Windows.DX10 { throw new NotImplementedException(); } - } + + + public void GetBackBufferData(Rectangle? rect, T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + } } diff --git a/ANX.Framework.Windows.DX10/IndexBuffer_DX10.cs b/ANX.Framework.Windows.DX10/IndexBuffer_DX10.cs index 71657d3a..039bf766 100644 --- a/ANX.Framework.Windows.DX10/IndexBuffer_DX10.cs +++ b/ANX.Framework.Windows.DX10/IndexBuffer_DX10.cs @@ -139,5 +139,21 @@ namespace ANX.Framework.Windows.DX10 } } + + + public void GetBackBufferData(Rectangle? rect, T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } } } diff --git a/ANX.Framework.Windows.DX10/VertexBuffer_DX10.cs b/ANX.Framework.Windows.DX10/VertexBuffer_DX10.cs index 82e81683..49388888 100644 --- a/ANX.Framework.Windows.DX10/VertexBuffer_DX10.cs +++ b/ANX.Framework.Windows.DX10/VertexBuffer_DX10.cs @@ -143,5 +143,21 @@ namespace ANX.Framework.Windows.DX10 buffer = null; } } + + + public void GetBackBufferData(Rectangle? rect, T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } } } diff --git a/ANX.Framework.Windows.GL3/GraphicsDeviceWindowsGL3.cs b/ANX.Framework.Windows.GL3/GraphicsDeviceWindowsGL3.cs index 472caecb..b36f6337 100644 --- a/ANX.Framework.Windows.GL3/GraphicsDeviceWindowsGL3.cs +++ b/ANX.Framework.Windows.GL3/GraphicsDeviceWindowsGL3.cs @@ -223,5 +223,21 @@ namespace ANX.Framework.Windows.GL3 { throw new NotImplementedException(); } + + + public void GetBackBufferData(Rectangle? rect, T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } } } diff --git a/ANX.Framework.Windows.GL3/IndexBufferGL3.cs b/ANX.Framework.Windows.GL3/IndexBufferGL3.cs index 28502ee1..4048662f 100644 --- a/ANX.Framework.Windows.GL3/IndexBufferGL3.cs +++ b/ANX.Framework.Windows.GL3/IndexBufferGL3.cs @@ -166,5 +166,21 @@ namespace ANX.Framework.Windows.GL3 GL.DeleteBuffers(1, ref bufferHandle); } #endregion - } + + + public void GetBackBufferData(Rectangle? rect, T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + } } diff --git a/ANX.Framework.Windows.GL3/VertexBufferGL3.cs b/ANX.Framework.Windows.GL3/VertexBufferGL3.cs index a77f0768..4859010b 100644 --- a/ANX.Framework.Windows.GL3/VertexBufferGL3.cs +++ b/ANX.Framework.Windows.GL3/VertexBufferGL3.cs @@ -162,5 +162,21 @@ namespace ANX.Framework.Windows.GL3 GL.DeleteBuffers(1, ref bufferHandle); } #endregion - } + + + public void GetBackBufferData(Rectangle? rect, T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + } } diff --git a/ANX.Framework/Graphics/GraphicsDevice.cs b/ANX.Framework/Graphics/GraphicsDevice.cs index 4980ba0f..41edcdae 100644 --- a/ANX.Framework/Graphics/GraphicsDevice.cs +++ b/ANX.Framework/Graphics/GraphicsDevice.cs @@ -73,6 +73,8 @@ namespace ANX.Framework.Graphics private GraphicsProfile graphicsProfile; private VertexBufferBinding[] currentVertexBufferBindings; private RenderTargetBinding[] currentRenderTargetBindings; + private TextureCollection vertexTextureCollection; + private TextureCollection textureCollection; #endregion // Private Members @@ -97,6 +99,8 @@ namespace ANX.Framework.Graphics nativeDevice = AddInSystemFactory.Instance.GetCurrentCreator().CreateGraphicsDevice(presentationParameters); this.samplerStateCollection = new SamplerStateCollection(this, 8); //TODO: get maximum number of sampler states from capabilities + this.textureCollection = new TextureCollection(); + this.vertexTextureCollection = new TextureCollection(); } ~GraphicsDevice() @@ -216,17 +220,17 @@ namespace ANX.Framework.Graphics public void GetBackBufferData(Nullable rect, T[] data, int startIndex, int elementCount) where T : struct { - throw new NotImplementedException(); + nativeDevice.GetBackBufferData(rect, data, startIndex, elementCount); } public void GetBackBufferData(T[] data) where T : struct { - throw new NotImplementedException(); + nativeDevice.GetBackBufferData(data); } public void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct { - throw new NotImplementedException(); + nativeDevice.GetBackBufferData(data, startIndex, elementCount); } public VertexBufferBinding[] GetVertexBuffers() @@ -483,7 +487,7 @@ namespace ANX.Framework.Graphics { get { - throw new NotImplementedException(); + return this.vertexTextureCollection; } } @@ -491,7 +495,7 @@ namespace ANX.Framework.Graphics { get { - throw new NotImplementedException(); + return this.textureCollection; } } diff --git a/ANX.Framework/NonXNA/RenderSystem/INativeBuffer.cs b/ANX.Framework/NonXNA/RenderSystem/INativeBuffer.cs index d2136344..5a157693 100644 --- a/ANX.Framework/NonXNA/RenderSystem/INativeBuffer.cs +++ b/ANX.Framework/NonXNA/RenderSystem/INativeBuffer.cs @@ -56,9 +56,11 @@ namespace ANX.Framework.NonXNA public interface INativeBuffer : IDisposable { void SetData(GraphicsDevice graphicsDevice, T[] data) where T : struct; - void SetData(GraphicsDevice graphicsDevice, T[] data, int startIndex, int elementCount) where T : struct; - void SetData(GraphicsDevice graphicsDevice, int offsetInBytes, T[] data, int startIndex, int elementCount) where T : struct; + + void GetBackBufferData(Nullable rect, T[] data, int startIndex, int elementCount) where T : struct; + void GetBackBufferData(T[] data) where T : struct; + void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct; } } diff --git a/ANX.Framework/NonXNA/RenderSystem/INativeGraphicsDevice.cs b/ANX.Framework/NonXNA/RenderSystem/INativeGraphicsDevice.cs index 0a908245..ba323fe2 100644 --- a/ANX.Framework/NonXNA/RenderSystem/INativeGraphicsDevice.cs +++ b/ANX.Framework/NonXNA/RenderSystem/INativeGraphicsDevice.cs @@ -70,5 +70,9 @@ namespace ANX.Framework.NonXNA void SetViewport(Viewport viewport); void SetRenderTargets(params RenderTargetBinding[] renderTargets); + + void GetBackBufferData(Nullable rect, T[] data, int startIndex, int elementCount) where T : struct; + void GetBackBufferData(T[] data) where T : struct; + void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct; } } diff --git a/ANX.RenderSystem.Windows.DX11.1/GraphicsDeviceWindowsDX11_1.cs b/ANX.RenderSystem.Windows.DX11.1/GraphicsDeviceWindowsDX11_1.cs index 682ba9f2..34ab7398 100644 --- a/ANX.RenderSystem.Windows.DX11.1/GraphicsDeviceWindowsDX11_1.cs +++ b/ANX.RenderSystem.Windows.DX11.1/GraphicsDeviceWindowsDX11_1.cs @@ -593,5 +593,21 @@ namespace ANX.RenderSystem.Windows.DX11_1 { throw new NotImplementedException(); } - } + + + public void GetBackBufferData(Framework.Rectangle? rect, T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + } } diff --git a/ANX.RenderSystem.Windows.DX11.1/VertexBuffer_DX11_1.cs b/ANX.RenderSystem.Windows.DX11.1/VertexBuffer_DX11_1.cs index 4de4a7bc..5f99562b 100644 --- a/ANX.RenderSystem.Windows.DX11.1/VertexBuffer_DX11_1.cs +++ b/ANX.RenderSystem.Windows.DX11.1/VertexBuffer_DX11_1.cs @@ -142,5 +142,21 @@ namespace ANX.RenderSystem.Windows.DX11_1 buffer = null; } } + + + public void GetBackBufferData(Framework.Rectangle? rect, T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data) where T : struct + { + throw new NotImplementedException(); + } + + public void GetBackBufferData(T[] data, int startIndex, int elementCount) where T : struct + { + throw new NotImplementedException(); + } } }