add backfacing-culling dbg toggle
This commit is contained in:
parent
c64d301f3c
commit
4bbf01b805
|
|
@ -55,12 +55,15 @@ bool dx_force_16bpp_screenbuffers = config_dxgsg.GetBool("dx-force-16bpp-screenb
|
|||
bool dx_show_fps_meter = config_dxgsg.GetBool("show-fps-meter", false);
|
||||
float dx_fps_meter_update_interval = max(0.5,config_dxgsg.GetFloat("fps-meter-update-interval", 1.7));
|
||||
|
||||
// debugging flag
|
||||
// values are same as D3DCULL enumtype, 0 - no force, 1 - force none, 2 - force CW, 3 - force CCW
|
||||
int dx_force_backface_culling = config_dxgsg.GetInt("dx-force-backface-culling", 0);
|
||||
|
||||
#ifdef _DEBUG
|
||||
bool dx_debug_view_mipmaps = config_dxgsg.GetBool("dx-debug-view-mipmaps", false);
|
||||
bool dx_force_16bpptextures = config_dxgsg.GetBool("dx-force-16bpptextures", false);
|
||||
bool dx_mipmap_everything = config_dxgsg.GetBool("dx-mipmap-everything", false);
|
||||
bool dx_force_anisotropic_filtering = config_dxgsg.GetBool("dx-force-anisotropic-filtering", false);
|
||||
|
||||
#endif
|
||||
|
||||
// note: offset currently disabled since it wasnt working properly
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ extern bool dx_no_vertex_fog;
|
|||
extern bool dx_full_screen_antialiasing;
|
||||
extern float dx_fps_meter_update_interval;
|
||||
|
||||
// this is really a debug flag, but I need at Opt4 for perf-measurement
|
||||
extern int dx_force_backface_culling;
|
||||
|
||||
#ifdef _DEBUG
|
||||
extern float dx_global_miplevel_bias;
|
||||
extern bool dx_debug_view_mipmaps;
|
||||
|
|
|
|||
|
|
@ -431,6 +431,10 @@ init_dx( LPDIRECTDRAW7 context,
|
|||
dxgsg_cat.debug() << "device doesnt support full-screen anti-aliasing\n";
|
||||
}
|
||||
}
|
||||
|
||||
if(dx_force_backface_culling!=0) {
|
||||
_d3dDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, dx_force_backface_culling);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -4519,6 +4523,9 @@ issue_stencil(const StencilAttribute *attrib) {
|
|||
void DXGraphicsStateGuardian::
|
||||
issue_cull_face(const CullFaceAttribute *attrib) {
|
||||
|
||||
if(dx_force_backface_culling!=0) {
|
||||
return; // leave as initially set
|
||||
}
|
||||
|
||||
CullFaceProperty::Mode mode = attrib->get_mode();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue