clean up shutdown
This commit is contained in:
parent
4c142c3a4a
commit
9ac12dbe92
|
|
@ -86,8 +86,10 @@ make_gsg() {
|
|||
void wglGraphicsWindow::
|
||||
release_gsg() {
|
||||
if (_gsg != (GraphicsStateGuardian *)NULL) {
|
||||
wglMakeCurrent(_hdc, _context);
|
||||
GraphicsWindow::release_gsg();
|
||||
wglDeleteContext(_context);
|
||||
wglMakeCurrent(_hdc, NULL);
|
||||
_context = (HGLRC)0;
|
||||
}
|
||||
}
|
||||
|
|
@ -180,6 +182,19 @@ open_window() {
|
|||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wglGraphicsWindow::close_window
|
||||
// Access: Protected, Virtual
|
||||
// Description: Closes the window right now. Called from the window
|
||||
// thread.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void wglGraphicsWindow::
|
||||
close_window() {
|
||||
ReleaseDC(_mwindow, _hdc);
|
||||
_hdc = (HDC)0;
|
||||
WinGraphicsWindow::close_window();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wglGraphicsWindow::choose_pfnum
|
||||
// Access: Private
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ public:
|
|||
|
||||
protected:
|
||||
virtual bool open_window();
|
||||
virtual void close_window();
|
||||
|
||||
private:
|
||||
int choose_pfnum() const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue