increase land tex size to 512, which is the current minimum required just to load a hat. On my system max fps rose from 840 to 890 - about 6% change.
authornemo
Mon, 14 Nov 2011 22:38:24 -0500
changeset 6383 c34a8b98d78c
parent 6382 0e76c5cd4250
child 6384 8b7e8ff1b16a
increase land tex size to 512, which is the current minimum required just to load a hat. On my system max fps rose from 840 to 890 - about 6% change. also a nil check, probably not needed.
hedgewars/uCaptions.pas
hedgewars/uLandTexture.pas
--- a/hedgewars/uCaptions.pas	Tue Nov 15 02:02:08 2011 +0100
+++ b/hedgewars/uCaptions.pas	Mon Nov 14 22:38:24 2011 -0500
@@ -71,7 +71,8 @@
 for Group:= Low(TCapGroup) to High(TCapGroup) do
     begin
     FreeTexture(Captions[Group].Tex);
-    Captions[Group].Tex:= RenderStringTex(Captions[Group].Text, Captions[Group].Color, fntBig)
+    if Captions[Group].Text <> '' then
+        Captions[Group].Tex:= RenderStringTex(Captions[Group].Text, Captions[Group].Color, fntBig)
     end
 end;
 
@@ -108,8 +109,7 @@
 end;
 
 procedure freeModule;
-var
-    group: TCapGroup;
+var group: TCapGroup;
 begin
     for group:= Low(TCapGroup) to High(TCapGroup) do
         begin
--- a/hedgewars/uLandTexture.pas	Tue Nov 15 02:02:08 2011 +0100
+++ b/hedgewars/uLandTexture.pas	Mon Nov 14 22:38:24 2011 -0500
@@ -31,7 +31,7 @@
 implementation
 uses uConsts, GLunit, uTypes, uVariables, uTextures, uDebug, uRender;
 
-const TEXSIZE = 256;
+const TEXSIZE = 512;
 
 type TLandRecord = record
             shouldUpdate: boolean;