fix nofbocompile

This commit is contained in:
Alug committed 2025-01-17 21:42:19 +01:00
1 parent d6579a9e6d
commit fe598266e3
3 files changed
+10 -2

No files matched your search

+4 -1
View File
@@ -2027,9 +2027,10 @@ static boolean GL_Shader_CompileProgram(gl_shader_t *shader, GLint i)
UNIFORM_1(shader->uniforms[gluniform_palette_tex], 2, pglUniform1i);
UNIFORM_1(shader->uniforms[gluniform_palette_lookup_tex], 1, pglUniform1i);
UNIFORM_1(shader->uniforms[gluniform_lighttable_tex], 2, pglUniform1i);
#ifdef USE_FBO_OGL
// supersampling crap
UNIFORM_2(shader->uniforms[gluniform_inv_supersamplefactor], InvSupersampleFactorX, InvSupersampleFactorY, pglUniform2f);
#endif
// restore gl shader state
pglUseProgram(gl_shaderstate.program);
@@ -3335,9 +3336,11 @@ void GL_DrawScreenFinalTexture(int tex, INT32 width, INT32 height, boolean usesh
{
// godawful but you can only ever run ONE shader per renderpass and since i dont want to draw an extra screen texture when you downsample from higher resolution
// so i combined the palette postprocess with this crap
#ifdef USE_FBO_OGL
if (fbo_shader)
pglUseProgram(gl_shaders[SHADER_DOWNSAMPLE].program);
else
#endif
pglUseProgram(gl_shaders[SHADER_PALETTE_POSTPROCESS].program); // palette postprocess shader
}
+2 -1
View File
@@ -133,8 +133,9 @@ static void Impl_SetVsync(void);
static INT32 desktopwidth = 0, desktopheight = 0;
static void I_CheckDesktopRes(void);
#ifdef USE_FBO_OGL
static void I_ResetFBOSurface(void);
#endif
// synchronize page flipping with screen refresh
consvar_t cv_vidwait = {"vid_wait", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, Impl_SetVsync, 0, NULL, NULL, 0, 0, NULL};
static consvar_t cv_stretch = {"stretch", "Off", CV_SAVE|CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
+4
View File
@@ -287,7 +287,11 @@ void OglSdlFinishUpdate(boolean waitvbl)
fbo_shader = false;
#endif
#ifdef USE_FBO_OGL
GL_DrawScreenFinalTexture(HWD_SCREENTEXTURE_GENERIC2, sdlw, sdlh, (HWR_ShouldUsePaletteRendering() || fbo_shader));
#else
GL_DrawScreenFinalTexture(HWD_SCREENTEXTURE_GENERIC2, sdlw, sdlh, HWR_ShouldUsePaletteRendering());
#endif
#ifdef USE_FBO_OGL
if (usefbo)