mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
init backbuf to black
This commit is contained in:
parent
410a8a6529
commit
d4a45b2c74
@ -1274,10 +1274,6 @@ dx_setup()
|
|||||||
|
|
||||||
DX_DECLARE_CLEAN(DDCAPS,DDCaps);
|
DX_DECLARE_CLEAN(DDCAPS,DDCaps);
|
||||||
pDD->GetCaps(&DDCaps,NULL);
|
pDD->GetCaps(&DDCaps,NULL);
|
||||||
if((!(DDCaps.dwCaps2 & DDCAPS2_CANRENDERWINDOWED)) && !dx_full_screen) {
|
|
||||||
wdxdisplay_cat.fatal() << "wdxGraphicsWindow:: 3D HW cannot render windowed, exiting..." << endl;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dx_full_screen) {
|
if (dx_full_screen) {
|
||||||
DWORD dwRenderWidth = _props._xsize;
|
DWORD dwRenderWidth = _props._xsize;
|
||||||
@ -1426,9 +1422,21 @@ dx_setup()
|
|||||||
<< "wdxGraphicsWindow::CreateFullscreenBuffers() - Can't get the backbuffer: result = " << ConvD3DErrorToString(hr) << endl;
|
<< "wdxGraphicsWindow::CreateFullscreenBuffers() - Can't get the backbuffer: result = " << ConvD3DErrorToString(hr) << endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( FAILED( hr = pBackDDSurf->Blt(NULL,NULL,NULL,DDBLT_COLORFILL | DDBLT_WAIT,&bltfx))) {
|
||||||
|
wdxdisplay_cat.fatal()
|
||||||
|
<< "wdxGraphicsWindow:: Blt to Black of Back Surf failed! : result = " << ConvD3DErrorToString(hr) << endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
} // end create full screen buffers
|
} // end create full screen buffers
|
||||||
|
|
||||||
else { // CREATE WINDOWED BUFFERS
|
else { // CREATE WINDOWED BUFFERS
|
||||||
|
|
||||||
|
if(!(DDCaps.dwCaps2 & DDCAPS2_CANRENDERWINDOWED)) {
|
||||||
|
wdxdisplay_cat.fatal() << "wdxGraphicsWindow:: 3D HW cannot render windowed, exiting..." << endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
if(FAILED(hr = pDD->GetDisplayMode( &SurfaceDesc ))) {
|
if(FAILED(hr = pDD->GetDisplayMode( &SurfaceDesc ))) {
|
||||||
wdxdisplay_cat.fatal()
|
wdxdisplay_cat.fatal()
|
||||||
<< "wdxGraphicsWindow::GetDisplayMode failed result = " << ConvD3DErrorToString(hr) << endl;
|
<< "wdxGraphicsWindow::GetDisplayMode failed result = " << ConvD3DErrorToString(hr) << endl;
|
||||||
@ -1496,9 +1504,8 @@ dx_setup()
|
|||||||
|
|
||||||
// Clear the primary surface to black
|
// Clear the primary surface to black
|
||||||
DX_DECLARE_CLEAN(DDBLTFX, bltfx)
|
DX_DECLARE_CLEAN(DDBLTFX, bltfx)
|
||||||
hr = pPrimaryDDSurf->Blt(NULL,NULL,NULL,DDBLT_COLORFILL | DDBLT_WAIT,&bltfx);
|
|
||||||
|
|
||||||
if( FAILED( hr )) {
|
if( FAILED( hr = pPrimaryDDSurf->Blt(NULL,NULL,NULL,DDBLT_COLORFILL | DDBLT_WAIT,&bltfx))) {
|
||||||
wdxdisplay_cat.fatal()
|
wdxdisplay_cat.fatal()
|
||||||
<< "wdxGraphicsWindow:: Blt to Black of Primary Surf failed! : result = " << ConvD3DErrorToString(hr) << endl;
|
<< "wdxGraphicsWindow:: Blt to Black of Primary Surf failed! : result = " << ConvD3DErrorToString(hr) << endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -1519,6 +1526,12 @@ dx_setup()
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( FAILED( hr = pBackDDSurf->Blt(NULL,NULL,NULL,DDBLT_COLORFILL | DDBLT_WAIT,&bltfx))) {
|
||||||
|
wdxdisplay_cat.fatal()
|
||||||
|
<< "wdxGraphicsWindow:: Blt to Black of Back Surf failed! : result = " << ConvD3DErrorToString(hr) << endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
} // end create windowed buffers
|
} // end create windowed buffers
|
||||||
|
|
||||||
// ========================================================
|
// ========================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user