mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Fixed a few more gsg==NULL bugs
This commit is contained in:
parent
2408212aac
commit
c1f03b3650
@ -36,8 +36,6 @@ GraphicsBuffer(GraphicsPipe *pipe,
|
||||
GraphicsOutput *host) :
|
||||
GraphicsOutput(pipe, name, properties, x_size, y_size, flags, gsg, host)
|
||||
{
|
||||
nassertv(gsg != (GraphicsStateGuardian *)NULL);
|
||||
|
||||
#ifdef DO_MEMORY_USAGE
|
||||
MemoryUsage::update_type(this, this);
|
||||
#endif
|
||||
@ -49,8 +47,6 @@ GraphicsBuffer(GraphicsPipe *pipe,
|
||||
|
||||
_default_display_region->compute_pixels(_x_size, _y_size);
|
||||
_open_request = OR_none;
|
||||
|
||||
set_inverted(gsg->get_copy_texture_inverted());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -124,6 +120,7 @@ process_events() {
|
||||
|
||||
case OR_open:
|
||||
open_buffer();
|
||||
set_inverted(_gsg->get_copy_texture_inverted());
|
||||
break;
|
||||
|
||||
case OR_close:
|
||||
|
@ -554,6 +554,7 @@ set_properties_now(WindowProperties &properties) {
|
||||
// When the window is first opened, force its size to be
|
||||
// broadcast to its display regions.
|
||||
_is_valid = true;
|
||||
set_inverted(_gsg->get_copy_texture_inverted());
|
||||
set_size_and_recalc(_properties.get_x_size(),
|
||||
_properties.get_y_size());
|
||||
} else {
|
||||
|
@ -352,6 +352,10 @@ open_buffer() {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void wglGraphicsBuffer::
|
||||
release_pbuffer() {
|
||||
if (_gsg == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
wglGraphicsStateGuardian *wglgsg;
|
||||
DCAST_INTO_V(wglgsg, _gsg);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user