diff --git a/port/fast3d/gfx_opengl.cpp b/port/fast3d/gfx_opengl.cpp index 31c8a1f6d..eb92631a7 100644 --- a/port/fast3d/gfx_opengl.cpp +++ b/port/fast3d/gfx_opengl.cpp @@ -921,7 +921,9 @@ static void gfx_opengl_init(void) { // maybe replace this with sysFatalError, though the GLSL compiler will cause that later anyway } - if (!gfx_opengl_supports_framebuffers()) { + if (!gfx_framebuffers_enabled) { + sysLogPrintf(LOG_WARNING, "GL: framebuffer effects disabled by user"); + } else if (!gfx_opengl_supports_framebuffers()) { sysLogPrintf(LOG_WARNING, "GL: GL_ARB_framebuffer_object unsupported, framebuffer effects disabled"); gfx_framebuffers_enabled = false; } diff --git a/port/fast3d/gfx_pc.cpp b/port/fast3d/gfx_pc.cpp index d8319040e..75efc026a 100644 --- a/port/fast3d/gfx_pc.cpp +++ b/port/fast3d/gfx_pc.cpp @@ -2688,6 +2688,11 @@ extern "C" void gfx_init(struct GfxWindowManagerAPI* wapi, struct GfxRenderingAP game_framebuffer = gfx_rapi->create_framebuffer(); game_framebuffer_msaa_resolved = gfx_rapi->create_framebuffer(); + if (gfx_msaa_level > 1 && !gfx_framebuffers_enabled) { + sysLogPrintf(LOG_WARNING, "F3D: MSAA set to %d, but framebuffers are not available; disabling", gfx_msaa_level); + gfx_msaa_level = 1; + } + for (int i = 0; i < 16; i++) { segmentPointers[i] = 0; } diff --git a/port/src/video.c b/port/src/video.c index c023524ae..48fbd4821 100644 --- a/port/src/video.c +++ b/port/src/video.c @@ -33,6 +33,8 @@ s32 videoInit(void) const s32 h = configGetInt("Video.DefaultHeight", 480); const bool fs = configGetInt("Video.DefaultFullscreen", false); + gfx_framebuffers_enabled = (bool)configGetIntClamped("Video.FramebufferEffects", 1, 0, 1); + gfx_msaa_level = configGetInt("Video.MSAA", 0); if (gfx_msaa_level < 1 || gfx_msaa_level > 16) { gfx_msaa_level = 1;