1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00

Implementa DepthStencilState em SpriteBatch

This commit is contained in:
Danilo 2024-04-15 09:53:26 -03:00
parent b2c1da8eac
commit 3fe3cc7066
3 changed files with 5 additions and 4 deletions

View File

@ -14,7 +14,7 @@ namespace xna {
SpriteSortMode sortMode = SpriteSortMode::Deferred, SpriteSortMode sortMode = SpriteSortMode::Deferred,
BlendState* blendState = nullptr, BlendState* blendState = nullptr,
SamplerState* samplerState = nullptr, SamplerState* samplerState = nullptr,
//DepthStencilState DepthStencilState * depthStencil = nullptr,
RasterizerState* rasterizerState = nullptr, RasterizerState* rasterizerState = nullptr,
//Effect //Effect
Matrix const& transformMatrix = _identity Matrix const& transformMatrix = _identity

View File

@ -1,6 +1,7 @@
#include "blendstate-dx.hpp" #include "blendstate-dx.hpp"
#include "device-dx.hpp" #include "device-dx.hpp"
#include "rasterizerstate-dx.hpp" #include "rasterizerstate-dx.hpp"
#include "depthstencilstate-dx.hpp"
#include "samplerstate-dx.hpp" #include "samplerstate-dx.hpp"
#include "spritebatch-dx.hpp" #include "spritebatch-dx.hpp"
#include "texture-dx.hpp" #include "texture-dx.hpp"
@ -21,7 +22,7 @@ namespace xna {
Viewport(device.Viewport()); 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) if (!_dxspriteBatch)
return; return;
@ -41,7 +42,7 @@ namespace xna {
sort, sort,
blendState ? blendState->_blendState : nullptr, blendState ? blendState->_blendState : nullptr,
samplerState ? samplerState->_samplerState : nullptr, samplerState ? samplerState->_samplerState : nullptr,
nullptr, depthStencil ? depthStencil->_depthStencil : nullptr,
rasterizerState ? rasterizerState->_rasterizerState : nullptr, rasterizerState ? rasterizerState->_rasterizerState : nullptr,
nullptr, nullptr,
matrix matrix

View File

@ -20,7 +20,7 @@ namespace xna {
SpriteSortMode sortMode = SpriteSortMode::Deferred, SpriteSortMode sortMode = SpriteSortMode::Deferred,
BlendState* blendState = nullptr, BlendState* blendState = nullptr,
SamplerState* samplerState = nullptr, SamplerState* samplerState = nullptr,
//DepthStencilState DepthStencilState* depthStencil = nullptr,
RasterizerState* rasterizerState = nullptr, RasterizerState* rasterizerState = nullptr,
//Effect //Effect
Matrix const& transformMatrix = _identity Matrix const& transformMatrix = _identity