diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 76fdae910..07a19c8a4 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -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 } diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 6be60d6b9..2eaa9741a 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -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}; diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index 3c7834c3d..1c92629b5 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -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)