mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix clip planes, color-scale-via-lighting
This commit is contained in:
parent
eb7fa39f2e
commit
b1ed45ecb3
@ -4661,7 +4661,7 @@ do_issue_material() {
|
|||||||
// Otherwise, the ambient color comes from the object color.
|
// Otherwise, the ambient color comes from the object color.
|
||||||
if (_has_material_force_color) {
|
if (_has_material_force_color) {
|
||||||
cur_material.Ambient = *(D3DCOLORVALUE *)_material_force_color.get_data();
|
cur_material.Ambient = *(D3DCOLORVALUE *)_material_force_color.get_data();
|
||||||
_pD3DDevice->SetRenderState(D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_MATERIAL);
|
_pD3DDevice->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_MATERIAL);
|
||||||
} else {
|
} else {
|
||||||
_pD3DDevice->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_COLOR1);
|
_pD3DDevice->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_COLOR1);
|
||||||
}
|
}
|
||||||
@ -4782,6 +4782,7 @@ enable_clip_plane(int plane_id, bool enable) {
|
|||||||
} else {
|
} else {
|
||||||
_clip_plane_bits &= ~((DWORD)1 << plane_id);
|
_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::
|
void DXGraphicsStateGuardian8::
|
||||||
issue_color_write(const ColorWriteAttrib *attrib) {
|
issue_color_write(const ColorWriteAttrib *attrib) {
|
||||||
_color_write_mode = attrib->get_mode();
|
_color_write_mode = attrib->get_mode();
|
||||||
|
@ -177,7 +177,6 @@ protected:
|
|||||||
virtual bool slot_new_clip_plane(int plane_id);
|
virtual bool slot_new_clip_plane(int plane_id);
|
||||||
virtual void enable_clip_plane(int plane_id, bool enable);
|
virtual void enable_clip_plane(int plane_id, bool enable);
|
||||||
virtual void bind_clip_plane(const NodePath &plane, int plane_id);
|
virtual void bind_clip_plane(const NodePath &plane, int plane_id);
|
||||||
virtual void end_bind_clip_planes();
|
|
||||||
|
|
||||||
virtual void set_blend_mode();
|
virtual void set_blend_mode();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user