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

Correções em BlendState

This commit is contained in:
Danilo 2024-11-13 14:23:27 -03:00
parent 8dabc51d34
commit 8a9415b88e
3 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,9 @@ namespace xna {
D3D11_BLEND_DESC Description{};
float BlendFactor[4]{ 1.0F, 1.0F, 1.0F, 1.0F };
UINT SampleMask{ 0xffffffff };
comptr<ID3D11BlendState> BlendState;
comptr<ID3D11BlendState> BlendState;
static constexpr int MAX_RENDER_TARGETS = 8;
};
struct SpriteFont::PlatformImplementation {

View File

@ -169,8 +169,6 @@ namespace xna {
//that is blending source and destination data using alpha while assuming the color data contains no alpha information.
static std::unique_ptr<BlendState> NonPremultiplied();
};
using PBlendState = std::shared_ptr<BlendState>;
}
#endif

View File

@ -142,7 +142,7 @@ namespace xna {
}
void BlendState::RenderTargets(BlendRenderTarget const* value, size_t size) {
for (size_t i = 0; i < size && i < 8; ++i) {
for (size_t i = 0; i < size && i < Implementation->MAX_RENDER_TARGETS; ++i) {
Implementation->Description.RenderTarget[i].BlendEnable = value[i].Enabled;
Implementation->Description.RenderTarget[i].SrcBlend = DxHelpers::BlendToDx(value[i].Source);
Implementation->Description.RenderTarget[i].DestBlend = DxHelpers::BlendToDx(value[i].Destination);