Some more fixes for GL plugin, getting ready for AA, and maybe some proper cleanup of XWindow in Linux, which we will never know if it works.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@220 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1 2008-08-15 12:03:49 +00:00
parent bae7cf1354
commit 0325f55d68
2 changed files with 8 additions and 6 deletions

View File

@ -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 */

View File

@ -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();