Speed up slideshow loading
This commit is contained in:
1 parent
54f97a4928
commit
31863a7788
3 files changed
+7
-1
No files matched your search
@@ -453,6 +453,11 @@ namespace Vocaluxe.Base
|
|||||||
return CDraw.AddTexture(fileName);
|
return CDraw.AddTexture(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CTextureRef EnqueueTexture(string fileName)
|
||||||
|
{
|
||||||
|
return CDraw.EnqueueTexture(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
public void RemoveTexture(ref CTextureRef texture)
|
public void RemoveTexture(ref CTextureRef texture)
|
||||||
{
|
{
|
||||||
CDraw.RemoveTexture(ref texture);
|
CDraw.RemoveTexture(ref texture);
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ namespace VocaluxeLib
|
|||||||
void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight);
|
void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight);
|
||||||
|
|
||||||
CTextureRef AddTexture(string fileName);
|
CTextureRef AddTexture(string fileName);
|
||||||
|
CTextureRef EnqueueTexture(string fileName);
|
||||||
void RemoveTexture(ref CTextureRef texture);
|
void RemoveTexture(ref CTextureRef texture);
|
||||||
|
|
||||||
void DrawRect(SColorF color, SRectF rect);
|
void DrawRect(SColorF color, SRectF rect);
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ namespace VocaluxeLib.Menu
|
|||||||
_Theme.Type = EBackgroundTypes.SlideShow;
|
_Theme.Type = EBackgroundTypes.SlideShow;
|
||||||
if (!String.IsNullOrEmpty(image))
|
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)
|
if (texture != null)
|
||||||
_SlideShowTextures.Add(texture);
|
_SlideShowTextures.Add(texture);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user