aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/UGraphic.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-25 09:07:50 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-25 09:07:50 +0000
commit1b294eb6cf1faaea874d5521f1d93f8d870180e6 (patch)
tree1140345abb83253da6323acd6b23963a246d5d2f /src/base/UGraphic.pas
parent27a354229f0522452d91b4e3c991659bbb46d32c (diff)
downloadusdx-1b294eb6cf1faaea874d5521f1d93f8d870180e6.tar.gz
usdx-1b294eb6cf1faaea874d5521f1d93f8d870180e6.tar.xz
usdx-1b294eb6cf1faaea874d5521f1d93f8d870180e6.zip
added Finalize3D finalization as opponent for Initialize3D and for a clean finalization
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2307 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base/UGraphic.pas')
-rw-r--r--src/base/UGraphic.pas16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/base/UGraphic.pas b/src/base/UGraphic.pas
index 33e862f2..d22744db 100644
--- a/src/base/UGraphic.pas
+++ b/src/base/UGraphic.pas
@@ -265,6 +265,7 @@ const
Skin_P2_ScoreL = 640;
procedure Initialize3D (Title: string);
+procedure Finalize3D;
procedure Reinitialize3D;
procedure SwapBuffers;
@@ -290,7 +291,13 @@ uses
procedure LoadFontTextures;
begin
Log.LogStatus('Building Fonts', 'LoadTextures');
- BuildFont;
+ BuildFonts;
+end;
+
+procedure UnloadFontTextures;
+begin
+ Log.LogStatus('Kill Fonts', 'UnloadFontTextures');
+ KillFonts;
end;
procedure LoadTextures;
@@ -599,6 +606,13 @@ begin
glMatrixMode(GL_MODELVIEW);
end;
+procedure Finalize3D;
+begin
+ // TODO: finalize other stuff
+ UnloadFontTextures;
+ SDL_QuitSubSystem(SDL_INIT_VIDEO);
+end;
+
procedure Reinitialize3D;
begin
InitializeScreen;