mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-19 21:32:58 -04:00
support color_mask
This commit is contained in:
parent
0bf83f9a15
commit
20ff0b2604
@ -4206,12 +4206,24 @@ issue_texture_apply(const TextureApplyTransition *attrib) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void DXGraphicsStateGuardian::
|
void DXGraphicsStateGuardian::
|
||||||
issue_color_mask(const ColorMaskTransition *attrib) {
|
issue_color_mask(const ColorMaskTransition *attrib) {
|
||||||
dxgsg_cat.fatal() << "DXGSG issue_color_mask unimplemented (not implementable on DX7, need DX8)!!!";
|
if(dxgsg_cat.is_debug() && ((scrn.d3dcaps.PrimitiveMiscCaps & D3DPMISCCAPS_COLORWRITEENABLE)==0)) {
|
||||||
// because PLANEMASK renderstate has inconsistent to poor driver support on dx6 and before, and is
|
dxgsg_cat.debug() << "DXGSG issue_color_mask unsupported by device #" << scrn.CardIDNum << endl;
|
||||||
// explicitly disabled on dx7
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT maskVal=0x0;
|
||||||
|
if(attrib->is_write_r())
|
||||||
|
maskVal|=D3DCOLORWRITEENABLE_RED;
|
||||||
|
if(attrib->is_write_g())
|
||||||
|
maskVal|=D3DCOLORWRITEENABLE_GREEN;
|
||||||
|
if(attrib->is_write_b())
|
||||||
|
maskVal|=D3DCOLORWRITEENABLE_BLUE;
|
||||||
|
if(attrib->is_write_a())
|
||||||
|
maskVal|=D3DCOLORWRITEENABLE_ALPHA;
|
||||||
|
|
||||||
|
scrn.pD3DDevice->SetRenderState(D3DRS_COLORWRITEENABLE, maskVal);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: DXGraphicsStateGuardian::issue_depth_test
|
// Function: DXGraphicsStateGuardian::issue_depth_test
|
||||||
// Access: Public, Virtual
|
// Access: Public, Virtual
|
||||||
|
Loading…
x
Reference in New Issue
Block a user