DEADSOFTWARE

gl: print opengl driver info
[d2df-sdl.git] / src / game / renders / opengl / r_loadscreen.pas
index 8b9ce80ed5a845ddf065781df866499e1782e0ee..d95d3a475ff26184f36d504676683503269f8157 100644 (file)
@@ -31,11 +31,7 @@ interface
 implementation
 
   uses
-    {$IFDEF USE_GLES1}
-      GLES11,
-    {$ELSE}
-      GL, GLEXT,
-    {$ENDIF}
+    {$I ../../../nogl/noGLuses.inc}
     {$IFDEF ENABLE_SYSTEM}
       g_system,
     {$ENDIF}
@@ -63,18 +59,18 @@ implementation
 
   procedure r_LoadScreen_Load;
   begin
-    BarL := r_Textures_LoadFromFile(GameWAD + ':TEXTURES/LLEFT');
-    BarM := r_Textures_LoadFromFile(GameWAD + ':TEXTURES/LMIDDLE');
-    BarR := r_Textures_LoadFromFile(GameWAD + ':TEXTURES/LRIGHT');
-    BarF := r_Textures_LoadFromFile(GameWAD + ':TEXTURES/LMARKER');
+    BarL := r_Textures_LoadFromFile(GameWAD + ':TEXTURES/LLEFT', [TGLHints.txNoRepeat]);
+    BarM := r_Textures_LoadFromFile(GameWAD + ':TEXTURES/LMIDDLE', []);
+    BarR := r_Textures_LoadFromFile(GameWAD + ':TEXTURES/LRIGHT', [TGLHints.txNoRepeat]);
+    BarF := r_Textures_LoadFromFile(GameWAD + ':TEXTURES/LMARKER', []);
   end;
 
   procedure r_LoadScreen_Free;
   begin
-    BarL.Free;
-    BarM.Free;
-    BarR.Free;
-    BarF.Free;
+    r_Common_FreeAndNil(BarL);
+    r_Common_FreeAndNil(BarM);
+    r_Common_FreeAndNil(BarR);
+    r_Common_FreeAndNil(BarF);
   end;
 
   procedure r_LoadScreen_DrawLoadingBar (x0, x1, y, val, maxval: Integer);
@@ -142,9 +138,9 @@ implementation
       xx := gScreenWidth div 3;
       yy := gScreenHeight div 3;
       hh := gScreenHeight - yy - 96;
-      r_Draw_Setup(gScreenWidth, gScreenHeight);
+      r_Draw_Setup(gWinSizeX, gWinSizeY, gScreenWidth, gScreenHeight);
       glClearColor(0.0, 0.0, 0.0, 0.0);
-      glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
+      glClear(GL_COLOR_BUFFER_BIT);
       r_Common_DrawBackground(GameWad + ':TEXTURES/INTER');
       r_Draw_FillRect(0, 0, gScreenWidth - 1, gScreenHeight - 1, 0, 0, 0, 105);
       if menufont <> nil then