From 61d9c02595cd5aae8dba2170b216e88939026376 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 31 Jul 2001 03:12:52 +0000 Subject: [PATCH] fix for decals --- panda/src/dxgsg/dxGraphicsStateGuardian.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx index db05a7a673..2367aca6e5 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx @@ -5023,6 +5023,9 @@ begin_decal(GeomNode *base_geom, AllAttributesWrapper &attrib) { // First turn off writing the depth buffer to render the base geometry. _d3dDevice->GetRenderState(D3DRENDERSTATE_ZWRITEENABLE, (DWORD *)&_depth_write_enabled); //save cur val _d3dDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, FALSE); + DepthWriteAttribute *dwa = new DepthWriteAttribute; + dwa->set_off(); + attrib.set_attribute(DepthWriteTransition::get_class_type(), dwa); // Now render the base geometry. base_geom->draw(this);