DEADSOFTWARE

Fix textures with nanoGL, disable particles with nanoGL and comment regressions with...
[d2df-sdl.git] / src / game / g_gfx.pas
index 9eb3c04dfca5c45ea5219031e1b1364c214b488a..0f26212b29ce8f21c066bb80299f4c395011bfbe 100644 (file)
@@ -1,4 +1,4 @@
-(* Copyright (C)  DooM 2D:Forever Developers
+(* Copyright (C)  Doom 2D: Forever Developers
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -78,7 +78,12 @@ function awmIsSetHolmes (x, y: Integer): Boolean; inline;
 implementation
 
 uses
-  g_map, g_panel, g_basic, Math, e_graphics, GL, GLExt,
+{$IFDEF USE_NANOGL}
+  nanoGL,
+{$ELSE}
+  GL, GLExt,
+{$ENDIF}
+  g_map, g_panel, g_basic, Math, e_graphics,
   g_options, g_console, SysUtils, g_triggers, MAPDEF,
   g_game, g_language, g_net, utils, xprofiler;
 
@@ -1464,6 +1469,9 @@ procedure g_GFX_SetMax (count: Integer);
 var
   a: Integer;
 begin
+{$IFDEF USE_NANOGL} // FIXIT: nanoGL doesn't support glBegin(GL_POINTS)
+  count := 0;
+{$ENDIF}
   if count > 50000 then count := 50000;
   if (count < 1) then count := 1;
   SetLength(Particles, count);
@@ -1627,7 +1635,10 @@ begin
   if (Particles <> nil) then
   begin
     glDisable(GL_TEXTURE_2D);
-    glPointSize(2);
+         if (g_dbg_scale < 0.6) then glPointSize(1)
+    else if (g_dbg_scale > 1.3) then glPointSize(g_dbg_scale+1)
+    else glPointSize(2);
+    glDisable(GL_POINT_SMOOTH);
 
     glEnable(GL_BLEND);
     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);