Merge pull request #240 from aws-lumberyard-dev/DisableAtomShim

Delete CryRenderAtomShim, Atom is no longer reachable through Cry rendering interfaces
This commit is contained in:
rgba16f
2021-04-24 09:39:39 -05:00
committed by GitHub
45 changed files with 15 additions and 5475 deletions
+1 -1
View File
@@ -1294,7 +1294,7 @@ bool CSystem::OpenRenderLibrary(int type, const SSystemInitParams& initParams)
const char* libname = "";
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
libname = "CryRenderOther";
libname = DLL_RENDERER_NULL;
}
else if (type == R_DX9_RENDERER)
{
@@ -131,78 +131,18 @@ void CTextureManager::LoadDefaultTextures()
#endif
};
// Reduced list of default textures to load.
const TextureEntry texturesFromFileReduced[] =
for (const TextureEntry& entry : texturesFromFile)
{
{"NoTextureCM", "EngineAssets/TextureMsg/ReplaceMeCM.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"White", "EngineAssets/Textures/White.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"Gray", "EngineAssets/Textures/Grey.dds", FT_DONT_RELEASE | FT_DONT_STREAM },
{"Black", "EngineAssets/Textures/Black.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"BlackAlpha", "EngineAssets/Textures/BlackAlpha.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"BlackCM", "EngineAssets/Textures/BlackCM.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"FlatBump", "EngineAssets/Textures/White_ddn.tif", FT_DONT_RELEASE | FT_DONT_STREAM | FT_TEX_NORMAL_MAP },
{"AverageMemoryUsage", "EngineAssets/Icons/AverageMemoryUsage.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"LowMemoryUsage", "EngineAssets/Icons/LowMemoryUsage.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"HighMemoryUsage", "EngineAssets/Icons/HighMemoryUsage.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"LivePreview", "EngineAssets/Icons/LivePreview.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
#if !defined(_RELEASE)
{"NoTexture", "EngineAssets/TextureMsg/ReplaceMe.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"IconTextureCompiling", "EngineAssets/TextureMsg/TextureCompiling.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"IconTextureCompiling_a", "EngineAssets/TextureMsg/TextureCompiling_a.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"IconTextureCompiling_cm", "EngineAssets/TextureMsg/TextureCompiling_cm.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"IconTextureCompiling_ddn", "EngineAssets/TextureMsg/TextureCompiling_ddn.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"IconTextureCompiling_ddna", "EngineAssets/TextureMsg/TextureCompiling_ddna.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"DefaultMergedDetail", "EngineAssets/Textures/GreyAlpha.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"MipMapDebug", "EngineAssets/TextureMsg/MipMapDebug.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorBlue", "EngineAssets/TextureMsg/color_Blue.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorCyan", "EngineAssets/TextureMsg/color_Cyan.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorGreen", "EngineAssets/TextureMsg/color_Green.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorPurple", "EngineAssets/TextureMsg/color_Purple.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorRed", "EngineAssets/TextureMsg/color_Red.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorWhite", "EngineAssets/TextureMsg/color_White.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorYellow", "EngineAssets/TextureMsg/color_Yellow.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorOrange", "EngineAssets/TextureMsg/color_Orange.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorMagenta", "EngineAssets/TextureMsg/color_Magenta.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
#else
{"NoTexture", "EngineAssets/TextureMsg/ReplaceMeRelease.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
#endif
};
// Loop over the appropriate texture list and load the textures, storing them in a map keyed by texture name.
// Use reduced subset of textures for Other.
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
for (const TextureEntry& entry : texturesFromFileReduced)
CTexture* pNewTexture = CTexture::ForName(entry.szFileName, entry.flags, eTF_Unknown);
if (pNewTexture)
{
// Use EF_LoadTexture rather than CTexture::ForName
CTexture* pNewTexture = static_cast<CTexture*>(gEnv->pRenderer->EF_LoadTexture(entry.szFileName, entry.flags));
if (pNewTexture)
{
CCryNameTSCRC texEntry(entry.szTextureName);
m_DefaultTextures[texEntry] = pNewTexture;
}
else
{
AZ_Assert(false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
AZ_Warning("[Shaders System]", false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
}
CCryNameTSCRC texEntry(entry.szTextureName);
m_DefaultTextures[texEntry] = pNewTexture;
}
}
else
{
for (const TextureEntry& entry : texturesFromFile)
else
{
CTexture* pNewTexture = CTexture::ForName(entry.szFileName, entry.flags, eTF_Unknown);
if (pNewTexture)
{
CCryNameTSCRC texEntry(entry.szTextureName);
m_DefaultTextures[texEntry] = pNewTexture;
}
else
{
AZ_Assert(false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
AZ_Warning("[Shaders System]", false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
}
AZ_Assert(false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
AZ_Warning("[Shaders System]", false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
}
}
@@ -9,17 +9,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
if (LY_MONOLITHIC_GAME) # only Atom is supported in monolithic
set(LY_BUILD_DEPENDENCIES
PUBLIC
Legacy::CryRenderOther
)
else()
set(LY_BUILD_DEPENDENCIES
PRIVATE
Legacy::CryRenderD3D11
)
endif()
set(LY_BUILD_DEPENDENCIES
PRIVATE
Legacy::CryRenderD3D11
)
set(ICON_FILE ${project_real_path}/Gem/Resources/GameSDK.ico)
if(NOT EXISTS ${ICON_FILE})
@@ -886,7 +886,6 @@ void EditorViewportWidget::OnBeginPrepareRender()
fov = 2 * atanf((h * tan(fov / 2)) / maxTargetHeight);
}
}
m_Camera.SetFrustum(w, h, fov, fNearZ, gEnv->p3DEngine->GetMaxViewDistance());
}
@@ -550,7 +550,6 @@ void CMaterialManager::ReloadDirtyMaterials()
}
}
}
}
//////////////////////////////////////////////////////////////////////////
@@ -11,5 +11,5 @@
set(LY_BUILD_DEPENDENCIES
PRIVATE
Legacy::CryRenderD3D11
)
Legacy::CryRenderNULL
)