fix antialias typos

This commit is contained in:
David Rose 2004-01-30 17:32:57 +00:00
parent 587c64366c
commit f8ce9193c2
6 changed files with 14 additions and 19 deletions

View File

@ -16,8 +16,6 @@
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
#include "config_dxgsg7.h"
#include <graphicsWindow.h>
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: DXGraphicsStateGuardian7::enable_line_smooth // Function: DXGraphicsStateGuardian7::enable_line_smooth
@ -28,7 +26,7 @@ INLINE void DXGraphicsStateGuardian7::
enable_line_smooth(bool val) { enable_line_smooth(bool val) {
if(_line_smooth_enabled != val) { if(_line_smooth_enabled != val) {
_line_smooth_enabled = val; _line_smooth_enabled = val;
#ifdef NDEBUG #ifndef NDEBUG
{ {
if(val && (_pScrn->D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES)) if(val && (_pScrn->D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES))
dxgsg7_cat.error() << "no HW support for line smoothing!!\n"; dxgsg7_cat.error() << "no HW support for line smoothing!!\n";
@ -47,16 +45,15 @@ enable_line_smooth(bool val) {
INLINE void DXGraphicsStateGuardian7:: INLINE void DXGraphicsStateGuardian7::
enable_dither(bool val) { enable_dither(bool val) {
if (_dither_enabled != val) { if (_dither_enabled != val) {
_dither_enabled = val;
#ifdef _DEBUG #ifndef NDEBUG
{ {
if(val && !(_pScrn->D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_DITHER)) if(val && !(_pScrn->D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_DITHER))
dxgsg7_cat.error() << "no HW support for color dithering!!\n"; dxgsg7_cat.error() << "no HW support for color dithering!!\n";
return;
} }
#endif #endif
_dither_enabled = val;
_pScrn->pD3DDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, (DWORD)val); _pScrn->pD3DDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, (DWORD)val);
} }
} }

View File

@ -24,6 +24,7 @@
#include "dxgsg7base.h" #include "dxgsg7base.h"
#include "dxGeomNodeContext7.h" #include "dxGeomNodeContext7.h"
#include "dxTextureContext7.h" #include "dxTextureContext7.h"
#include "config_dxgsg7.h"
#include "graphicsStateGuardian.h" #include "graphicsStateGuardian.h"
#include "geomprimitives.h" #include "geomprimitives.h"
@ -36,6 +37,7 @@
#include "textureApplyAttrib.h" #include "textureApplyAttrib.h"
#include "fog.h" #include "fog.h"
#include "pointerToArray.h" #include "pointerToArray.h"
#include "graphicsWindow.h"
class Light; class Light;

View File

@ -16,8 +16,6 @@
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// for dxgsg8_cat stuff
#include "config_dxgsg8.h"
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: DXGraphicsStateGuardian8::enable_line_smooth // Function: DXGraphicsStateGuardian8::enable_line_smooth
@ -28,7 +26,7 @@ INLINE void DXGraphicsStateGuardian8::
enable_line_smooth(bool val) { enable_line_smooth(bool val) {
if(_line_smooth_enabled != val) { if(_line_smooth_enabled != val) {
_line_smooth_enabled = val; _line_smooth_enabled = val;
#ifdef NDEBUG #ifndef NDEBUG
{ {
if(val && (_pScrn->d3dcaps.RasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES)) if(val && (_pScrn->d3dcaps.RasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES))
dxgsg8_cat.error() << "no HW support for line smoothing!!\n"; dxgsg8_cat.error() << "no HW support for line smoothing!!\n";
@ -47,16 +45,15 @@ enable_line_smooth(bool val) {
INLINE void DXGraphicsStateGuardian8:: INLINE void DXGraphicsStateGuardian8::
enable_dither(bool val) { enable_dither(bool val) {
if (_dither_enabled != val) { if (_dither_enabled != val) {
_dither_enabled = val;
#ifdef _DEBUG #ifndef NDEBUG
{ {
if(val && !(_pScrn->d3dcaps.RasterCaps & D3DPRASTERCAPS_DITHER)) if(val && !(_pScrn->d3dcaps.RasterCaps & D3DPRASTERCAPS_DITHER))
dxgsg8_cat.error() << "no HW support for color dithering!!\n"; dxgsg8_cat.error() << "no HW support for color dithering!!\n";
return;
} }
#endif #endif
_dither_enabled = val;
_pD3DDevice->SetRenderState(D3DRS_DITHERENABLE, (DWORD)val); _pD3DDevice->SetRenderState(D3DRS_DITHERENABLE, (DWORD)val);
} }
} }

View File

@ -25,6 +25,7 @@
#include "dxGeomNodeContext8.h" #include "dxGeomNodeContext8.h"
#include "dxTextureContext8.h" #include "dxTextureContext8.h"
#include "d3dfont8.h" #include "d3dfont8.h"
#include "config_dxgsg8.h"
#include "graphicsStateGuardian.h" #include "graphicsStateGuardian.h"
#include "geomprimitives.h" #include "geomprimitives.h"

View File

@ -16,8 +16,6 @@
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// for dxgsg9_cat stuff
#include "config_dxgsg9.h"
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: DXGraphicsStateGuardian9::enable_line_smooth // Function: DXGraphicsStateGuardian9::enable_line_smooth
@ -28,9 +26,9 @@ INLINE void DXGraphicsStateGuardian9::
enable_line_smooth(bool val) { enable_line_smooth(bool val) {
if(_line_smooth_enabled != val) { if(_line_smooth_enabled != val) {
_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"; dxgsg9_cat.error() << "no HW support for line smoothing!!\n";
} }
#endif #endif
@ -47,16 +45,15 @@ enable_line_smooth(bool val) {
INLINE void DXGraphicsStateGuardian9:: INLINE void DXGraphicsStateGuardian9::
enable_dither(bool val) { enable_dither(bool val) {
if (_dither_enabled != val) { if (_dither_enabled != val) {
_dither_enabled = val;
#ifdef _DEBUG #ifndef NDEBUG
{ {
if(val && !(_pScrn->d3dcaps.RasterCaps & D3DPRASTERCAPS_DITHER)) if(val && !(_pScrn->d3dcaps.RasterCaps & D3DPRASTERCAPS_DITHER))
dxgsg9_cat.error() << "no HW support for color dithering!!\n"; dxgsg9_cat.error() << "no HW support for color dithering!!\n";
return;
} }
#endif #endif
_dither_enabled = val;
_pD3DDevice->SetRenderState(D3DRS_DITHERENABLE, (DWORD)val); _pD3DDevice->SetRenderState(D3DRS_DITHERENABLE, (DWORD)val);
} }
} }

View File

@ -25,6 +25,7 @@
#include "dxGeomNodeContext9.h" #include "dxGeomNodeContext9.h"
#include "dxTextureContext9.h" #include "dxTextureContext9.h"
#include "d3dfont9.h" #include "d3dfont9.h"
#include "config_dxgsg9.h"
#include "graphicsStateGuardian.h" #include "graphicsStateGuardian.h"
#include "geomprimitives.h" #include "geomprimitives.h"