X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fsdl%2Fg_system.pas;h=9f562621fe8d1366775a56d3d78ffa7178e5860d;hb=8769066a9aa4f618a3a508b5aaca284ae85545af;hp=0fcad1aec0afa596a05959c9388e5de33f7ff502;hpb=e2b934c614ee1cc235e632a368576804f8c4f2b4;p=d2df-sdl.git diff --git a/src/game/sdl/g_system.pas b/src/game/sdl/g_system.pas index 0fcad1a..9f56262 100644 --- a/src/game/sdl/g_system.pas +++ b/src/game/sdl/g_system.pas @@ -78,17 +78,27 @@ implementation (* --------- Graphics --------- *) function LoadGL: Boolean; + var ltmp: Integer; begin result := true; {$IFDEF NOGL_INIT} - nogl_Init; - if glRenderToFBO and (not nogl_ExtensionSupported('GL_OES_framebuffer_object')) then + nogl_Init; + if glRenderToFBO and (not nogl_ExtensionSupported('GL_OES_framebuffer_object')) then + begin + e_LogWriteln('GL: framebuffer objects not supported; disabling FBO rendering'); + glRenderToFBO := false; + end; {$ELSE} - if glRenderToFBO and (not Load_GL_ARB_framebuffer_object) then + if glRenderToFBO and (not Load_GL_ARB_framebuffer_object) then + begin + e_LogWriteln('GL: framebuffer objects not supported; disabling FBO rendering'); + glRenderToFBO := false; + end; {$ENDIF} + if SDL_GL_GetAttribute(SDL_GL_STENCIL_SIZE, ltmp) = 0 then begin - e_LogWriteln('GL: framebuffer objects not supported; disabling FBO rendering'); - glRenderToFBO := false; + e_LogWritefln('stencil buffer size: %s', [ltmp]); + gwin_has_stencil := (ltmp > 0); end; end;