summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e84299f)
raw | patch | inline | side by side (parent: e84299f)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 26 Mar 2023 12:20:54 +0000 (15:20 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 26 Mar 2023 12:20:54 +0000 (15:20 +0300) |
src/game/sdl/g_system.pas | patch | blob | history | |
src/game/sdl2/g_system.pas | patch | blob | history |
index cc8704c9713e76700e0da37c4cdc14c45f9d3d2f..9f562621fe8d1366775a56d3d78ffa7178e5860d 100644 (file)
(* --------- Graphics --------- *)
function LoadGL: Boolean;
- {$IFNDEF NOGL_INIT}
- var
- ltmp: Integer;
- {$ENDIF}
+ 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 SDL_GL_GetAttribute(SDL_GL_STENCIL_SIZE, @ltmp) = 0 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_LogWritefln('stencil buffer size: %s', [ltmp]);
gwin_has_stencil := (ltmp > 0);
end;
-
- if glRenderToFBO and (not Load_GL_ARB_framebuffer_object) then
- {$ENDIF}
- begin
- e_LogWriteln('GL: framebuffer objects not supported; disabling FBO rendering');
- glRenderToFBO := false;
- end;
end;
procedure FreeGL;
index b3005d56b637b464dfa8341f756ef63c12ba21f7..6f48d28bef982189e1b68bd9243f897eb723ce5f 100644 (file)
(* --------- Graphics --------- *)
function LoadGL: Boolean;
- {$IFNDEF NOGL_INIT}
- var
- ltmp: Integer;
- {$ENDIF}
+ 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
+ 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_LogWritefln('stencil buffer size: %s', [ltmp]);
gwin_has_stencil := (ltmp > 0);
end;
-
- if glRenderToFBO and (not Load_GL_ARB_framebuffer_object) then
- {$ENDIF}
- begin
- e_LogWriteln('GL: framebuffer objects not supported; disabling FBO rendering');
- glRenderToFBO := false;
- end;
end;
procedure FreeGL;