Browse Source

minor clnup

cxgeorge 24 years ago
parent
commit
94b1117f3c

+ 4 - 10
panda/src/dxgsg/dxGraphicsStateGuardian.cxx

@@ -494,8 +494,8 @@ dx_init( void) {
     assert(scrn.pddsPrimary!=NULL);
     assert(scrn.pddsBack!=NULL);
 
-    _pDD=scrn.pDD;  // save for speed of access
-    _pCurD3DDevice = scrn.pD3DDevice;
+//    _pDD=scrn.pDD;  // save for speed of access
+//    _pCurD3DDevice = scrn.pD3DDevice;
 
 /*    _pDD = context;
     scrn.pddsPrimary = pri;
@@ -593,13 +593,13 @@ dx_init( void) {
 #ifdef USE_TEXFMTVEC
     assert(scrn.TexPixFmts.size()==0);
 
-    if(FAILED(hr=_pCurD3DDevice->EnumTextureFormats(EnumTexFmtsCallback, &scrn.TexPixFmts))) {
+    if(FAILED(hr=scrn.pD3DDevice->EnumTextureFormats(EnumTexFmtsCallback, &scrn.TexPixFmts))) {
 #else
     _pTexPixFmts = new DDPIXELFORMAT[MAX_DX_TEXPIXFMTS];
     _cNumTexPixFmts = 0;
     assert(_pTexPixFmts!=NULL);
 
-    if(FAILED(hr=_pCurD3DDevice->EnumTextureFormats(EnumTexFmtsCallback, this))) {
+    if(FAILED(hr=scrn.pD3DDevice->EnumTextureFormats(EnumTexFmtsCallback, this))) {
 #endif
         if(hr==D3DERR_TEXTURE_NO_SUPPORT) {
             dxgsg_cat.error() << "EnumTextureFormats indicates No Texturing Support on this HW!, exiting...\n";
@@ -609,12 +609,6 @@ dx_init( void) {
         }
     }
 
-/*
-    if(FAILED(hr = pDevice->GetCaps(&scrn.D3DDevDesc))) {
-        dxgsg_cat.fatal() << "GetCaps failed on D3D Device! hr = " << ConvD3DErrorToString(hr) << endl;
-        exit(1);
-    }
-*/
     DX_DECLARE_CLEAN(DDCAPS,ddCaps);
     if (FAILED(hr = scrn.pDD->GetCaps(&ddCaps,NULL))) {
         dxgsg_cat.fatal() << "GetCaps failed on DDraw! hr = " << ConvD3DErrorToString(hr) << "\n";

+ 1 - 18
panda/src/dxgsg/dxGraphicsStateGuardian.h

@@ -252,16 +252,13 @@ public:
   virtual void set_color_clear_value(const Colorf& value);
 
 public:
-  // recreate_tex_callback needs these to be public
-  LPDIRECT3DDEVICE7 _pCurD3DDevice;  //this needs to be set every device iteration
-  LPDIRECTDRAW7 _pDD;
+  // recreate_tex_callback needs pDD,pD3DDevice to be public
   DXScreenData scrn;
 
 #ifndef USE_TEXFMTVEC
   LPDDPIXELFORMAT   _pTexPixFmts;
   int               _cNumTexPixFmts;
 #endif
-//  D3DDEVICEDESC7    _D3DDevDesc;
 
 protected:
   void free_pointers();            // free local internal buffers
@@ -281,20 +278,6 @@ protected:
   bool                  _dx_ready;
   HRESULT               _last_testcooplevel_result;
 
-/*
-  moved to per display data
-  bool                  _bIsTNLDevice;
-  LPDIRECTDRAWSURFACE7  _back;
-  LPDIRECTDRAWSURFACE7  _zbuf;
-  LPDIRECTDRAWSURFACE7  _pri;
-
-  LPDIRECT3D7           _d3d;
-  LPDIRECTDRAW7         _pDD;
-  RECT              _view_rect;
-  RECT              clip_rect;  
-*/
-  LPDIRECT3D7           _pCurD3D7;
-  LPDIRECTDRAW7         _pCurDD;
   bool                  _bShowFPSMeter;
 
   HDC               _front_hdc;