diff --git a/RenderSystems/ANX.Framework.Windows.DX10/GraphicsDeviceWindowsDX10.cs b/RenderSystems/ANX.Framework.Windows.DX10/GraphicsDeviceWindowsDX10.cs index 613f72cb..7fb26f0c 100644 --- a/RenderSystems/ANX.Framework.Windows.DX10/GraphicsDeviceWindowsDX10.cs +++ b/RenderSystems/ANX.Framework.Windows.DX10/GraphicsDeviceWindowsDX10.cs @@ -269,6 +269,7 @@ namespace ANX.Framework.Windows.DX10 // Prepare All the stages device.InputAssembler.PrimitiveTopology = FormatConverter.Translate(primitiveType); device.Rasterizer.SetViewports(currentViewport); + device.OutputMerger.SetTargets(this.depthStencilView, this.renderView); for (int i = 0; i < technique.Description.PassCount; ++i) @@ -468,8 +469,9 @@ namespace ANX.Framework.Windows.DX10 renderTargetView.Dispose(); renderTargetView = null; } - + device.OutputMerger.SetRenderTargets(1, new RenderTargetView[] { this.renderView }, this.depthStencilView); + device.OutputMerger.SetTargets(this.depthStencilView, this.renderView); } else { diff --git a/Samples/SimpleSprite/Game1.cs b/Samples/SimpleSprite/Game1.cs index 86345d5e..6a1e24b4 100644 --- a/Samples/SimpleSprite/Game1.cs +++ b/Samples/SimpleSprite/Game1.cs @@ -81,14 +81,6 @@ namespace WindowsGame1 { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "SampleContent"; - - graphics.PreparingDeviceSettings += new EventHandler(graphics_PreparingDeviceSettings); - } - - void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e) - { - e.GraphicsDeviceInformation.PresentationParameters.DepthStencilFormat = DepthFormat.None; - e.GraphicsDeviceInformation.PresentationParameters.BackBufferFormat = SurfaceFormat.Bgr565; } /// diff --git a/Samples/VertexIndexBuffer/Game1.cs b/Samples/VertexIndexBuffer/Game1.cs index ef667e8d..6cf0a635 100644 --- a/Samples/VertexIndexBuffer/Game1.cs +++ b/Samples/VertexIndexBuffer/Game1.cs @@ -119,7 +119,8 @@ namespace VertexIndexBuffer protected override void Draw(GameTime gameTime) { - GraphicsDevice.Clear(Color.CornflowerBlue); + //GraphicsDevice.Clear(Color.CornflowerBlue); + GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer | ClearOptions.Stencil, Color.CornflowerBlue, 1.0f, 0); miniTriEffect.CurrentTechnique.Passes[0].Apply();