dont always call HWR_Startup again
This commit is contained in:
1 parent
8a0129df6a
commit
b83016f492
2 files changed
+10
-5
No files matched your search
@@ -263,7 +263,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();
|
||||
@@ -5468,7 +5469,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
@@ -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;
|
||||
|
||||
if (cv_vidwait.value)
|
||||
{
|
||||
@@ -227,9 +227,12 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
}
|
||||
#endif
|
||||
|
||||
HWR_Startup();
|
||||
if (!first_init)
|
||||
HWR_Startup();
|
||||
textureformatGL = cbpp > 16 ? GL_RGBA : GL_RGB5_A1;
|
||||
|
||||
first_init = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user