diff --git a/framework/graphics/spritebatch.hpp b/framework/graphics/spritebatch.hpp index e0b7be4..f47d4e3 100644 --- a/framework/graphics/spritebatch.hpp +++ b/framework/graphics/spritebatch.hpp @@ -14,7 +14,7 @@ namespace xna { SpriteSortMode sortMode = SpriteSortMode::Deferred, BlendState* blendState = nullptr, SamplerState* samplerState = nullptr, - //DepthStencilState + DepthStencilState * depthStencil = nullptr, RasterizerState* rasterizerState = nullptr, //Effect Matrix const& transformMatrix = _identity diff --git a/framework/platform/spritebatch-dx.cpp b/framework/platform/spritebatch-dx.cpp index c348c67..bdbea45 100644 --- a/framework/platform/spritebatch-dx.cpp +++ b/framework/platform/spritebatch-dx.cpp @@ -1,6 +1,7 @@ #include "blendstate-dx.hpp" #include "device-dx.hpp" #include "rasterizerstate-dx.hpp" +#include "depthstencilstate-dx.hpp" #include "samplerstate-dx.hpp" #include "spritebatch-dx.hpp" #include "texture-dx.hpp" @@ -21,7 +22,7 @@ namespace xna { Viewport(device.Viewport()); } - void SpriteBatch::Begin(SpriteSortMode sortMode, BlendState* blendState, SamplerState* samplerState, RasterizerState* rasterizerState, Matrix const& transformMatrix) { + void SpriteBatch::Begin(SpriteSortMode sortMode, BlendState* blendState, SamplerState* samplerState, DepthStencilState* depthStencil, RasterizerState* rasterizerState, Matrix const& transformMatrix) { if (!_dxspriteBatch) return; @@ -41,7 +42,7 @@ namespace xna { sort, blendState ? blendState->_blendState : nullptr, samplerState ? samplerState->_samplerState : nullptr, - nullptr, + depthStencil ? depthStencil->_depthStencil : nullptr, rasterizerState ? rasterizerState->_rasterizerState : nullptr, nullptr, matrix diff --git a/framework/platform/spritebatch-dx.hpp b/framework/platform/spritebatch-dx.hpp index 9f22dcd..9f80a57 100644 --- a/framework/platform/spritebatch-dx.hpp +++ b/framework/platform/spritebatch-dx.hpp @@ -20,7 +20,7 @@ namespace xna { SpriteSortMode sortMode = SpriteSortMode::Deferred, BlendState* blendState = nullptr, SamplerState* samplerState = nullptr, - //DepthStencilState + DepthStencilState* depthStencil = nullptr, RasterizerState* rasterizerState = nullptr, //Effect Matrix const& transformMatrix = _identity