Speed up slideshow loading

This commit is contained in:
Flamefire committed 2014-10-04 11:15:37 +02:00
1 parent 54f97a4928
commit 31863a7788
3 files changed
+7 -1

No files matched your search

+5
View File
@@ -453,6 +453,11 @@ namespace Vocaluxe.Base
return CDraw.AddTexture(fileName);
}
public CTextureRef EnqueueTexture(string fileName)
{
return CDraw.EnqueueTexture(fileName);
}
public void RemoveTexture(ref CTextureRef texture)
{
CDraw.RemoveTexture(ref texture);
+1
View File
@@ -151,6 +151,7 @@ namespace VocaluxeLib
void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight);
CTextureRef AddTexture(string fileName);
CTextureRef EnqueueTexture(string fileName);
void RemoveTexture(ref CTextureRef texture);
void DrawRect(SColorF color, SRectF rect);
+1 -1
View File
@@ -189,7 +189,7 @@ namespace VocaluxeLib.Menu
_Theme.Type = EBackgroundTypes.SlideShow;
if (!String.IsNullOrEmpty(image))
{
CTextureRef texture = CBase.Drawing.AddTexture(image);
CTextureRef texture = _SlideShowTextures.Count == 0 ? CBase.Drawing.AddTexture(image) : CBase.Drawing.EnqueueTexture(image);
if (texture != null)
_SlideShowTextures.Add(texture);
}