Fixed issue #472. The wrong default depth value was in DirectX10 depth buffer.

This commit is contained in:
Glatzemann 2011-12-04 08:10:48 +00:00
parent f7e625d111
commit 57314d888a
2 changed files with 4 additions and 2 deletions

View File

@ -176,6 +176,8 @@ namespace ANX.Framework.Windows.DX10
this.depthStencilBuffer = new SharpDX.Direct3D10.Texture2D(device, depthStencilTextureDesc);
this.depthStencilView = new DepthStencilView(device, this.depthStencilBuffer);
Clear(ClearOptions.DepthBuffer | ClearOptions.Stencil, Vector4.Zero, 1.0f, 0); //TODO: this workaround is working but maybe not the best solution to issue #472
}
}

View File

@ -119,8 +119,8 @@ namespace VertexIndexBuffer
protected override void Draw(GameTime gameTime)
{
//GraphicsDevice.Clear(Color.CornflowerBlue);
GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer | ClearOptions.Stencil, Color.CornflowerBlue, 1.0f, 0);
GraphicsDevice.Clear(Color.CornflowerBlue);
//GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer | ClearOptions.Stencil, Color.CornflowerBlue, 1.0f, 0);
miniTriEffect.CurrentTechnique.Passes[0].Apply();