asset load flow work

add reloading state to asset tracking,
convert most asset.isnull() checks on over to skipping out unless the errcode is ::Ok, or ::UsingFallback
add more errstriongcodes to hook up
skip load<type> execution if the asset loaded state is ::Ok
This commit is contained in:
AzaezelX 2023-10-08 13:19:43 -05:00
parent 753cbe32d9
commit b710a309bd
23 changed files with 177 additions and 35 deletions

View file

@ -352,8 +352,8 @@ bool VolumetricFog::setShapeAsset(const StringTableEntry shapeAssetId)
bool VolumetricFog::LoadShape()
{
GFXPrimitiveType GFXdrawTypes[] = { GFXTriangleList, GFXTriangleStrip };
if (mShapeAsset.isNull())
U32 assetStatus = ShapeAsset::getAssetErrCode(mShapeAsset);
if (assetStatus != AssetBase::Ok && assetStatus != AssetBase::UsingFallback)
{
Con::errorf("[VolumetricFog] Failed to load shape asset.");
return false;
@ -1217,9 +1217,11 @@ void VolumetricFog::InitTexture()
{
mIsTextured = false;
if (mTextureAsset.isNull())
U32 assetStatus = ImageAsset::getAssetErrCode(mTextureAsset);
if (assetStatus != AssetBase::Ok && assetStatus != AssetBase::UsingFallback)
{
return;
}
if (!mTexture.isNull())
{
mIsTextured = true;