public void ActuallyLoadImage(bool checkForPrecompressed, bool fromBackEnd)
{
if(this.Disposed == true)
{
throw new ObjectDisposedException(this.GetType().Name);
}
// this is the ONLY place generatorFunction will ever be called
if(_generator != null)
{
_generator(this);
return;
}
//
// load the image from disk
//
if(_cubeFiles != Renderer.CubeFiles.TwoD)
{
idConsole.Warning("TODO: cube files");
/*byte *pics[6];
// we don't check for pre-compressed cube images currently
R_LoadCubeImages( imgName, cubeFiles, pics, &width, ×tamp );
if ( pics[0] == NULL ) {
common->Warning( "Couldn't load cube image: %s", imgName.c_str() );
MakeDefault();
return;
}
GenerateCubeImage( (const byte **)pics, width, filter, allowDownSize, depth );
precompressedFile = false;
for ( int i = 0 ; i < 6 ; i++ ) {
if ( pics[i] ) {
R_StaticFree( pics[i] );
}
}*/
}
else
{
_texture = idE.ImageManager.LoadImageProgram(this.Name, ref _timeStamp, ref _depth);
if(_texture == null)
{
idConsole.Warning("Couldn't load image: {0}", this.Name);
MakeDefault();
return;
}
_width = _texture.Width;
_height = _texture.Height;
}
}