add dx-no-dithering config var

This commit is contained in:
cxgeorge 2002-01-02 03:51:46 +00:00
parent 25c01b62bb
commit c4c936152e
3 changed files with 4 additions and 2 deletions

View File

@ -75,6 +75,7 @@ bool dx_ignore_mipmaps = config_dxgsg.GetBool("dx-ignore-mipmaps", false);
// if this is set, more accurate but more expensive fog computations are performed // if this is set, more accurate but more expensive fog computations are performed
bool dx_use_rangebased_fog = config_dxgsg.GetBool("dx-use-rangebased-fog", false); bool dx_use_rangebased_fog = config_dxgsg.GetBool("dx-use-rangebased-fog", false);
bool dx_force_16bpptextures = config_dxgsg.GetBool("dx-force-16bpptextures", false); bool dx_force_16bpptextures = config_dxgsg.GetBool("dx-force-16bpptextures", false);
bool dx_no_dithering = config_dxgsg.GetBool("dx-no-dithering", false);
#ifdef _DEBUG #ifdef _DEBUG
float dx_global_miplevel_bias = config_dxgsg.GetFloat("dx-global-miplevel-bias", 0.0); float dx_global_miplevel_bias = config_dxgsg.GetFloat("dx-global-miplevel-bias", 0.0);

View File

@ -35,11 +35,12 @@ extern bool dx_auto_normalize_lighting;
extern bool dx_use_rangebased_fog; extern bool dx_use_rangebased_fog;
extern const bool link_tristrips; extern const bool link_tristrips;
// debug flags // debug flags we might want to use in full optimized build
extern bool dx_ignore_mipmaps; extern bool dx_ignore_mipmaps;
extern bool dx_mipmap_everything; extern bool dx_mipmap_everything;
extern bool dx_show_transforms; extern bool dx_show_transforms;
extern bool dx_force_16bpptextures; extern bool dx_force_16bpptextures;
extern bool dx_no_dithering;
#ifndef NDEBUG #ifndef NDEBUG
extern int dx_force_backface_culling; extern int dx_force_backface_culling;

View File

@ -702,7 +702,7 @@ dx_init( LPDIRECTDRAW7 context,
// turn on dithering if the rendertarget is < 8bits/color channel // turn on dithering if the rendertarget is < 8bits/color channel
DX_DECLARE_CLEAN(DDSURFACEDESC2, ddsd_back); DX_DECLARE_CLEAN(DDSURFACEDESC2, ddsd_back);
_back->GetSurfaceDesc(&ddsd_back); _back->GetSurfaceDesc(&ddsd_back);
_dither_enabled = ((ddsd_back.ddpfPixelFormat.dwRGBBitCount < 24) && _dither_enabled = (!dx_no_dithering) && ((ddsd_back.ddpfPixelFormat.dwRGBBitCount < 24) &&
(_D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_DITHER)); (_D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_DITHER));
_d3dDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, _dither_enabled); _d3dDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, _dither_enabled);