DEADSOFTWARE

system: remove unused imports
[d2df-sdl.git] / src / game / sdl2 / g_system.pas
index 5468afb36645a728039d44582cae616022672cf9..026d7854d9de8ba348abb34ead345358523bf890 100644 (file)
@@ -45,12 +45,12 @@ implementation
 
   uses
     SysUtils, SDL2, Math, ctypes,
-    e_log, r_graphics, e_input, e_sound,
-    {$INCLUDE ../nogl/noGLuses.inc}
+    e_log, e_input, e_sound,
     {$IFDEF ENABLE_HOLMES}
-      g_holmes, sdlcarcass, fui_ctls,
+      sdlcarcass,
     {$ENDIF}
-    g_touch, g_options, g_console, g_game, g_menu, g_gui, g_basic;
+    g_touch, g_options, g_console, g_game, g_basic
+  ;
 
   const
     GameTitle = 'Doom 2D: Forever (SDL 2, %s)';
@@ -78,28 +78,6 @@ implementation
 
   (* --------- Graphics --------- *)
 
-  function LoadGL: Boolean;
-  begin
-    result := true;
-    {$IFDEF NOGL_INIT}
-    nogl_Init;
-    if glRenderToFBO and (not nogl_ExtensionSupported('GL_OES_framebuffer_object')) then
-    {$ELSE}
-    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;
-  begin
-    {$IFDEF NOGL_INIT}
-    nogl_Quit();
-    {$ENDIF}
-  end;
-
   function GetTitle (): PChar;
     var info: AnsiString;
   begin
@@ -150,12 +128,6 @@ implementation
         context := SDL_GL_CreateContext(window);
         if context <> nil then
         begin
-          if not LoadGL then
-          begin
-            e_LogWriteln('GL: unable to load OpenGL functions', TMsgType.Fatal);
-            SDL_GL_DeleteContext(context); context := nil;
-            exit;
-          end;
           if (fullscreen = false) and (maximized = false) and (wc = false) then
           begin
             SDL_GetWindowPosition(window, @x, @y);
@@ -559,7 +531,6 @@ implementation
     e_WriteLog('Releasing SDL2', TMsgType.Notify);
     if context <> nil then
     begin
-      FreeGL;
       SDL_GL_DeleteContext(context);
       context := nil;
     end;