First pass to remove AtomShim

Removed CryRenderAtomShim folder from Gems/AtomLyIntegration/CMakeLists.txt
Set LOAD_LEGACY_RENDERER_FOR_EDITOR to false
This commit is contained in:
rgba16f
2021-04-20 11:58:55 -05:00
parent 568b31cf1c
commit 9de6bdcf2b
6 changed files with 35 additions and 37 deletions
+2 -2
View File
@@ -247,7 +247,7 @@ CUNIXConsole* pUnixConsole;
#define LOCALIZATION_TRANSLATIONS_LIST_FILE_NAME "Libs/Localization/localization.xml"
#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_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_LAUNCHER false
//////////////////////////////////////////////////////////////////////////
@@ -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)
{
@@ -170,26 +170,26 @@ void CTextureManager::LoadDefaultTextures()
// 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
{
//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);
@@ -204,7 +204,7 @@ void CTextureManager::LoadDefaultTextures()
AZ_Warning("[Shaders System]", false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
}
}
}
//}
m_texNoTexture = GetDefaultTexture("NoTexture");
m_texNoTextureCM = GetDefaultTexture("NoTextureCM");
@@ -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})
+6 -1
View File
@@ -874,8 +874,11 @@ 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);
@@ -906,7 +909,9 @@ void EditorViewportWidget::OnBeginPrepareRender()
PostWidgetRendering();
#if 0 // ATOMSHIM FIXUP
if (!m_renderer->IsStereoEnabled())
#endif
{
GetIEditor()->GetSystem()->RenderStatistics();
}
@@ -11,5 +11,5 @@
set(LY_BUILD_DEPENDENCIES
PRIVATE
Legacy::CryRenderD3D11
Legacy::CryRenderNULL
)
+1 -1
View File
@@ -15,5 +15,5 @@ add_subdirectory(AtomImGuiTools)
add_subdirectory(EMotionFXAtom)
add_subdirectory(AtomFont)
add_subdirectory(TechnicalArt)
add_subdirectory(CryRenderAtomShim)
#add_subdirectory(CryRenderAtomShim)
add_subdirectory(AtomBridge)