Game Development Reference
In-Depth Information
RemoveTexture(texture);
}
}
public void GenerateTexture(TextureHandle texture)
{
try
{
texture.Loaded = false;
switch (texture.Type)
{
case TextureHandleType.FileSystem:
{
texture.Image = _imageLoader.Load(texture.File.FullName);
break;
}
case TextureHandleType.RawData:
{
texture.Image = _imageLoader.Load(texture.Data);
break;
}
case TextureHandleType.Bitmap:
{
// Do nothing, data already there
break;
}
}
if (texture.Image != null)
{
texture.Loaded = true;
if (_cacheImages)
{
texture.Generate = false;
}
}
}
catch (System.OutOfMemoryException)
Search Nedrilad ::




Custom Search