mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
prevent crash with window-type offscreen
This commit is contained in:
parent
f65ab84347
commit
babf0163e5
@ -523,12 +523,15 @@ open_buffer() {
|
|||||||
|
|
||||||
// GSG creation/initialization.
|
// GSG creation/initialization.
|
||||||
if (_gsg == 0) {
|
if (_gsg == 0) {
|
||||||
_dxgsg = new DXGraphicsStateGuardian8(_engine, _pipe);
|
// The code below doesn't support creating a GSG on the fly.
|
||||||
_gsg = _dxgsg;
|
// Just error out for now.
|
||||||
} else {
|
//_dxgsg = new DXGraphicsStateGuardian8(_engine, _pipe);
|
||||||
DCAST_INTO_R(_dxgsg, _gsg, false);
|
//_gsg = _dxgsg;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DCAST_INTO_R(_dxgsg, _gsg, false);
|
||||||
|
|
||||||
if (!save_bitplanes()) {
|
if (!save_bitplanes()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -745,12 +745,15 @@ open_buffer() {
|
|||||||
|
|
||||||
// GSG creation/initialization.
|
// GSG creation/initialization.
|
||||||
if (_gsg == 0) {
|
if (_gsg == 0) {
|
||||||
_dxgsg = new DXGraphicsStateGuardian9(_engine, _pipe);
|
// The code below doesn't support creating a GSG on the fly.
|
||||||
_gsg = _dxgsg;
|
// Just error out for now.
|
||||||
} else {
|
//_dxgsg = new DXGraphicsStateGuardian9(_engine, _pipe);
|
||||||
DCAST_INTO_R(_dxgsg, _gsg, false);
|
//_gsg = _dxgsg;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DCAST_INTO_R(_dxgsg, _gsg, false);
|
||||||
|
|
||||||
if (!save_bitplanes()) {
|
if (!save_bitplanes()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user