diff --git a/BuildScripts/build.lua b/BuildScripts/build.lua index f2d1ef2..b78d7fe 100644 --- a/BuildScripts/build.lua +++ b/BuildScripts/build.lua @@ -22,6 +22,6 @@ include "../Sandbox/build.lua" -- Dependencies -- group "Dependencies" -include "../Dependencies/GLFW/" -include "../Dependencies/GLAD/" -include "../Dependencies/imgui/" +include "../Dependencies/GLFW/build.lua" +include "../Dependencies/GLAD/build.lua" +include "../Dependencies/imgui/build.lua" diff --git a/Dependencies/GLAD/premake5.lua b/Dependencies/GLAD/build.lua similarity index 93% rename from Dependencies/GLAD/premake5.lua rename to Dependencies/GLAD/build.lua index 335a37e..e792b05 100644 --- a/Dependencies/GLAD/premake5.lua +++ b/Dependencies/GLAD/build.lua @@ -16,7 +16,7 @@ project "GLAD" "**.c", "**.h", - "premake5.lua" + "build.lua" } -- Dependencies -- @@ -36,6 +36,8 @@ project "GLAD" "_CRT_SECURE_NO_WARNINGS", } + flags { "MultiProcessorCompile" } + -- debug filter "configurations:Debug" runtime "Debug" diff --git a/Engine/build.lua b/Engine/build.lua index 57ca657..b0e495f 100644 --- a/Engine/build.lua +++ b/Engine/build.lua @@ -26,7 +26,7 @@ project "Engine" "%{prj.location}/src/**.cpp", -- premake - "%{prj.location}/preake5*.lua", + "%{prj.location}/build.lua", "%{prj.location}/dxgidebug.dll", -- :#todo @@ -73,6 +73,8 @@ project "Engine" "dxguid.lib" , "D3DCompiler.lib" , } + + flags { "MultiProcessorCompile" } filter { "system:windows", "files:src/Platform/OS/Linux/**.**" } flags { "ExcludeFromBuild" } diff --git a/Engine/src/Engine/Base.h b/Engine/src/Engine/Base.h index 076be6e..de25713 100644 --- a/Engine/src/Engine/Base.h +++ b/Engine/src/Engine/Base.h @@ -9,58 +9,6 @@ #include - -// version -#define LT_VERSION "0.7.5b" -///*** [ CHANGE_LOG ] ***/// -// -------------------------------------------------------------------- -// Note: change log starts from 2021-07-21, the starting version is 0.7.0a: -// projects: 'Engine', 'Sandbox', 'Mirror' [+0.3] -// graphics apis: 'OpenGL', 'DirectX11' [+0.2] -// platforms: 'Windows', 'Linux' [+0.2] -// -------------------------------------------------------------------- -// -// -// 0.7.0a: started the change log -// -// 0.7.1a: [ LT_BREAK ] -// - Added the 'LT_BERAK' macro, a portable debug-trap -// -// 0.7.2a: [ Failed engine/client assertion ] -// - Separated 'FailedAssertion' into 'FailedEngineAssertion' and 'FailedClientAssertion' -// - Minor adjustment to the change log -// -// 0.7.3a: [ Layer Improvements ] -// - Added 'Layer::OnEvent()', 'Layer' now handles an event by itself and doesn't need another class to determine the event's type -// -// - Added reverse iterators 'rend()' and 'rbegin()' to 'LayerStack' -// -// - Removed 'LayerStack::On*()', 'LayerStack' -// -// - 'Layer::On*Event()' are now protected and called by 'Layer::OnEvent()' -// -// - 'Application' now handles iterating through the 'Layer's and calling the update / on * functions -// -// - Fixed a typo where in 'Mirror' where the name of the 'MirrorLayer' was "SandboxLayer" instead of "MirrorLayer" -// -// 0.7.4a: [ Input ] -// - Added 'Input' -// - - Added -// - The 'MirrorLayer''s ImGuiWindow, "GameView" will not receive/react to input events if the window is not focused -// -// 0.7.4b [ Maintenance ] -// - Added 'Get*Ref()' to 'dxSharedContext' -// -// - Fixed 'dxFramebuffer::Resize' not resizing : / -// - Fixed 'dxFrameBuffer::BindAsTarget' not setting the viewport -// - Fixed 'dxRenderCommand::SetViewport()' not resizing the swapchain's buffer -// -// - Improved 'dxGraphicsContext''s debug interface -// -// - Removed most of the 'ComPtr's in 'dxGraphicsContext', they can be accessed with the 'm_SharedContext' -// -///*** [ CHANGE_LOG ] ***/// - // platform #define LT_WIN(x) // windows #define LT_LIN(x) // linux @@ -88,9 +36,13 @@ // assertions // #todo: log to file in distribution builds -#define LT_ENGINE_ASSERT(x, ...) { if(!(x)) { LT_ENGINE_CRITICAL(__VA_ARGS__); LT_BREAK(); throw ::Light::FailedEngineAssertion(__FILE__, __LINE__); } } -#define LT_CLIENT_ASSERT(x, ...) { if(!(x)) { LT_CLIENT_CRITICAL(__VA_ARGS__); LT_BREAK(); throw ::Light::FailedClientAssertion(__FILE__, __LINE__); } } } - +#if defined(LIGHT_DIST) + #define LT_ENGINE_ASSERT(x, ...) { if(!(x)) { LT_FILE_CRITICAL(__VA_ARGS__); throw ::Light::FailedEngineAssertion(__FILE__, __LINE__); } } + #define LT_CLIENT_ASSERT(x, ...) { if(!(x)) { LT_FILE_CRITICAL(__VA_ARGS__); throw ::Light::FailedClientAssertion(__FILE__, __LINE__); } } +#else + #define LT_ENGINE_ASSERT(x, ...) { if(!(x)) { LT_ENGINE_CRITICAL(__VA_ARGS__); LT_BREAK(); throw ::Light::FailedEngineAssertion(__FILE__, __LINE__); } } + #define LT_CLIENT_ASSERT(x, ...) { if(!(x)) { LT_CLIENT_CRITICAL(__VA_ARGS__); LT_BREAK(); throw ::Light::FailedClientAssertion(__FILE__, __LINE__); } } +#endif ///*** [ PORTABLES ] ***/// //** PORTABLE_DEBUG_BREAK **// diff --git a/Engine/src/LightEngine.h b/Engine/src/LightEngine.h index 50e1e00..13939e6 100644 --- a/Engine/src/LightEngine.h +++ b/Engine/src/LightEngine.h @@ -36,7 +36,7 @@ #include "Utility/ResourceManager.h" //** TIME **// -#include "TIme/Timer.h" +#include "Time/Timer.h" //** BASE **// #include "Base.h" diff --git a/Mirror/build.lua b/Mirror/build.lua index 2c9e22c..54dc367 100644 --- a/Mirror/build.lua +++ b/Mirror/build.lua @@ -17,7 +17,7 @@ project "Mirror" "%{prj.location}/src/**.h", "%{prj.location}/src/**.cpp", - "%{prj.location}/premake5.lua", + "%{prj.location}/build.lua", } -- Dependencies -- @@ -50,6 +50,8 @@ project "Mirror" defines "LIGHT_PLATFORM_WINDOWS" systemversion "latest" staticruntime "On" + + flags { "MultiProcessorCompile" } -- linux filter "system:linux" diff --git a/Sandbox/build.lua b/Sandbox/build.lua index c33c05d..d7ccf0e 100644 --- a/Sandbox/build.lua +++ b/Sandbox/build.lua @@ -17,7 +17,7 @@ project "Sandbox" "%{prj.location}/src/**.h", "%{prj.location}/src/**.cpp", - "%{prj.location}/premake5.lua", + "%{prj.location}/build.lua", } -- Dependencies -- @@ -51,6 +51,8 @@ project "Sandbox" systemversion "latest" staticruntime "On" + flags { "MultiProcessorCompile" } + -- linux filter "system:linux" defines "LIGHT_PLATFORM_LINUX"