mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
turn off broken lighting
This commit is contained in:
parent
e25f7fac4e
commit
2df01768f0
@ -4264,6 +4264,7 @@ apply_fog(Fog *fog) {
|
|||||||
// Description:
|
// Description:
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void DXGraphicsStateGuardian::apply_light( PointLight* light ) {
|
void DXGraphicsStateGuardian::apply_light( PointLight* light ) {
|
||||||
|
#if 0
|
||||||
// The light position will be relative to the current matrix, so
|
// The light position will be relative to the current matrix, so
|
||||||
// we have to know what the current matrix is. Find a better
|
// we have to know what the current matrix is. Find a better
|
||||||
// solution later.
|
// solution later.
|
||||||
@ -4289,6 +4290,7 @@ void DXGraphicsStateGuardian::apply_light( PointLight* light ) {
|
|||||||
alight.Attenuation2 = light->get_quadratic_attenuation();
|
alight.Attenuation2 = light->get_quadratic_attenuation();
|
||||||
|
|
||||||
HRESULT res = scrn.pD3DDevice->SetLight(_cur_light_id, &alight);
|
HRESULT res = scrn.pD3DDevice->SetLight(_cur_light_id, &alight);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -4297,6 +4299,7 @@ void DXGraphicsStateGuardian::apply_light( PointLight* light ) {
|
|||||||
// Description:
|
// Description:
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void DXGraphicsStateGuardian::apply_light( DirectionalLight* light ) {
|
void DXGraphicsStateGuardian::apply_light( DirectionalLight* light ) {
|
||||||
|
#if 0
|
||||||
// The light position will be relative to the current matrix, so
|
// The light position will be relative to the current matrix, so
|
||||||
// we have to know what the current matrix is. Find a better
|
// we have to know what the current matrix is. Find a better
|
||||||
// solution later.
|
// solution later.
|
||||||
@ -4323,6 +4326,7 @@ void DXGraphicsStateGuardian::apply_light( DirectionalLight* light ) {
|
|||||||
HRESULT res = scrn.pD3DDevice->SetLight(_cur_light_id, &alight);
|
HRESULT res = scrn.pD3DDevice->SetLight(_cur_light_id, &alight);
|
||||||
// scrn.pD3DDevice->LightEnable( _cur_light_id, TRUE );
|
// scrn.pD3DDevice->LightEnable( _cur_light_id, TRUE );
|
||||||
// scrn.pD3DDevice->SetRenderState( D3DRS_LIGHTING, TRUE );
|
// scrn.pD3DDevice->SetRenderState( D3DRS_LIGHTING, TRUE );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -4331,6 +4335,7 @@ void DXGraphicsStateGuardian::apply_light( DirectionalLight* light ) {
|
|||||||
// Description:
|
// Description:
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void DXGraphicsStateGuardian::apply_light( Spotlight *light ) {
|
void DXGraphicsStateGuardian::apply_light( Spotlight *light ) {
|
||||||
|
#if 0
|
||||||
// The light position will be relative to the current matrix, so
|
// The light position will be relative to the current matrix, so
|
||||||
// we have to know what the current matrix is. Find a better
|
// we have to know what the current matrix is. Find a better
|
||||||
// solution later.
|
// solution later.
|
||||||
@ -4361,6 +4366,7 @@ void DXGraphicsStateGuardian::apply_light( Spotlight *light ) {
|
|||||||
alight.Attenuation2 = (float)light->get_quadratic_attenuation();// quadratic
|
alight.Attenuation2 = (float)light->get_quadratic_attenuation();// quadratic
|
||||||
|
|
||||||
HRESULT res = scrn.pD3DDevice->SetLight(_cur_light_id, &alight);
|
HRESULT res = scrn.pD3DDevice->SetLight(_cur_light_id, &alight);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -4656,6 +4662,7 @@ issue_render_mode(const RenderModeTransition *attrib) {
|
|||||||
// Description:
|
// Description:
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void DXGraphicsStateGuardian::issue_light(const LightTransition *attrib ) {
|
void DXGraphicsStateGuardian::issue_light(const LightTransition *attrib ) {
|
||||||
|
#if 0
|
||||||
nassertv(attrib->get_default_dir() != TD_on);
|
nassertv(attrib->get_default_dir() != TD_on);
|
||||||
|
|
||||||
// Initialize the current ambient light total and currently enabled
|
// Initialize the current ambient light total and currently enabled
|
||||||
@ -4747,6 +4754,7 @@ void DXGraphicsStateGuardian::issue_light(const LightTransition *attrib ) {
|
|||||||
call_dxLightModelAmbient(_cur_ambient_light);
|
call_dxLightModelAmbient(_cur_ambient_light);
|
||||||
enable_color_material(true);
|
enable_color_material(true);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user