mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
minor clnup
This commit is contained in:
parent
235dd07c59
commit
94b1117f3c
@ -494,8 +494,8 @@ dx_init( void) {
|
|||||||
assert(scrn.pddsPrimary!=NULL);
|
assert(scrn.pddsPrimary!=NULL);
|
||||||
assert(scrn.pddsBack!=NULL);
|
assert(scrn.pddsBack!=NULL);
|
||||||
|
|
||||||
_pDD=scrn.pDD; // save for speed of access
|
// _pDD=scrn.pDD; // save for speed of access
|
||||||
_pCurD3DDevice = scrn.pD3DDevice;
|
// _pCurD3DDevice = scrn.pD3DDevice;
|
||||||
|
|
||||||
/* _pDD = context;
|
/* _pDD = context;
|
||||||
scrn.pddsPrimary = pri;
|
scrn.pddsPrimary = pri;
|
||||||
@ -593,13 +593,13 @@ dx_init( void) {
|
|||||||
#ifdef USE_TEXFMTVEC
|
#ifdef USE_TEXFMTVEC
|
||||||
assert(scrn.TexPixFmts.size()==0);
|
assert(scrn.TexPixFmts.size()==0);
|
||||||
|
|
||||||
if(FAILED(hr=_pCurD3DDevice->EnumTextureFormats(EnumTexFmtsCallback, &scrn.TexPixFmts))) {
|
if(FAILED(hr=scrn.pD3DDevice->EnumTextureFormats(EnumTexFmtsCallback, &scrn.TexPixFmts))) {
|
||||||
#else
|
#else
|
||||||
_pTexPixFmts = new DDPIXELFORMAT[MAX_DX_TEXPIXFMTS];
|
_pTexPixFmts = new DDPIXELFORMAT[MAX_DX_TEXPIXFMTS];
|
||||||
_cNumTexPixFmts = 0;
|
_cNumTexPixFmts = 0;
|
||||||
assert(_pTexPixFmts!=NULL);
|
assert(_pTexPixFmts!=NULL);
|
||||||
|
|
||||||
if(FAILED(hr=_pCurD3DDevice->EnumTextureFormats(EnumTexFmtsCallback, this))) {
|
if(FAILED(hr=scrn.pD3DDevice->EnumTextureFormats(EnumTexFmtsCallback, this))) {
|
||||||
#endif
|
#endif
|
||||||
if(hr==D3DERR_TEXTURE_NO_SUPPORT) {
|
if(hr==D3DERR_TEXTURE_NO_SUPPORT) {
|
||||||
dxgsg_cat.error() << "EnumTextureFormats indicates No Texturing Support on this HW!, exiting...\n";
|
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);
|
DX_DECLARE_CLEAN(DDCAPS,ddCaps);
|
||||||
if (FAILED(hr = scrn.pDD->GetCaps(&ddCaps,NULL))) {
|
if (FAILED(hr = scrn.pDD->GetCaps(&ddCaps,NULL))) {
|
||||||
dxgsg_cat.fatal() << "GetCaps failed on DDraw! hr = " << ConvD3DErrorToString(hr) << "\n";
|
dxgsg_cat.fatal() << "GetCaps failed on DDraw! hr = " << ConvD3DErrorToString(hr) << "\n";
|
||||||
|
@ -252,16 +252,13 @@ public:
|
|||||||
virtual void set_color_clear_value(const Colorf& value);
|
virtual void set_color_clear_value(const Colorf& value);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// recreate_tex_callback needs these to be public
|
// recreate_tex_callback needs pDD,pD3DDevice to be public
|
||||||
LPDIRECT3DDEVICE7 _pCurD3DDevice; //this needs to be set every device iteration
|
|
||||||
LPDIRECTDRAW7 _pDD;
|
|
||||||
DXScreenData scrn;
|
DXScreenData scrn;
|
||||||
|
|
||||||
#ifndef USE_TEXFMTVEC
|
#ifndef USE_TEXFMTVEC
|
||||||
LPDDPIXELFORMAT _pTexPixFmts;
|
LPDDPIXELFORMAT _pTexPixFmts;
|
||||||
int _cNumTexPixFmts;
|
int _cNumTexPixFmts;
|
||||||
#endif
|
#endif
|
||||||
// D3DDEVICEDESC7 _D3DDevDesc;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void free_pointers(); // free local internal buffers
|
void free_pointers(); // free local internal buffers
|
||||||
@ -281,20 +278,6 @@ protected:
|
|||||||
bool _dx_ready;
|
bool _dx_ready;
|
||||||
HRESULT _last_testcooplevel_result;
|
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;
|
bool _bShowFPSMeter;
|
||||||
|
|
||||||
HDC _front_hdc;
|
HDC _front_hdc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user