fixed issue #467 (DepthStencilState not settable)
This commit is contained in:
parent
a2baf45eff
commit
d4d48ee21b
@ -85,19 +85,24 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
nativeDepthStencilState = AddInSystemFactory.Instance.GetDefaultCreator<IRenderSystemCreator>().CreateDepthStencilState();
|
nativeDepthStencilState = AddInSystemFactory.Instance.GetDefaultCreator<IRenderSystemCreator>().CreateDepthStencilState();
|
||||||
|
|
||||||
|
// BackFace
|
||||||
CounterClockwiseStencilDepthBufferFail = StencilOperation.Keep;
|
CounterClockwiseStencilDepthBufferFail = StencilOperation.Keep;
|
||||||
CounterClockwiseStencilFail = StencilOperation.Keep;
|
CounterClockwiseStencilFail = StencilOperation.Keep;
|
||||||
CounterClockwiseStencilFunction = CompareFunction.Always;
|
CounterClockwiseStencilFunction = CompareFunction.Always;
|
||||||
CounterClockwiseStencilPass = StencilOperation.Keep;
|
CounterClockwiseStencilPass = StencilOperation.Keep;
|
||||||
|
|
||||||
|
// FrontFace
|
||||||
|
StencilDepthBufferFail = StencilOperation.Keep;
|
||||||
|
StencilFail = StencilOperation.Keep;
|
||||||
|
StencilFunction = CompareFunction.Always;
|
||||||
|
StencilPass = StencilOperation.Keep;
|
||||||
|
|
||||||
DepthBufferEnable = true;
|
DepthBufferEnable = true;
|
||||||
DepthBufferFunction = CompareFunction.LessEqual;
|
DepthBufferFunction = CompareFunction.LessEqual;
|
||||||
DepthBufferWriteEnable = true;
|
DepthBufferWriteEnable = true;
|
||||||
ReferenceStencil = 0;
|
ReferenceStencil = 0;
|
||||||
StencilDepthBufferFail = StencilOperation.Keep;
|
|
||||||
StencilEnable = false;
|
StencilEnable = false;
|
||||||
StencilFunction = CompareFunction.Always;
|
|
||||||
StencilMask = int.MaxValue;
|
StencilMask = int.MaxValue;
|
||||||
StencilPass = StencilOperation.Keep;
|
|
||||||
StencilWriteMask = int.MaxValue;
|
StencilWriteMask = int.MaxValue;
|
||||||
TwoSidedStencilMode = false;
|
TwoSidedStencilMode = false;
|
||||||
}
|
}
|
||||||
@ -106,19 +111,24 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
nativeDepthStencilState = AddInSystemFactory.Instance.GetDefaultCreator<IRenderSystemCreator>().CreateDepthStencilState();
|
nativeDepthStencilState = AddInSystemFactory.Instance.GetDefaultCreator<IRenderSystemCreator>().CreateDepthStencilState();
|
||||||
|
|
||||||
|
// BackFace
|
||||||
CounterClockwiseStencilDepthBufferFail = StencilOperation.Keep;
|
CounterClockwiseStencilDepthBufferFail = StencilOperation.Keep;
|
||||||
CounterClockwiseStencilFail = StencilOperation.Keep;
|
CounterClockwiseStencilFail = StencilOperation.Keep;
|
||||||
CounterClockwiseStencilFunction = CompareFunction.Always;
|
CounterClockwiseStencilFunction = CompareFunction.Always;
|
||||||
CounterClockwiseStencilPass = StencilOperation.Keep;
|
CounterClockwiseStencilPass = StencilOperation.Keep;
|
||||||
|
|
||||||
|
// FrontFace
|
||||||
|
StencilDepthBufferFail = StencilOperation.Keep;
|
||||||
|
StencilFail = StencilOperation.Keep;
|
||||||
|
StencilFunction = CompareFunction.Always;
|
||||||
|
StencilPass = StencilOperation.Keep;
|
||||||
|
|
||||||
DepthBufferEnable = depthBufferEnabled;
|
DepthBufferEnable = depthBufferEnabled;
|
||||||
DepthBufferFunction = CompareFunction.LessEqual;
|
DepthBufferFunction = CompareFunction.LessEqual;
|
||||||
DepthBufferWriteEnable = depthBufferWriteEnabled;
|
DepthBufferWriteEnable = depthBufferWriteEnabled;
|
||||||
ReferenceStencil = 0;
|
ReferenceStencil = 0;
|
||||||
StencilDepthBufferFail = StencilOperation.Keep;
|
|
||||||
StencilEnable = false;
|
StencilEnable = false;
|
||||||
StencilFunction = CompareFunction.Always;
|
|
||||||
StencilMask = int.MaxValue;
|
StencilMask = int.MaxValue;
|
||||||
StencilPass = StencilOperation.Keep;
|
|
||||||
StencilWriteMask = int.MaxValue;
|
StencilWriteMask = int.MaxValue;
|
||||||
TwoSidedStencilMode = false;
|
TwoSidedStencilMode = false;
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ namespace ANX.Framework.Windows.DX10
|
|||||||
device.InputAssembler.PrimitiveTopology = FormatConverter.Translate(primitiveType);
|
device.InputAssembler.PrimitiveTopology = FormatConverter.Translate(primitiveType);
|
||||||
device.Rasterizer.SetViewports(currentViewport);
|
device.Rasterizer.SetViewports(currentViewport);
|
||||||
|
|
||||||
device.OutputMerger.SetTargets(this.renderView);
|
device.OutputMerger.SetTargets(this.depthStencilView, this.renderView);
|
||||||
|
|
||||||
for (int i = 0; i < technique.Description.PassCount; ++i)
|
for (int i = 0; i < technique.Description.PassCount; ++i)
|
||||||
{
|
{
|
||||||
@ -318,7 +318,7 @@ namespace ANX.Framework.Windows.DX10
|
|||||||
// Prepare All the stages
|
// Prepare All the stages
|
||||||
device.InputAssembler.PrimitiveTopology = FormatConverter.Translate(primitiveType);
|
device.InputAssembler.PrimitiveTopology = FormatConverter.Translate(primitiveType);
|
||||||
device.Rasterizer.SetViewports(currentViewport);
|
device.Rasterizer.SetViewports(currentViewport);
|
||||||
device.OutputMerger.SetTargets(this.renderView);
|
device.OutputMerger.SetTargets(this.depthStencilView, this.renderView);
|
||||||
|
|
||||||
for (int i = 0; i < technique.Description.PassCount; ++i)
|
for (int i = 0; i < technique.Description.PassCount; ++i)
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ using System.Runtime.InteropServices;
|
|||||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||||
// übernehmen, indem Sie "*" eingeben:
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("0.7.8.0")]
|
[assembly: AssemblyVersion("0.7.9.0")]
|
||||||
[assembly: AssemblyFileVersion("0.7.8.0")]
|
[assembly: AssemblyFileVersion("0.7.9.0")]
|
||||||
|
|
||||||
[assembly: InternalsVisibleTo("ANX.Framework.ContentPipeline")]
|
[assembly: InternalsVisibleTo("ANX.Framework.ContentPipeline")]
|
||||||
|
@ -81,7 +81,7 @@ namespace StencilBuffer
|
|||||||
DepthBufferWriteEnable = true,
|
DepthBufferWriteEnable = true,
|
||||||
DepthBufferFunction = CompareFunction.Always,
|
DepthBufferFunction = CompareFunction.Always,
|
||||||
ReferenceStencil = 2,
|
ReferenceStencil = 2,
|
||||||
StencilEnable = false,
|
StencilEnable = true,
|
||||||
StencilPass = StencilOperation.Increment,
|
StencilPass = StencilOperation.Increment,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ namespace StencilBuffer
|
|||||||
DepthBufferWriteEnable = true,
|
DepthBufferWriteEnable = true,
|
||||||
DepthBufferFunction = CompareFunction.LessEqual,
|
DepthBufferFunction = CompareFunction.LessEqual,
|
||||||
ReferenceStencil = 1,
|
ReferenceStencil = 1,
|
||||||
StencilEnable = false,
|
StencilEnable = true,
|
||||||
StencilPass = StencilOperation.Keep,
|
StencilPass = StencilOperation.Keep,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user