Fixed issue #472. The wrong default depth value was in DirectX10 depth buffer.
This commit is contained in:
parent
f7e625d111
commit
57314d888a
@ -176,6 +176,8 @@ namespace ANX.Framework.Windows.DX10
|
|||||||
this.depthStencilBuffer = new SharpDX.Direct3D10.Texture2D(device, depthStencilTextureDesc);
|
this.depthStencilBuffer = new SharpDX.Direct3D10.Texture2D(device, depthStencilTextureDesc);
|
||||||
|
|
||||||
this.depthStencilView = new DepthStencilView(device, this.depthStencilBuffer);
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,8 +119,8 @@ namespace VertexIndexBuffer
|
|||||||
|
|
||||||
protected override void Draw(GameTime gameTime)
|
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);
|
//GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer | ClearOptions.Stencil, Color.CornflowerBlue, 1.0f, 0);
|
||||||
|
|
||||||
miniTriEffect.CurrentTechnique.Passes[0].Apply();
|
miniTriEffect.CurrentTechnique.Passes[0].Apply();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user