Optimize C++ compilation time
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "Engine/Engine/Time.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Engine/Globals.h"
|
||||
#include "Engine/Platform/Window.h"
|
||||
#include "Engine/Profiler/Profiler.h"
|
||||
#include "Engine/Level/Level.h"
|
||||
@@ -17,6 +18,7 @@
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Render2D/Render2D.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/Textures/GPUTexture.h"
|
||||
#include "Engine/Utilities/Encryption.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "FlaxEngine.Gen.h"
|
||||
@@ -241,7 +243,7 @@ void GameBaseImpl::OnPostRender(GPUContext* context, RenderContext& renderContex
|
||||
const Rectangle screenRect(viewport.X, viewport.Y, viewport.Width, viewport.Height);
|
||||
Rectangle imageArea = screenRect;
|
||||
imageArea.Scale(0.6f);
|
||||
const float aspectRatio = static_cast<float>(splashScreen->Width()) / splashScreen->Height();
|
||||
const float aspectRatio = static_cast<float>(splashScreen->Width()) / static_cast<float>(splashScreen->Height());
|
||||
const float height = imageArea.GetWidth() / aspectRatio;
|
||||
imageArea.Location.Y += (imageArea.GetHeight() - height) * 0.5f;
|
||||
imageArea.Size.Y = height;
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "Engine/Content/Factories/BinaryAssetFactory.h"
|
||||
#include "Engine/Content/Upgraders/BinaryAssetUpgrader.h"
|
||||
|
||||
#if USE_EDITOR
|
||||
|
||||
class GameplayGlobalsUpgrader : public BinaryAssetUpgrader
|
||||
{
|
||||
public:
|
||||
@@ -50,7 +52,9 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_BINARY_ASSET(GameplayGlobals, "FlaxEngine.GameplayGlobals", ::New<GameplayGlobalsUpgrader>(), true);
|
||||
#endif
|
||||
|
||||
REGISTER_BINARY_ASSET_WITH_UPGRADER(GameplayGlobals, "FlaxEngine.GameplayGlobals", GameplayGlobalsUpgrader, true);
|
||||
|
||||
GameplayGlobals::GameplayGlobals(const SpawnParams& params, const AssetInfo* info)
|
||||
: BinaryAsset(params, info)
|
||||
|
||||
@@ -25,4 +25,3 @@ int32 Globals::EngineBuildNumber = FLAXENGINE_VERSION_BUILD;
|
||||
String Globals::ProductName;
|
||||
String Globals::CompanyName;
|
||||
int32 Globals::ContentKey;
|
||||
bool Globals::ConvertLoadedMaterialsByForce;
|
||||
|
||||
@@ -94,7 +94,4 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Globals);
|
||||
/// The content data keycode.
|
||||
/// </summary>
|
||||
static int32 ContentKey;
|
||||
|
||||
// True if convert all loaded material by force
|
||||
static bool ConvertLoadedMaterialsByForce;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user