From: fgsfds Date: Tue, 18 Feb 2020 22:15:08 +0000 (+0300) Subject: default to using FBO; can be disabled via command line X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=939a343cdc93545211b37de24e9d406bf54dcaf0;p=d2df-sdl.git default to using FBO; can be disabled via command line --- diff --git a/src/game/g_main.pas b/src/game/g_main.pas index 6e393b2..ab6e1d8 100644 --- a/src/game/g_main.pas +++ b/src/game/g_main.pas @@ -438,10 +438,9 @@ begin {$ENDIF} for i := 1 to ParamCount do begin - if (ParamStr(i) = '--con-stdout') then - begin - conbufDumpToStdOut := true; - break + case ParamStr(i) of + '--con-stdout': conbufDumpToStdOut := true; + '--no-fbo': glRenderToFBO := false; end end; diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 706ca33..e89521d 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -815,7 +815,6 @@ initialization conRegVar('r_vsync', @gVSync, '', ''); conRegVar('r_texfilter', @gTextureFilter, '', ''); conRegVar('r_npot', @glNPOTOverride, '', ''); - conRegVar('r_fbo', @glRenderToFBO, '', ''); (* Sound *) conRegVar('s_nosound', @gNoSound, '', ''); diff --git a/src/game/sdl/g_system.pas b/src/game/sdl/g_system.pas index a4cbe64..bba2cae 100644 --- a/src/game/sdl/g_system.pas +++ b/src/game/sdl/g_system.pas @@ -127,9 +127,9 @@ implementation begin {$IFDEF NOGL_INIT} nogl_Init; - if (not nogl_ExtensionSupported('GL_OES_framebuffer_object')) and glRenderToFBO then + if glRenderToFBO and (not nogl_ExtensionSupported('GL_OES_framebuffer_object')) then {$ELSE} - if (not Load_GL_ARB_framebuffer_object()) and glRenderToFBO then + if glRenderToFBO and (not Load_GL_ARB_framebuffer_object()) then {$ENDIF} begin e_LogWriteln('SDL: no framebuffer object support detected'); diff --git a/src/game/sdl2/g_system.pas b/src/game/sdl2/g_system.pas index e4bd070..29a81b0 100644 --- a/src/game/sdl2/g_system.pas +++ b/src/game/sdl2/g_system.pas @@ -158,9 +158,9 @@ implementation begin {$IFDEF NOGL_INIT} nogl_Init; - if (not nogl_ExtensionSupported('GL_OES_framebuffer_object')) and glRenderToFBO then + if glRenderToFBO and (not nogl_ExtensionSupported('GL_OES_framebuffer_object')) then {$ELSE} - if (not Load_GL_ARB_framebuffer_object()) and glRenderToFBO then + if glRenderToFBO and (not Load_GL_ARB_framebuffer_object()) then {$ENDIF} begin e_LogWriteln('SDL: no framebuffer object support detected');