diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp index 8a85fb51f5..f6e67cad80 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp @@ -270,7 +270,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight int glxMajorVersion, glxMinorVersion; int vidModeMajorVersion, vidModeMinorVersion; Atom wmDelete; - + // attributes for a single buffered visual in RGBA format with at least // 8 bits per color and a 24 bit depth buffer int attrListSgl[] = {GLX_RGBA, GLX_RED_SIZE, 8, @@ -286,7 +286,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, GLX_DEPTH_SIZE, 24, - None }; + GLX_SAMPLE_BUFFERS_ARB, 1, GLX_SAMPLES_ARB, 1, None }; GLWin.dpy = XOpenDisplay(0); g_VideoInitialize.pWindowHandle = (HWND)GLWin.dpy; GLWin.screen = DefaultScreen(GLWin.dpy); @@ -533,7 +533,9 @@ void OpenGL_Shutdown() { ERROR_LOG("Could not release drawing context.\n"); } + XUnmapWindow(GLWin.dpy, GLWin.win); glXDestroyContext(GLWin.dpy, GLWin.ctx); + XCloseDisplay(GLWin.dpy); GLWin.ctx = NULL; } /* switch back to original desktop resolution if we were in fs */ diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp index 85b18f8fb0..37b868f615 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp @@ -527,10 +527,10 @@ void TextureMngr::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool GL_REPORT_ERRORD(); glBegin(GL_QUADS); - glTexCoord2f((float)source->left, Renderer::GetTargetHeight()-(float)source->bottom); glVertex2f(-1,1); - glTexCoord2f((float)source->left, Renderer::GetTargetHeight()-(float)source->top); glVertex2f(-1,-1); - glTexCoord2f((float)source->right, Renderer::GetTargetHeight()-(float)source->top); glVertex2f(1,-1); - glTexCoord2f((float)source->right, Renderer::GetTargetHeight()-(float)source->bottom); glVertex2f(1,1); + glTexCoord2f((float)source->left * MValue, Renderer::GetTargetHeight()-(float)source->bottom * MValue); glVertex2f(-1,1); + glTexCoord2f((float)source->left * MValue, Renderer::GetTargetHeight()-(float)source->top * MValue); glVertex2f(-1,-1); + glTexCoord2f((float)source->right * MValue, Renderer::GetTargetHeight()-(float)source->top * MValue); glVertex2f(1,-1); + glTexCoord2f((float)source->right * MValue, Renderer::GetTargetHeight()-(float)source->bottom * MValue); glVertex2f(1,1); glEnd(); GL_REPORT_ERRORD();