aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/TextGL.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-28 19:31:17 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-28 19:31:17 +0000
commit4025ea3e81b0d2ec4492f3a0b3e374ce1568bdf5 (patch)
treeaf5094d7048b3c03c690b11a2bc5e166a444fd9a /src/base/TextGL.pas
parentcf4e5393ccee3af7d592c680ecf7c22f7bc4a4be (diff)
downloadusdx-4025ea3e81b0d2ec4492f3a0b3e374ce1568bdf5.tar.gz
usdx-4025ea3e81b0d2ec4492f3a0b3e374ce1568bdf5.tar.xz
usdx-4025ea3e81b0d2ec4492f3a0b3e374ce1568bdf5.zip
switch UseFreetype added to toggle between bitmap-font and freetype font
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1484 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base/TextGL.pas')
-rw-r--r--src/base/TextGL.pas29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/base/TextGL.pas b/src/base/TextGL.pas
index 57f3d6f5..11bbd52b 100644
--- a/src/base/TextGL.pas
+++ b/src/base/TextGL.pas
@@ -33,6 +33,11 @@ interface
{$I switches.inc}
+// as long as the transition to freetype is not finished
+// use the old implementation
+{$IFDEF UseFreetype}
+ {$INCLUDE TextGLFreetype.pas}
+{$ELSE}
uses
gl,
SDL,
@@ -51,7 +56,6 @@ procedure SetFontStyle(Style: integer); // sets active font style (normal,
procedure SetFontItalic(Enable: boolean); // sets italic type letter (works for all fonts)
procedure SetFontAspectW(Aspect: real);
procedure SetFontReflection(Enable:boolean;Spacing: real); // enables/disables text reflection
-procedure SetFontBlend(Enable: boolean); // enables/disables blending
//function NextPowerOfTwo(Value: integer): integer;
// Checks if the ttf exists, if yes then a SDL_ttf is returned
@@ -81,7 +85,6 @@ type
Italic: boolean;
Reflection: boolean;
ReflectionSpacing: real;
- Blend: boolean;
end;
@@ -191,10 +194,6 @@ begin
// close ini-file
FontIni.Free;
-
- // enable blending by default
- for Count := 0 to High(Fonts) do
- Fonts[Count].Blend := true;
end;
// Deletes the font
@@ -262,11 +261,8 @@ begin
else
XItal := 12;
- if (Font.Blend) then
- begin
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- end;
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, Tex.TexNum);
@@ -310,8 +306,7 @@ begin
end; // reflection
glDisable(GL_TEXTURE_2D);
- if (Font.Blend) then
- glDisable(GL_BLEND);
+ glDisable(GL_BLEND);
Tex.X := Tex.X + Tex.W;
@@ -382,9 +377,7 @@ begin
Fonts[ActFont].ReflectionSpacing := Spacing;
end;
-procedure SetFontBlend(Enable: boolean);
-begin
- Fonts[ActFont].Blend := Enable;
-end;
-
end.
+
+{$ENDIF}
+