X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fsdl%2Fg_system.pas;h=c53a7b347596c44c4331497c94c7ee3a2cb524b0;hb=a78f3861cff615c3679e1f4a80403e48106100b6;hp=7593b02398811605b2981aed31267e8760e8a20c;hpb=c3750b33c7c32ef74637ae0f6be98974af391ab9;p=d2df-sdl.git diff --git a/src/game/sdl/g_system.pas b/src/game/sdl/g_system.pas index 7593b02..c53a7b3 100644 --- a/src/game/sdl/g_system.pas +++ b/src/game/sdl/g_system.pas @@ -103,7 +103,13 @@ implementation // store real window size in gWinSize, downscale resolution now w := round(w / r_pixel_scale); h := round(h / r_pixel_scale); - e_ResizeFramebuffer(w, h); + if not e_ResizeFramebuffer(w, h) then + begin + e_LogWriteln('GL: could not create framebuffer, falling back to --no-fbo'); + glRenderToFBO := False; + w := gWinSizeX; + h := gWinSizeY; + end; end; gScreenWidth := w; gScreenHeight := h; @@ -167,8 +173,6 @@ implementation procedure sys_Repaint; begin - if glRenderToFBO then - e_BlitFramebuffer(gWinSizeX, gWinSizeY); SDL_GL_SwapBuffers end;