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,
BlendState* blendState = nullptr,
SamplerState* samplerState = nullptr,
//DepthStencilState
DepthStencilState * depthStencil = nullptr,
RasterizerState* rasterizerState = nullptr,
//Effect
Matrix const& transformMatrix = _identity

View File

@ -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

View File

@ -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