Red code legacy renderer (#383)

- Remove some references to gEnv->pRenderer/GetIEditor()->GetRenderer() that is now always null.
- Restore the debug console to existence.
- Stop building the following in preparation for their removal:

Code/CryEngine/Cry3DEngine/*
Code/CryEngine/RenderDll/*
Code/Tools/CryFXC/*
Code/Tools/HLSLCrossCompiler/*
Code/Tools/HLSLCrossCompilerMETAL/*
Code/Tools/RC/*
Code/Tools/ShaderCacheGen/*
Tools/CrySCompileServer/*
This commit is contained in:
bosnichd
2021-04-30 07:31:42 -06:00
committed by GitHub
parent aa5ddbf532
commit 1d4c483e73
39 changed files with 1826 additions and 267 deletions
-2
View File
@@ -9,8 +9,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
add_subdirectory(Cry3DEngine)
add_subdirectory(CryCommon)
add_subdirectory(CryFont)
add_subdirectory(CrySystem)
add_subdirectory(RenderDll)
+1 -1
View File
@@ -19,7 +19,7 @@
#if defined(USE_GEOM_CACHES)
#include "../RenderDll/Common/Shaders/Vertex.h"
#include <Vertex.h>
#include <CryCommon/StaticInstance.h>
class CREGeomCache
+1 -1
View File
@@ -17,7 +17,7 @@
//=============================================================
#include "VertexFormats.h"
#include "../RenderDll/Common/Shaders/Vertex.h"
#include <Vertex.h>
struct SSkyLightRenderParams;
+1 -1
View File
@@ -22,7 +22,7 @@
#include <CrySizer.h>
#include <Cry_Geo.h> // for AABB
#include <VertexFormats.h>
#include <../RenderDll/Common/Shaders/Vertex.h>
#include <Vertex.h>
#include <AzCore/Casting/numeric_cast.h>
// Description:
+1 -1
View File
@@ -26,7 +26,7 @@
#include "smartptr.h"
#include <IFlares.h> // <> required for Interfuscator
#include "VertexFormats.h"
#include <RenderDll/Common/Shaders/Vertex.h>
#include <Vertex.h>
#include <AzCore/Casting/numeric_cast.h>
#include <AzCore/std/containers/map.h>
File diff suppressed because it is too large Load Diff
-2
View File
@@ -60,8 +60,6 @@ ly_add_target(
Legacy::CrySystem.XMLBinary
Legacy::RemoteConsoleCore
AZ::AzFramework
RUNTIME_DEPENDENCIES
Legacy::Cry3DEngine
)
ly_add_source_properties(
@@ -14,14 +14,3 @@
# NOTE: functions in cmake are global, therefore adding functions to this file
# is being avoided to prevent overriding functions declared in other targets platfrom
# specific cmake files
if (LY_MONOLITHIC_GAME) # Only Atom is supported in monolithic builds
set(LY_BUILD_DEPENDENCIES
PUBLIC
Legacy::CryRenderOther
)
else()
set(LY_RUNTIME_DEPENDENCIES
Legacy::CryRenderMetal
)
endif()
-71
View File
@@ -58,75 +58,6 @@
extern CMTSafeHeap* g_pPakHeap;
#if defined(AZ_PLATFORM_ANDROID)
#include <AzCore/Android/Utils.h>
#elif defined(AZ_PLATFORM_IOS)
#if defined(AZ_MONOLITHIC_BUILD)
extern bool UIKitGetPrimaryPhysicalDisplayDimensions(int& o_widthPixels, int& o_heightPixels);
#else
using NativeScreenType = UIScreen;
using NativeWindowType = UIWindow;
////////////////////////////////////////////////////////////////////////////////
bool UIKitGetPrimaryPhysicalDisplayDimensions(int& o_widthPixels, int& o_heightPixels)
{
NativeScreenType* nativeScreen = [NativeScreenType mainScreen];
CGRect screenBounds = [nativeScreen bounds];
CGFloat screenScale = [nativeScreen scale];
o_widthPixels = static_cast<int>(screenBounds.size.width * screenScale);
o_heightPixels = static_cast<int>(screenBounds.size.height * screenScale);
const bool isScreenLandscape = o_widthPixels > o_heightPixels;
UIInterfaceOrientation uiOrientation = UIInterfaceOrientationUnknown;
#if defined(__IPHONE_13_0) || defined(__TVOS_13_0)
if(@available(iOS 13.0, tvOS 13.0, *))
{
UIWindow* foundWindow = nil;
//Find the key window
NSArray* windows = [[UIApplication sharedApplication] windows];
for (UIWindow* window in windows)
{
if (window.isKeyWindow)
{
foundWindow = window;
break;
}
}
//Check if the key window is found
if(foundWindow)
{
uiOrientation = foundWindow.windowScene.interfaceOrientation;
}
else
{
//If no key window is found create a temporary window in order to extract the orientation
//This can happen as this function gets called before the renderer is initialized
CGRect screenBounds = [[NativeScreenType mainScreen] bounds];
UIWindow* tempWindow = [[NativeWindowType alloc] initWithFrame: screenBounds];
uiOrientation = tempWindow.windowScene.interfaceOrientation;
[tempWindow release];
}
}
#else
uiOrientation = UIApplication.sharedApplication.statusBarOrientation;
#endif
const bool isInterfaceLandscape = UIInterfaceOrientationIsLandscape(uiOrientation);
if (isScreenLandscape != isInterfaceLandscape)
{
const int width = o_widthPixels;
o_widthPixels = o_heightPixels;
o_heightPixels = width;
}
return true;
}
#endif
#endif
extern int CryMemoryGetAllocatedSize();
@@ -151,8 +82,6 @@ bool CSystem::GetPrimaryPhysicalDisplayDimensions([[maybe_unused]] int& o_widthP
return true;
#elif defined(AZ_PLATFORM_ANDROID)
return AZ::Android::Utils::GetWindowSize(o_widthPixels, o_heightPixels);
#elif defined(AZ_PLATFORM_IOS)
return UIKitGetPrimaryPhysicalDisplayDimensions(o_widthPixels, o_heightPixels);
#else
return false;
#endif