mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Cleanup.
This commit is contained in:
parent
8109de5461
commit
5e0948c7a8
1 changed files with 22 additions and 14 deletions
|
@ -1999,8 +1999,16 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||
drt->DestBlendAlpha = s_blendFactor[dstA][1];
|
||||
drt->BlendOpAlpha = s_blendEquation[equA];
|
||||
|
||||
uint8_t writeMask = (_state&BGFX_STATE_ALPHA_WRITE) ? D3D11_COLOR_WRITE_ENABLE_ALPHA : 0;
|
||||
writeMask |= (_state&BGFX_STATE_RGB_WRITE) ? D3D11_COLOR_WRITE_ENABLE_RED|D3D11_COLOR_WRITE_ENABLE_GREEN|D3D11_COLOR_WRITE_ENABLE_BLUE : 0;
|
||||
uint8_t writeMask = (_state&BGFX_STATE_ALPHA_WRITE)
|
||||
? D3D11_COLOR_WRITE_ENABLE_ALPHA
|
||||
: 0
|
||||
;
|
||||
writeMask |= (_state&BGFX_STATE_RGB_WRITE)
|
||||
? D3D11_COLOR_WRITE_ENABLE_RED
|
||||
| D3D11_COLOR_WRITE_ENABLE_GREEN
|
||||
| D3D11_COLOR_WRITE_ENABLE_BLUE
|
||||
: 0
|
||||
;
|
||||
|
||||
drt->RenderTargetWriteMask = writeMask;
|
||||
|
||||
|
@ -2013,15 +2021,15 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||
|
||||
const uint32_t src = (rgba ) & 0xf;
|
||||
const uint32_t dst = (rgba >> 4) & 0xf;
|
||||
const uint32_t equationIndex = (rgba>>8)&0x7;
|
||||
const uint32_t equation = (rgba >> 8) & 0x7;
|
||||
|
||||
drt->SrcBlend = s_blendFactor[src][0];
|
||||
drt->DestBlend = s_blendFactor[dst][0];
|
||||
drt->BlendOp = s_blendEquation[equationIndex];
|
||||
drt->BlendOp = s_blendEquation[equation];
|
||||
|
||||
drt->SrcBlendAlpha = s_blendFactor[src][1];
|
||||
drt->DestBlendAlpha = s_blendFactor[dst][1];
|
||||
drt->BlendOpAlpha = s_blendEquation[equationIndex];
|
||||
drt->BlendOpAlpha = s_blendEquation[equation];
|
||||
|
||||
drt->RenderTargetWriteMask = writeMask;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue