diff --git a/panda/src/dxgsg7/dxGraphicsStateGuardian7.I b/panda/src/dxgsg7/dxGraphicsStateGuardian7.I index 8836a45ef3..121a90bb50 100644 --- a/panda/src/dxgsg7/dxGraphicsStateGuardian7.I +++ b/panda/src/dxgsg7/dxGraphicsStateGuardian7.I @@ -16,8 +16,6 @@ // //////////////////////////////////////////////////////////////////// -#include "config_dxgsg7.h" -#include //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian7::enable_line_smooth @@ -28,7 +26,7 @@ INLINE void DXGraphicsStateGuardian7:: enable_line_smooth(bool val) { if(_line_smooth_enabled != val) { _line_smooth_enabled = val; - #ifdef NDEBUG + #ifndef NDEBUG { if(val && (_pScrn->D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES)) dxgsg7_cat.error() << "no HW support for line smoothing!!\n"; @@ -47,16 +45,15 @@ enable_line_smooth(bool val) { INLINE void DXGraphicsStateGuardian7:: enable_dither(bool val) { if (_dither_enabled != val) { + _dither_enabled = val; - #ifdef _DEBUG + #ifndef NDEBUG { if(val && !(_pScrn->D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_DITHER)) dxgsg7_cat.error() << "no HW support for color dithering!!\n"; - return; } #endif - _dither_enabled = val; _pScrn->pD3DDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, (DWORD)val); } } diff --git a/panda/src/dxgsg7/dxGraphicsStateGuardian7.h b/panda/src/dxgsg7/dxGraphicsStateGuardian7.h index a029806a7e..b40ec9a338 100644 --- a/panda/src/dxgsg7/dxGraphicsStateGuardian7.h +++ b/panda/src/dxgsg7/dxGraphicsStateGuardian7.h @@ -24,6 +24,7 @@ #include "dxgsg7base.h" #include "dxGeomNodeContext7.h" #include "dxTextureContext7.h" +#include "config_dxgsg7.h" #include "graphicsStateGuardian.h" #include "geomprimitives.h" @@ -36,6 +37,7 @@ #include "textureApplyAttrib.h" #include "fog.h" #include "pointerToArray.h" +#include "graphicsWindow.h" class Light; diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.I b/panda/src/dxgsg8/dxGraphicsStateGuardian8.I index d27686fa6c..40d812836d 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.I +++ b/panda/src/dxgsg8/dxGraphicsStateGuardian8.I @@ -16,8 +16,6 @@ // //////////////////////////////////////////////////////////////////// -// for dxgsg8_cat stuff -#include "config_dxgsg8.h" //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian8::enable_line_smooth @@ -28,7 +26,7 @@ INLINE void DXGraphicsStateGuardian8:: enable_line_smooth(bool val) { if(_line_smooth_enabled != val) { _line_smooth_enabled = val; - #ifdef NDEBUG + #ifndef NDEBUG { if(val && (_pScrn->d3dcaps.RasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES)) dxgsg8_cat.error() << "no HW support for line smoothing!!\n"; @@ -47,16 +45,15 @@ enable_line_smooth(bool val) { INLINE void DXGraphicsStateGuardian8:: enable_dither(bool val) { if (_dither_enabled != val) { + _dither_enabled = val; - #ifdef _DEBUG + #ifndef NDEBUG { if(val && !(_pScrn->d3dcaps.RasterCaps & D3DPRASTERCAPS_DITHER)) dxgsg8_cat.error() << "no HW support for color dithering!!\n"; - return; } #endif - _dither_enabled = val; _pD3DDevice->SetRenderState(D3DRS_DITHERENABLE, (DWORD)val); } } diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.h b/panda/src/dxgsg8/dxGraphicsStateGuardian8.h index 592e87dc46..818178a3e0 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.h +++ b/panda/src/dxgsg8/dxGraphicsStateGuardian8.h @@ -25,6 +25,7 @@ #include "dxGeomNodeContext8.h" #include "dxTextureContext8.h" #include "d3dfont8.h" +#include "config_dxgsg8.h" #include "graphicsStateGuardian.h" #include "geomprimitives.h" diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.I b/panda/src/dxgsg9/dxGraphicsStateGuardian9.I index bed7ee72cc..0951553729 100755 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.I +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.I @@ -16,8 +16,6 @@ // //////////////////////////////////////////////////////////////////// -// for dxgsg9_cat stuff -#include "config_dxgsg9.h" //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian9::enable_line_smooth @@ -28,9 +26,9 @@ INLINE void DXGraphicsStateGuardian9:: enable_line_smooth(bool val) { if(_line_smooth_enabled != val) { _line_smooth_enabled = val; - #ifdef NDEBUG + #ifndef NDEBUG { - if(val && (_pScrn->d3dcaps.RasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES)) + if(val && (_pScrn->d3dcaps.LineCaps & D3DLINECAPS_ANTIALIAS)) dxgsg9_cat.error() << "no HW support for line smoothing!!\n"; } #endif @@ -47,16 +45,15 @@ enable_line_smooth(bool val) { INLINE void DXGraphicsStateGuardian9:: enable_dither(bool val) { if (_dither_enabled != val) { + _dither_enabled = val; - #ifdef _DEBUG + #ifndef NDEBUG { if(val && !(_pScrn->d3dcaps.RasterCaps & D3DPRASTERCAPS_DITHER)) dxgsg9_cat.error() << "no HW support for color dithering!!\n"; - return; } #endif - _dither_enabled = val; _pD3DDevice->SetRenderState(D3DRS_DITHERENABLE, (DWORD)val); } } diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.h b/panda/src/dxgsg9/dxGraphicsStateGuardian9.h index 8bd35ca436..e19af4bef2 100755 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.h +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.h @@ -25,6 +25,7 @@ #include "dxGeomNodeContext9.h" #include "dxTextureContext9.h" #include "d3dfont9.h" +#include "config_dxgsg9.h" #include "graphicsStateGuardian.h" #include "geomprimitives.h"