From 28a500430fc808bc2c2d1e5aee467f1c39764ab0 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sun, 29 Jan 2006 16:01:07 +0000 Subject: [PATCH] consolidate dx8 includes --- panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx | 2 +- panda/src/dxgsg8/dxIndexBufferContext8.cxx | 2 +- panda/src/dxgsg8/dxTextureContext8.cxx | 3 ++- panda/src/dxgsg8/dxVertexBufferContext8.cxx | 2 +- panda/src/dxgsg8/dxgsg8base.h | 16 ++-------------- 5 files changed, 7 insertions(+), 18 deletions(-) diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx index e37ed7f8c9..a0da72d959 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx +++ b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx @@ -60,8 +60,8 @@ #include "dxIndexBufferContext8.h" #include "pStatTimer.h" #include "pStatCollector.h" +#include "dxgsg8base.h" -#include #include TypeHandle DXGraphicsStateGuardian8::_type_handle; diff --git a/panda/src/dxgsg8/dxIndexBufferContext8.cxx b/panda/src/dxgsg8/dxIndexBufferContext8.cxx index 3f2e2cf0c1..f8e9e9c8f4 100644 --- a/panda/src/dxgsg8/dxIndexBufferContext8.cxx +++ b/panda/src/dxgsg8/dxIndexBufferContext8.cxx @@ -21,7 +21,7 @@ #include "config_dxgsg8.h" #include "graphicsStateGuardian.h" #include "pStatTimer.h" -#include +#include "dxgsg8base.h" TypeHandle DXIndexBufferContext8::_type_handle; diff --git a/panda/src/dxgsg8/dxTextureContext8.cxx b/panda/src/dxgsg8/dxTextureContext8.cxx index 87b0bab41a..5a78fd6a61 100644 --- a/panda/src/dxgsg8/dxTextureContext8.cxx +++ b/panda/src/dxgsg8/dxTextureContext8.cxx @@ -20,7 +20,8 @@ #include "config_dxgsg8.h" #include "dxGraphicsStateGuardian8.h" #include "pStatTimer.h" -#include +#include "dxgsg8base.h" + #include #include diff --git a/panda/src/dxgsg8/dxVertexBufferContext8.cxx b/panda/src/dxgsg8/dxVertexBufferContext8.cxx index 5581bc842d..aec593eafe 100644 --- a/panda/src/dxgsg8/dxVertexBufferContext8.cxx +++ b/panda/src/dxgsg8/dxVertexBufferContext8.cxx @@ -23,7 +23,7 @@ #include "pStatTimer.h" #include "internalName.h" #include "config_dxgsg8.h" -#include +#include "dxgsg8base.h" TypeHandle DXVertexBufferContext8::_type_handle; diff --git a/panda/src/dxgsg8/dxgsg8base.h b/panda/src/dxgsg8/dxgsg8base.h index 8a99018f8e..9a2a8d4c0d 100644 --- a/panda/src/dxgsg8/dxgsg8base.h +++ b/panda/src/dxgsg8/dxgsg8base.h @@ -29,26 +29,14 @@ #define STRICT #endif +#define DIRECT3D_VERSION 0x0800 #include - -#define D3D_OVERLOADS // get D3DVECTOR '+' operator, etc from d3dtypes.h #include #include #include +#include #undef WIN32_LEAN_AND_MEAN -#if D3D_SDK_VERSION != 220 -#error you have DX 8.0 headers, not DX 8.1, you need to install DX 8.1 SDK! -#endif - -#if DIRECT3D_VERSION != 0x0800 -#error DX8.1 headers not available, you need to install newer MS Platform SDK! -#endif - -#ifndef D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD -#error you have pre-release DX8.1 headers, you need to install final DX 8.1 SDK! -#endif - #ifndef D3DERRORSTRING #ifdef NDEBUG #define D3DERRORSTRING(HRESULT) " at (" << __FILE__ << ":" << __LINE__ << "), hr=" << DXGetErrorString8(HRESULT) << endl // leave out descriptions to shrink release build