[Add] Finished GLWindow::Destory method.
This commit is contained in:
parent
89eda402d8
commit
610a5078f1
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user