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:
parent
8dabc51d34
commit
8a9415b88e
@ -17,7 +17,9 @@ namespace xna {
|
|||||||
D3D11_BLEND_DESC Description{};
|
D3D11_BLEND_DESC Description{};
|
||||||
float BlendFactor[4]{ 1.0F, 1.0F, 1.0F, 1.0F };
|
float BlendFactor[4]{ 1.0F, 1.0F, 1.0F, 1.0F };
|
||||||
UINT SampleMask{ 0xffffffff };
|
UINT SampleMask{ 0xffffffff };
|
||||||
comptr<ID3D11BlendState> BlendState;
|
comptr<ID3D11BlendState> BlendState;
|
||||||
|
|
||||||
|
static constexpr int MAX_RENDER_TARGETS = 8;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SpriteFont::PlatformImplementation {
|
struct SpriteFont::PlatformImplementation {
|
||||||
|
@ -169,8 +169,6 @@ namespace xna {
|
|||||||
//that is blending source and destination data using alpha while assuming the color data contains no alpha information.
|
//that is blending source and destination data using alpha while assuming the color data contains no alpha information.
|
||||||
static std::unique_ptr<BlendState> NonPremultiplied();
|
static std::unique_ptr<BlendState> NonPremultiplied();
|
||||||
};
|
};
|
||||||
|
|
||||||
using PBlendState = std::shared_ptr<BlendState>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -142,7 +142,7 @@ namespace xna {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BlendState::RenderTargets(BlendRenderTarget const* value, size_t size) {
|
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].BlendEnable = value[i].Enabled;
|
||||||
Implementation->Description.RenderTarget[i].SrcBlend = DxHelpers::BlendToDx(value[i].Source);
|
Implementation->Description.RenderTarget[i].SrcBlend = DxHelpers::BlendToDx(value[i].Source);
|
||||||
Implementation->Description.RenderTarget[i].DestBlend = DxHelpers::BlendToDx(value[i].Destination);
|
Implementation->Description.RenderTarget[i].DestBlend = DxHelpers::BlendToDx(value[i].Destination);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user