mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
more fixes to fullscreen/windowed switch
This commit is contained in:
parent
76ff8ab6fd
commit
d0cf3615bc
@ -2896,6 +2896,34 @@ do_issue_blending() {
|
||||
_d3d_device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DXGraphicsStateGuardian8::close_gsg
|
||||
// Access: Protected, Virtual
|
||||
// Description: This is called by the associated GraphicsWindow when
|
||||
// close_window() is called. It should null out the
|
||||
// _win pointer and possibly free any open resources
|
||||
// associated with the GSG.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void DXGraphicsStateGuardian8::
|
||||
close_gsg() {
|
||||
GraphicsStateGuardian::close_gsg();
|
||||
|
||||
// Unlike in OpenGL, in DX8 it is safe to try to explicitly release
|
||||
// any textures here. And it may even be a good idea.
|
||||
if (_prepared_objects->get_ref_count() == 1) {
|
||||
release_all_textures();
|
||||
release_all_geoms();
|
||||
release_all_vertex_buffers();
|
||||
release_all_index_buffers();
|
||||
|
||||
// Now we need to actually delete all of the objects we just
|
||||
// released.
|
||||
Thread *current_thread = Thread::get_current_thread();
|
||||
_prepared_objects->begin_frame(this, current_thread);
|
||||
_prepared_objects->end_frame(current_thread);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DXGraphicsStateGuardian8::free_nondx_resources
|
||||
// Access: Public
|
||||
|
@ -141,6 +141,7 @@ protected:
|
||||
virtual void enable_clip_plane(int plane_id, bool enable);
|
||||
virtual void bind_clip_plane(const NodePath &plane, int plane_id);
|
||||
|
||||
virtual void close_gsg();
|
||||
void free_nondx_resources();
|
||||
void free_d3d_device();
|
||||
|
||||
|
@ -3996,6 +3996,34 @@ bind_clip_plane(const NodePath &plane, int plane_id) {
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DXGraphicsStateGuardian9::close_gsg
|
||||
// Access: Protected, Virtual
|
||||
// Description: This is called by the associated GraphicsWindow when
|
||||
// close_window() is called. It should null out the
|
||||
// _win pointer and possibly free any open resources
|
||||
// associated with the GSG.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void DXGraphicsStateGuardian9::
|
||||
close_gsg() {
|
||||
GraphicsStateGuardian::close_gsg();
|
||||
|
||||
// Unlike in OpenGL, in DX9 it is safe to try to explicitly release
|
||||
// any textures here. And it may even be a good idea.
|
||||
if (_prepared_objects->get_ref_count() == 1) {
|
||||
release_all_textures();
|
||||
release_all_geoms();
|
||||
release_all_vertex_buffers();
|
||||
release_all_index_buffers();
|
||||
|
||||
// Now we need to actually delete all of the objects we just
|
||||
// released.
|
||||
Thread *current_thread = Thread::get_current_thread();
|
||||
_prepared_objects->begin_frame(this, current_thread);
|
||||
_prepared_objects->end_frame(current_thread);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DXGraphicsStateGuardian9::free_nondx_resources
|
||||
// Access: Public
|
||||
|
@ -187,6 +187,7 @@ protected:
|
||||
virtual void enable_clip_plane(int plane_id, bool enable);
|
||||
virtual void bind_clip_plane(const NodePath &plane, int plane_id);
|
||||
|
||||
virtual void close_gsg();
|
||||
void free_nondx_resources();
|
||||
void free_d3d_device();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user