mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-19 16:21:11 +00:00
Fixed reloading of images after bakeEnvironmentProbes
This commit is contained in:
parent
1870c57308
commit
5a24940e08
4 changed files with 19 additions and 17 deletions
|
@ -513,8 +513,6 @@ void idImage::ActuallyLoadImage( bool fromBackEnd )
|
|||
idLib::Warning( "Couldn't load image: %s : %s", GetName(), generatedName.c_str() );
|
||||
|
||||
// create a default so it doesn't get continuously reloaded
|
||||
defaulted = true; // RB
|
||||
|
||||
opts.width = 8;
|
||||
opts.height = 8;
|
||||
opts.numLevels = 1;
|
||||
|
@ -529,6 +527,7 @@ void idImage::ActuallyLoadImage( bool fromBackEnd )
|
|||
SubImageUpload( level, 0, 0, 0, opts.width >> level, opts.height >> level, clear.Ptr() );
|
||||
}
|
||||
|
||||
defaulted = true; // RB
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -881,6 +881,9 @@ void idImage::PurgeImage()
|
|||
glcontext.tmu[i].current2DArray = TEXTURE_NOT_LOADED;
|
||||
glcontext.tmu[i].currentCubeMap = TEXTURE_NOT_LOADED;
|
||||
}
|
||||
|
||||
// reset for reloading images
|
||||
defaulted = false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1142,8 +1142,8 @@ CONSOLE_COMMAND( bakeEnvironmentProbes, "Bake environment probes", NULL )
|
|||
continue;
|
||||
}
|
||||
|
||||
def->irradianceImage->Reload( false );
|
||||
def->radianceImage->Reload( false );
|
||||
def->irradianceImage->Reload( true );
|
||||
def->radianceImage->Reload( true );
|
||||
}
|
||||
|
||||
idLib::Printf( "----------------------------------\n" );
|
||||
|
|
|
@ -421,7 +421,7 @@ void idRenderWorldLocal::LoadLightGridImages()
|
|||
}
|
||||
else
|
||||
{
|
||||
area->lightGrid.irradianceImage->Reload( false );
|
||||
area->lightGrid.irradianceImage->Reload( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1029,18 +1029,6 @@ CONSOLE_COMMAND( bakeLightGrids, "Bake irradiance/vis light grid data", NULL )
|
|||
int blends;
|
||||
int captureSize;
|
||||
|
||||
if( !tr.primaryWorld )
|
||||
{
|
||||
idLib::Printf( "No primary world loaded.\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
if( !tr.primaryView )
|
||||
{
|
||||
idLib::Printf( "No primary view.\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
int limit = MAX_AREA_LIGHTGRID_POINTS;
|
||||
int bounces = 1;
|
||||
idVec3 gridSize = defaultLightGridSize;
|
||||
|
@ -1102,6 +1090,18 @@ CONSOLE_COMMAND( bakeLightGrids, "Bake irradiance/vis light grid data", NULL )
|
|||
return;
|
||||
}
|
||||
|
||||
if( !tr.primaryWorld )
|
||||
{
|
||||
idLib::Printf( "No primary world loaded.\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
if( !tr.primaryView )
|
||||
{
|
||||
idLib::Printf( "No primary view.\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
int sysWidth = renderSystem->GetWidth();
|
||||
int sysHeight = renderSystem->GetHeight();
|
||||
|
||||
|
|
Loading…
Reference in a new issue