Parcourir la source

use precompiled header

cxgeorge il y a 24 ans
Parent
commit
4824e19a6c

+ 5 - 1
panda/src/dxgsg/Sources.pp

@@ -5,6 +5,8 @@
 #define USE_DX yes
 
 #begin lib_target
+
+
   #define TARGET dxgsg
   #define LOCAL_LIBS \
     cull gsgmisc gsgbase gobj sgattrib sgraphutil graph display light \
@@ -15,7 +17,9 @@
     dxGraphicsStateGuardian.cxx dxGraphicsStateGuardian.h \
     dxSavedFrameBuffer.I dxSavedFrameBuffer.cxx dxSavedFrameBuffer.h \
     dxTextureContext.I dxTextureContext.cxx dxTextureContext.h
-
+    
+  #define PRECOMPILED_HEADER dxgsg_headers.h
+    
   #define INSTALL_HEADERS \
     config_dxgsg.h dxGraphicsStateGuardian.I dxGraphicsStateGuardian.h \
     dxSavedFrameBuffer.I dxSavedFrameBuffer.h dxTextureContext.I \

+ 2 - 6
panda/src/dxgsg/config_dxgsg.cxx

@@ -16,12 +16,8 @@
 //
 ////////////////////////////////////////////////////////////////////
 
-#include "config_dxgsg.h"
-#include "dxGraphicsStateGuardian.h"
-#include "dxSavedFrameBuffer.h"
-#include "dxTextureContext.h"
-
-#include <dconfig.h>
+#include "dxgsg_headers.h"
+#pragma hdrstop
 
 Configure(config_dxgsg);
 NotifyCategoryDef(dxgsg, ":display:gsg");

+ 2 - 65
panda/src/dxgsg/dxGraphicsStateGuardian.cxx

@@ -16,71 +16,8 @@
 //
 ////////////////////////////////////////////////////////////////////
 
-#include <pandabase.h>
-#include "dxSavedFrameBuffer.h"
-#include "config_dxgsg.h"
-#include "dxGraphicsStateGuardian.h"
-#include <directRenderTraverser.h>
-#include <cullTraverser.h>
-#include <displayRegion.h>
-#include <projectionNode.h>
-#include <camera.h>
-#include <renderBuffer.h>
-#include <geom.h>
-#include <geomSphere.h>
-#include <geomIssuer.h>
-#include <graphicsWindow.h>
-#include <graphicsChannel.h>
-#include <projection.h>
-#include <get_rel_pos.h>
-#include <perspectiveProjection.h>
-#include <ambientLight.h>
-#include <directionalLight.h>
-#include <pointLight.h>
-#include <spotlight.h>
-#include <projectionNode.h>
-#include <transformAttribute.h>
-#include <transformTransition.h>
-#include <colorAttribute.h>
-#include <colorTransition.h>
-#include <lightAttribute.h>
-#include <lightTransition.h>
-#include <textureAttribute.h>
-#include <textureTransition.h>
-#include <renderModeAttribute.h>
-#include <renderModeTransition.h>
-#include <materialAttribute.h>
-#include <materialTransition.h>
-#include <colorBlendAttribute.h>
-#include <colorBlendTransition.h>
-#include <colorMaskAttribute.h>
-#include <colorMaskTransition.h>
-#include <texMatrixAttribute.h>
-#include <texMatrixTransition.h>
-#include <texGenAttribute.h>
-#include <texGenTransition.h>
-#include <textureApplyAttribute.h>
-#include <textureApplyTransition.h>
-#include <clipPlaneAttribute.h>
-#include <clipPlaneTransition.h>
-#include <transparencyAttribute.h>
-#include <transparencyTransition.h>
-#include <fogAttribute.h>
-#include <fogTransition.h>
-#include <linesmoothAttribute.h>
-#include <linesmoothTransition.h>
-#include <depthTestAttribute.h>
-#include <depthTestTransition.h>
-#include <depthWriteAttribute.h>
-#include <depthWriteTransition.h>
-#include <cullFaceAttribute.h>
-#include <cullFaceTransition.h>
-#include <stencilAttribute.h>
-#include <stencilTransition.h>
-#include <throw_event.h>
-#include <mmsystem.h>
-#include <pStatTimer.h>
-#include <pStatCollector.h>
+#include "dxgsg_headers.h"
+#pragma hdrstop
 
 
 #define DISABLE_POLYGON_OFFSET_DECALING

+ 2 - 14
panda/src/dxgsg/dxGraphicsStateGuardian.h

@@ -22,9 +22,6 @@
 //#define GSG_VERBOSE
 
 #include <pandabase.h>
-
-#define D3D_OVERLOADS   //  get D3DVECTOR '+' operator, etc from d3dtypes.h
-
 #include <graphicsStateGuardian.h>
 #include <geomprimitives.h>
 #include <texture.h>
@@ -40,22 +37,13 @@
 #include <colorMatrixTransition.h>
 #include <alphaTransformAttribute.h>
 #include <alphaTransformTransition.h>
+#include <pointerToArray.h>
+#include <planeNode.h>
 
 #include "dxTextureContext.h"
 
 extern char * ConvD3DErrorToString(const HRESULT &error);   // defined in wdxGraphicsPipe.cxx
 
-// Must include windows.h before gl.h on NT
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-
-#include <ddraw.h>
-#include <d3d.h>
-
-#include <pointerToArray.h>
-
 class PlaneNode;
 class Light;
 

+ 2 - 1
panda/src/dxgsg/dxSavedFrameBuffer.cxx

@@ -16,6 +16,7 @@
 //
 ////////////////////////////////////////////////////////////////////
 
-#include "dxSavedFrameBuffer.h"
+#include "dxgsg_headers.h"
+#pragma hdrstop
 
 TypeHandle DXSavedFrameBuffer::_type_handle;

+ 2 - 6
panda/src/dxgsg/dxTextureContext.cxx

@@ -16,12 +16,8 @@
 //
 ////////////////////////////////////////////////////////////////////
 
-#include <assert.h>
-#include <time.h>
-#include "dxTextureContext.h"
-#include "config_dxgsg.h"
-#include "dxGraphicsStateGuardian.h"
-#include "pnmImage.h"
+#include "dxgsg_headers.h"
+#pragma hdrstop
 
 //#define FORCE_16bpp_1555
 

+ 10 - 3
panda/src/dxgsg/dxTextureContext.h

@@ -21,16 +21,23 @@
 
 #include <pandabase.h>
 
-// Must include windows.h before gl.h on NT
 #define WIN32_LEAN_AND_MEAN
+#ifndef STRICT
+// enable strict type checking in windows.h, see msdn
+#define STRICT
+#endif
+
 #include <windows.h>
+
+#include <ddraw.h>
+
+#define D3D_OVERLOADS   //  get D3DVECTOR '+' operator, etc from d3dtypes.h
+#include <d3d.h>
 #undef WIN32_LEAN_AND_MEAN
 
 #include <texture.h>
 #include <textureContext.h>
 
-#include <d3d.h>
-
 #define MAX_DX_TEXPIXFMTS 20    // should be enough for any card
 
 ////////////////////////////////////////////////////////////////////

+ 94 - 0
panda/src/dxgsg/dxgsg_headers.h

@@ -0,0 +1,94 @@
+// Filename: dxgsg-headers.h
+// Created by:  georges (30May01)
+//
+// local headers for dxgsg .cxx files
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
+
+#include <pandabase.h>
+#include <directRenderTraverser.h>
+#include <cullTraverser.h>
+#include <displayRegion.h>
+#include <projectionNode.h>
+#include <camera.h>
+#include <renderBuffer.h>
+#include <geom.h>
+#include <geomSphere.h>
+#include <geomIssuer.h>
+#include <graphicsWindow.h>
+#include <graphicsChannel.h>
+#include <projection.h>
+#include <get_rel_pos.h>
+#include <perspectiveProjection.h>
+#include <ambientLight.h>
+#include <directionalLight.h>
+#include <pointLight.h>
+#include <spotlight.h>
+#include <projectionNode.h>
+#include <transformAttribute.h>
+#include <transformTransition.h>
+#include <colorAttribute.h>
+#include <colorTransition.h>
+#include <lightAttribute.h>
+#include <lightTransition.h>
+#include <textureAttribute.h>
+#include <textureTransition.h>
+#include <renderModeAttribute.h>
+#include <renderModeTransition.h>
+#include <materialAttribute.h>
+#include <materialTransition.h>
+#include <colorBlendAttribute.h>
+#include <colorBlendTransition.h>
+#include <colorMaskAttribute.h>
+#include <colorMaskTransition.h>
+#include <texMatrixAttribute.h>
+#include <texMatrixTransition.h>
+#include <texGenAttribute.h>
+#include <texGenTransition.h>
+#include <textureApplyAttribute.h>
+#include <textureApplyTransition.h>
+#include <clipPlaneAttribute.h>
+#include <clipPlaneTransition.h>
+#include <transparencyAttribute.h>
+#include <transparencyTransition.h>
+#include <fogAttribute.h>
+#include <fogTransition.h>
+#include <linesmoothAttribute.h>
+#include <linesmoothTransition.h>
+#include <depthTestAttribute.h>
+#include <depthTestTransition.h>
+#include <depthWriteAttribute.h>
+#include <depthWriteTransition.h>
+#include <cullFaceAttribute.h>
+#include <cullFaceTransition.h>
+#include <stencilAttribute.h>
+#include <stencilTransition.h>
+#include <throw_event.h>
+#include <pStatTimer.h>
+#include <pStatCollector.h>
+#include <dconfig.h>
+#include <assert.h>
+#include <time.h>
+#include <pnmImage.h>
+
+#include "config_dxgsg.h"
+#include "dxTextureContext.h"
+#include "dxSavedFrameBuffer.h"
+#include "dxGraphicsStateGuardian.h"
+
+#include <mmsystem.h>
+
+#pragma hdrstop
+