Revert disable CryRenderer changes and leave CryRendererNull running. Also delete CryRenderAtomShim
This commit is contained in:
@@ -247,7 +247,7 @@ CUNIXConsole* pUnixConsole;
|
||||
|
||||
#define LOCALIZATION_TRANSLATIONS_LIST_FILE_NAME "Libs/Localization/localization.xml"
|
||||
|
||||
#define LOAD_LEGACY_RENDERER_FOR_EDITOR false // If you set this to false you must for now also set 'ed_useAtomNativeViewport' to true (see /Code/Sandbox/Editor/ViewManager.cpp)
|
||||
#define LOAD_LEGACY_RENDERER_FOR_EDITOR true // If you set this to false you must for now also set 'ed_useAtomNativeViewport' to true (see /Code/Sandbox/Editor/ViewManager.cpp)
|
||||
#define LOAD_LEGACY_RENDERER_FOR_LAUNCHER false
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -131,80 +131,20 @@ 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)
|
||||
// {
|
||||
// // 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);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
for (const TextureEntry& entry : texturesFromFile)
|
||||
CTexture* pNewTexture = CTexture::ForName(entry.szFileName, entry.flags, eTF_Unknown);
|
||||
if (pNewTexture)
|
||||
{
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
m_texNoTexture = GetDefaultTexture("NoTexture");
|
||||
m_texNoTextureCM = GetDefaultTexture("NoTextureCM");
|
||||
|
||||
@@ -875,11 +875,7 @@ void EditorViewportWidget::OnBeginPrepareRender()
|
||||
fov = 2 * atanf((h * tan(fov / 2)) / maxTargetHeight);
|
||||
}
|
||||
}
|
||||
#if 1 // ATOMSHIM FIXUP
|
||||
m_Camera.SetFrustum(w, h, fov, fNearZ, 8000.0f);
|
||||
#else
|
||||
m_Camera.SetFrustum(w, h, fov, fNearZ, gEnv->p3DEngine->GetMaxViewDistance());
|
||||
#endif
|
||||
}
|
||||
|
||||
GetIEditor()->GetSystem()->SetViewCamera(m_Camera);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -550,7 +550,6 @@ void CMaterialManager::ReloadDirtyMaterials()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user