Unloading textures does not work in GC thread (yet)

This commit is contained in:
Flamefire committed 2013-05-02 00:05:57 +02:00
1 parent d95915ffb0
commit 9ca577e0da
4 files changed
+3 -7

No files matched your search

+2 -2
View File
@@ -128,8 +128,8 @@ namespace Vocaluxe.Base.Fonts
public void UnloadGlyphs() public void UnloadGlyphs()
{ {
//foreach (CGlyph glyph in _Glyphs.Values) foreach (CGlyph glyph in _Glyphs.Values)
// glyph.UnloadTexture(); glyph.UnloadTexture();
_Glyphs.Clear(); _Glyphs.Clear();
} }
-3
View File
@@ -418,9 +418,6 @@ namespace Vocaluxe.Base.Fonts
public static void UnloadThemeFonts(string themeName) public static void UnloadThemeFonts(string themeName)
{ {
if (_Fonts.Count == 0)
return;
int index = 0; int index = 0;
while (index < _Fonts.Count) while (index < _Fonts.Count)
{ {
+1 -1
View File
@@ -128,7 +128,7 @@ namespace Vocaluxe.Base.Fonts
CFonts.Height = oldHeight; CFonts.Height = oldHeight;
} }
~CGlyph() public void UnloadTexture()
{ {
CDraw.RemoveTexture(ref _Texture); CDraw.RemoveTexture(ref _Texture);
} }
-1
View File
@@ -20,7 +20,6 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using Vocaluxe.Base; using Vocaluxe.Base;
using Vocaluxe.Base.Fonts;
using VocaluxeLib.Menu; using VocaluxeLib.Menu;
namespace Vocaluxe.Screens namespace Vocaluxe.Screens