dont always call HWR_Startup again

This commit is contained in:
Alug committed 2024-10-28 07:21:13 +01:00
1 parent 2824e5d850
commit 238ce98c44
2 files changed
+10 -5

No files matched your search

+4 -2
View File
@@ -262,7 +262,8 @@ static void CV_glframebuffer_OnChange(void)
if (cv_glframebuffer.value != 0 && cv_glscreentextures.value != 2) // screen FBO needs screen textures
CV_SetValue(&cv_glframebuffer, 0);
HWD.pfnSetSpecialState(HWD_SET_FRAMEBUFFER, cv_glframebuffer.value);
if (supportFBO)
HWD.pfnSetSpecialState(HWD_SET_FRAMEBUFFER, cv_glframebuffer.value);
I_DownSample();
RefreshOGLSDLSurface();
M_UpdateOGLMenu();
@@ -5410,7 +5411,8 @@ void HWR_Startup(void)
HWR_TogglePaletteRendering();
#ifdef USE_FBO_OGL
HWD.pfnSetSpecialState(HWD_SET_FRAMEBUFFER, cv_glframebuffer.value);
if (supportFBO)
HWD.pfnSetSpecialState(HWD_SET_FRAMEBUFFER, cv_glframebuffer.value);
#endif
if (msaa)
+6 -3
View File
@@ -112,10 +112,11 @@ boolean LoadGL(void)
\return if true, changed video mode
*/
static boolean first_init = false;
boolean OglSdlSurface(INT32 w, INT32 h)
{
INT32 cbpp = cv_scr_depth.value < 16 ? 16 : cv_scr_depth.value;
static boolean first_init = false;
const char *gllogdir = NULL;
oglflags = 0;
@@ -180,7 +181,6 @@ boolean OglSdlSurface(INT32 w, INT32 h)
#endif
#endif
}
first_init = true;
SDL_GL_SetSwapInterval(cv_vidwait.value ? 1 : 0);
@@ -214,9 +214,12 @@ boolean OglSdlSurface(INT32 w, INT32 h)
GLFramebuffer_Disable();
#endif
HWR_Startup();
if (!first_init)
HWR_Startup();
textureformatGL = cbpp > 16 ? GL_RGBA : GL_RGB5_A1;
first_init = true;
return true;
}