[Add] Finished GLWindow::Destory method.

This commit is contained in:
Rtch90 2012-04-05 22:40:18 +01:00
parent 89eda402d8
commit 610a5078f1

View File

@ -177,10 +177,13 @@ bool GLWindow::Create(int width, int height, int bpp, bool fullscreen) {
void GLWindow::Destroy(void) { void GLWindow::Destroy(void) {
if(_glContext) { if(_glContext) {
// Some code here. glXMakeCurrent(_display, None, NULL);
glXDestroyContext(_display, _glContext);
_glContext = NULL;
} }
if(_isFullscreen) { if(_isFullscreen) {
// And here.. XF86VidModeSwitchToMode(_display, _screeID, &_XF86DeskMode);
XF86VidModeSetViewPort(_display, _screenID, 0, 0);
} }
XCloseDisplay(_display); XCloseDisplay(_display);