fix more stupid shit. askzjkdsf

This commit is contained in:
Arisotura 2019-06-09 20:44:35 +02:00
parent c056dfe509
commit 9ab331c6dd
2 changed files with 9 additions and 18 deletions

View File

@ -987,6 +987,9 @@ void RenderFrame()
{
CurShaderID = -1;
if (Antialias) glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[2]);
else glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[FrontBuffer]);
ShaderConfig.uScreenSize[0] = ScreenW;
ShaderConfig.uScreenSize[1] = ScreenH;
ShaderConfig.uDispCnt = RenderDispCnt;
@ -1080,9 +1083,6 @@ void RenderFrame()
glViewport(0, 0, ScreenW, ScreenH);
if (Antialias) glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[2]);
else glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[FrontBuffer]);
glDisable(GL_BLEND);
glColorMaski(0, GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glColorMaski(1, GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);

View File

@ -289,6 +289,8 @@ void GLScreen_DrawScreen()
{
float scale = uiGLGetFramebufferScale(GLContext);
glBindFramebuffer(GL_FRAMEBUFFER, uiGLGetFramebuffer(GLContext));
if (GL_ScreenSizeDirty)
{
GL_ScreenSizeDirty = false;
@ -424,8 +426,6 @@ void GLScreen_DrawScreen()
else
OpenGL_UseShaderProgram(GL_ScreenShaderAccel);
glBindFramebuffer(GL_FRAMEBUFFER, uiGLGetFramebuffer(GLContext));
glClearColor(0, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT);
@ -2151,26 +2151,17 @@ void ApplyNewSettings(int type)
bool usegl = Config::ScreenUseGL || (Config::_3DRenderer != 0);
if (usegl != Screen_UseGL)
{
if (RunningSomething)
{
if (Screen_UseGL) uiGLMakeContextCurrent(GLContext);
GPU3D::DeInitRenderer();
if (Screen_UseGL) uiGLMakeContextCurrent(NULL);
}
if (Screen_UseGL) uiGLMakeContextCurrent(GLContext);
GPU3D::DeInitRenderer();
OSD::DeInit(Screen_UseGL);
if (Screen_UseGL) uiGLMakeContextCurrent(NULL);
Screen_UseGL = usegl;
RecreateMainWindow(usegl);
if (RunningSomething)
{
if (Screen_UseGL) uiGLMakeContextCurrent(GLContext);
GPU3D::InitRenderer(Screen_UseGL);
if (Screen_UseGL) uiGLMakeContextCurrent(NULL);
}
if (Screen_UseGL) uiGLMakeContextCurrent(GLContext);
GPU3D::InitRenderer(Screen_UseGL);
if (Screen_UseGL) uiGLMakeContextCurrent(NULL);
}
}
else if (type == 3) // 3D renderer