diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx index acdaf5302b..a7a6ce02e3 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx +++ b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx @@ -4661,7 +4661,7 @@ do_issue_material() { // Otherwise, the ambient color comes from the object color. if (_has_material_force_color) { cur_material.Ambient = *(D3DCOLORVALUE *)_material_force_color.get_data(); - _pD3DDevice->SetRenderState(D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_MATERIAL); + _pD3DDevice->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_MATERIAL); } else { _pD3DDevice->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_COLOR1); } @@ -4782,6 +4782,7 @@ enable_clip_plane(int plane_id, bool enable) { } else { _clip_plane_bits &= ~((DWORD)1 << plane_id); } + _pD3DDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, _clip_plane_bits); } //////////////////////////////////////////////////////////////////// @@ -4812,20 +4813,6 @@ bind_clip_plane(const NodePath &plane, int plane_id) { } } -//////////////////////////////////////////////////////////////////// -// Function: DXGraphicsStateGuardian8::end_bind_clip_planes -// Access: Protected, Virtual -// Description: Called after before bind_clip_plane() has been called one -// or more times (but before any geometry is issued or -// additional state is changed), this is intended to -// clean up any temporary changes to the state that may -// have been made by begin_bind_clip_planes(). -//////////////////////////////////////////////////////////////////// -void DXGraphicsStateGuardian8:: -end_bind_clip_planes() { - _pD3DDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, _clip_plane_bits); -} - void DXGraphicsStateGuardian8:: issue_color_write(const ColorWriteAttrib *attrib) { _color_write_mode = attrib->get_mode(); diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.h b/panda/src/dxgsg8/dxGraphicsStateGuardian8.h index 8079681c68..34d8a93912 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.h +++ b/panda/src/dxgsg8/dxGraphicsStateGuardian8.h @@ -177,7 +177,6 @@ protected: virtual bool slot_new_clip_plane(int plane_id); virtual void enable_clip_plane(int plane_id, bool enable); virtual void bind_clip_plane(const NodePath &plane, int plane_id); - virtual void end_bind_clip_planes(); virtual void set_blend_mode();