diff --git a/CmakeLists.txt b/CmakeLists.txt new file mode 100644 index 0000000..53146b4 --- /dev/null +++ b/CmakeLists.txt @@ -0,0 +1,21 @@ +CMAKE_MINIMUM_REQUIRED (VERSION 4.0) +project(Yoggie) +set(EXPORT_COMPILE_COMMANDS_JSON ON) +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4099") +else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wclass-struct-conversion") +endif() + +add_compile_definitions(_CRT_SECURE_NO_WARNINGS) +add_compile_definitions(GLFW_STATIC) + +add_subdirectory(Editor) +add_subdirectory(SandboxApp) +include(libraries.cmake) +add_subdirectory(YoggieEngine) + + diff --git a/Editor/CMakeLists.txt b/Editor/CMakeLists.txt new file mode 100644 index 0000000..f9ba35f --- /dev/null +++ b/Editor/CMakeLists.txt @@ -0,0 +1,17 @@ +file(GLOB SOURCE_FILES "src/*.cpp") +file(GLOB HEADER_FILES "src/*.h") +add_executable(Editor ${SOURCE_FILES} "../libs/glad/src/glad.c" ${HEADER_FILES}) + +target_include_directories(Editor PRIVATE + "../YoggieEngine/src" + "../libs/guizmo" +) +target_link_directories(Editor PRIVATE + "../libs/ImGui/build/Release" + "../libs/guizmo/build/Release" ) +target_link_libraries(Editor + thirdparty_tools + YoggieEngine + ImGui + ImGuizmo +) diff --git a/Editor/premake5.lua b/Editor/premake5.lua deleted file mode 100644 index d6a3a10..0000000 --- a/Editor/premake5.lua +++ /dev/null @@ -1,51 +0,0 @@ -project "Editor" -kind "ConsoleApp" - -buildmessage "Building editor ..." - -links{ - "YoggieEngine", - "ImGuizmo", - "nfd" -} - - - -targetdir "%{wks.location}/%{prj.name}/build/%{cfg.buildcfg}" -objdir "%{wks.location}/%{prj.name}/build/%{cfg.buildcfg}/intermediates/" - -includedirs{ - - "../YoggieEngine/build/Debug", - - -- I'd prefer if didn't need these.. - -- We'll figure that out some time later - "../libs/physx/physx/include", - "../libs/physx/pxshared/include", - incfolder["lua"], - incfolder["spdlog"], - incfolder["glm"], - incfolder["assimp"], - incfolder["glad"], - incfolder["glfw"], - - incfolder["imgui"], - incfolder["imguizmo"], - incfolder["entt"], - incfolder["yamlcpp"], - incfolder["nativefiledialog"], - incfolder["mINI"] - - -} - -libdirs { - staticlib["yoggie"], - staticlib["nativefiledialog"] -} - -files { - "../libs/glad/src/glad.c", - "./src/**.h", - "./src/**.cpp" -} diff --git a/Editor/src/app.cpp b/Editor/src/app.cpp index 016f3ce..35b8754 100644 --- a/Editor/src/app.cpp +++ b/Editor/src/app.cpp @@ -1,27 +1,17 @@ -#include "../../YoggieEngine/src/EntryPoint.h" -#include #include "EditorLayer.h" - +#include "EntryPoint.h" +#include using namespace YoggieEngine; class Editor : public Application { public: - Editor() : Application("Editor"){} - - void Run() override - { - PushLayer(new EditorLayer()); - Application::Run(); - - } + Editor() : Application("Editor") {} + void Run() override { + PushLayer(new EditorLayer()); + Application::Run(); + } }; -YoggieEngine::Application* CreateApplication() { - - return new Editor(); - -} - - +YoggieEngine::Application *CreateApplication() { return new Editor(); } diff --git a/SandboxApp/CMakeLists.txt b/SandboxApp/CMakeLists.txt new file mode 100644 index 0000000..f361c64 --- /dev/null +++ b/SandboxApp/CMakeLists.txt @@ -0,0 +1,6 @@ +file(GLOB SOURCE_FILES "src/*.cpp") +file(GLOB HEADER_FILES "src/*.h") +add_executable(SandboxApp ${SOURCE_FILES} ${HEADER_FILES} ) +target_link_directories(SandboxApp PRIVATE "../build/YoggieEngine/Debug") +target_link_libraries(SandboxApp YoggieEngine) +target_include_directories(SandboxApp PRIVATE "../YoggieEngine/src") diff --git a/SandboxApp/premake5.lua b/SandboxApp/premake5.lua deleted file mode 100644 index 02c87eb..0000000 --- a/SandboxApp/premake5.lua +++ /dev/null @@ -1,40 +0,0 @@ -project "SandboxApp" -kind "ConsoleApp" - -buildmessage "Building SandboxApp ..." - -links{ - "YoggieEngine" -} - -includedirs{ - "./../YoggieEngine/Include", - - -- I'd prefer if didn't need these.. - -- We'll figure that out some time later - "./../libs/lua/include", - "./../libs/spdlog/include", - "./../libs/glm", - "./../libs/GorillaAudio/include", - - "./../libs/assimp/include", - "./../libs/glad/include", - "./../libs/glfw/include", - "./../libs/tinygltf", - "./../libs/glew/include", - "./../libs/glm", - "./../libs/ImGui", - - "../libs/entt/src", - - -} - -libdirs { - './../YoggieEngine/build/Debug' -} - -files { - "./src/*.h", - "./src/*.cpp" -} \ No newline at end of file diff --git a/SandboxApp/src/GUI.h b/SandboxApp/src/GUI.h index a2c0896..ee970e4 100644 --- a/SandboxApp/src/GUI.h +++ b/SandboxApp/src/GUI.h @@ -1,11 +1,10 @@ #pragma once +#include "YoggieEngine.h" #include "imgui.h" -#include "../../YoggieEngine/src/BarinkEngine.h" -#include "../../YoggieEngine/src/Graphics/Memory/Framebuffer.h" void CameraTool(); -void ScriptingTool(char* code); -///void transformWindow(Transform& transform, std::string PanelName); -void materialWindow(Material& material, std::string PanelName); -void SceneExplorer(const std::string& PanelName); -void SceneView(Framebuffer& framebuffer); \ No newline at end of file +void ScriptingTool(char *code); +/// void transformWindow(Transform& transform, std::string PanelName); +void materialWindow(Material &material, std::string PanelName); +void SceneExplorer(const std::string &PanelName); +void SceneView(Framebuffer &framebuffer); diff --git a/SandboxApp/src/Sandbox.cpp b/SandboxApp/src/Sandbox.cpp index f0509ed..e10d5b7 100644 --- a/SandboxApp/src/Sandbox.cpp +++ b/SandboxApp/src/Sandbox.cpp @@ -1,123 +1,102 @@ -#include #include "GUI.h" #include "Util.h" #include +#include -#include "../../YoggieEngine/src/BarinkEngine.h" -#include "../../YoggieEngine/src/Scene/Components.h" -#include "../../YoggieEngine/src/Scene/Scene.h" -#include "../../YoggieEngine/src/Scene/Entity.h" -#include "../../YoggieEngine/src/AssetManager/ModelImporter.h" -#include "../../YoggieEngine/src/PerfCounter.h" - +#include "YoggieEngine.h" /* -* Define globals -*/ + * Define globals + */ Scene scene; -BarinkEngine::Renderable* renderable; -BarinkEngine::SceneObject* object; +BarinkEngine::Renderable *renderable; +BarinkEngine::SceneObject *object; Entity cube; /* -* Runs once at startup -* - USe to initialize the game/sandbox/demo -*/ + * Runs once at startup + * - USe to initialize the game/sandbox/demo + */ void Start() { - auto importer = BarinkEngine::ModelImporter(); + auto importer = BarinkEngine::ModelImporter(); - // Load in asset(S) - object = importer.Import("build/Debug/Models/Cube.obj"); - renderable = object->renderable; + // Load in asset(S) + object = importer.Import("build/Debug/Models/Cube.obj"); + renderable = object->renderable; + // Add Entities to the scene + cube = scene.AddEntity("cube"); + auto &render3DComponent = + cube.AddComponent(); + render3DComponent.mesh = *renderable->mesh; + cube.GetComponent().transform = + glm::rotate(glm::mat4(1.0f), 32.0f, glm::vec3(0.5f, 1.0f, 0.0f)); - // Add Entities to the scene - cube = scene.AddEntity("cube"); - auto& render3DComponent = cube.AddComponent(); - render3DComponent.mesh = *renderable->mesh; - cube.GetComponent() - .transform = glm::rotate(glm::mat4(1.0f), 32.0f, glm::vec3(0.5f,1.0f,0.0f)); + // Create a second cube + auto cube2 = scene.AddEntity("Cube2"); + auto &cube2Render = cube2.AddComponent(); + cube2Render.mesh = *renderable->mesh; + cube2Render.color = glm::vec3(0.0f, 1.0f, 0.0f); + auto &cube2Trans = cube2.GetComponent(); + cube2Trans.transform = + glm::translate(glm::mat4(1.0f), glm::vec3(1.0f, 0.0f, 5.0f)); - // Create a second cube - - auto cube2 = scene.AddEntity("Cube2"); - auto& cube2Render = cube2.AddComponent(); - cube2Render.mesh = *renderable->mesh; - cube2Render.color = glm::vec3(0.0f, 1.0f, 0.0f); - auto& cube2Trans = cube2.GetComponent(); - cube2Trans.transform = glm::translate( glm::mat4(1.0f), glm::vec3(1.0f,0.0f, 5.0f)); - - // Create a light - auto AmbientLight = scene.AddEntity("AmbientLight"); - AmbientLight.AddComponent(); - - renderer.Prepare(scene); - -} - - -/* -* Runs every frame -* - Use to draw Immediate mode graphics (Not meant for HUD's ) -*/ -void ImmediateGraphicsDraw() -{ - // Show internal BarinkEngine stats - EngineInstrumentation::ShowStats(); - - ImGui::Begin("Scene view"); - auto group = scene.getReg().view(); - group.each([](auto entity, BarinkEngine::IdentifierComponent& identifier) { - - ImGui::Text("%s", identifier.name.c_str()); - - }); - ImGui::End(); - - ImGui::ShowMetricsWindow(); - - ImGui::Begin("Settings"); - - - auto& a = cube.GetComponent(); - - auto& b = cube.GetComponent(); - - ImGui::DragFloat3("Color", &a.color[0], 0.01f, 0.0f, 1.0f); - - ImGui::DragFloat3("Position", &b.transform[3][0], 0.01f, 0.0f, 16.0f); - - auto l = scene.getReg().view(); - l.each([](auto entity, BarinkEngine::LightComponent& light) { - ImGui::Text("Lighting"); - ImGui::SliderFloat("Intensity", &light.Strength, 0.0f, 1.0f); - ImGui::SliderFloat3("l-Color", &light.Color[0], 0.0f, 1.0f); - - }); - - ImGui::End(); + // Create a light + auto AmbientLight = scene.AddEntity("AmbientLight"); + AmbientLight.AddComponent(); + renderer.Prepare(scene); } /* -* Runs every frame -* - Meant for game logic ( non-physics related) -*/ -void Update() -{ -} + * Runs every frame + * - Use to draw Immediate mode graphics (Not meant for HUD's ) + */ +void ImmediateGraphicsDraw() { + // Show internal BarinkEngine stats + EngineInstrumentation::ShowStats(); -void Render() -{ - renderer.Render(scene); + ImGui::Begin("Scene view"); + auto group = scene.getReg().view(); + group.each([](auto entity, BarinkEngine::IdentifierComponent &identifier) { + ImGui::Text("%s", identifier.name.c_str()); + }); + ImGui::End(); + + ImGui::ShowMetricsWindow(); + + ImGui::Begin("Settings"); + + auto &a = cube.GetComponent(); + + auto &b = cube.GetComponent(); + + ImGui::DragFloat3("Color", &a.color[0], 0.01f, 0.0f, 1.0f); + + ImGui::DragFloat3("Position", &b.transform[3][0], 0.01f, 0.0f, 16.0f); + + auto l = scene.getReg().view(); + l.each([](auto entity, BarinkEngine::LightComponent &light) { + ImGui::Text("Lighting"); + ImGui::SliderFloat("Intensity", &light.Strength, 0.0f, 1.0f); + ImGui::SliderFloat3("l-Color", &light.Color[0], 0.0f, 1.0f); + }); + + ImGui::End(); } /* -* Runs at the end of the program -* - Meant for cleanup -*/ -void Stop() -{ -} + * Runs every frame + * - Meant for game logic ( non-physics related) + */ +void Update() {} + +void Render() { renderer.Render(scene); } + +/* + * Runs at the end of the program + * - Meant for cleanup + */ +void Stop() {} diff --git a/SandboxApp/src/Util.h b/SandboxApp/src/Util.h index 22726f4..5f65328 100644 --- a/SandboxApp/src/Util.h +++ b/SandboxApp/src/Util.h @@ -1,6 +1,6 @@ #pragma once -#include "../../YoggieEngine/src/BarinkEngine.h" +#include "YoggieEngine.h" -//void PrintSceneTree(Node& node, int depth); +// void PrintSceneTree(Node& node, int depth); -//glm::mat4 CalculateModelMat(Transform& transform); \ No newline at end of file +// glm::mat4 CalculateModelMat(Transform& transform); diff --git a/Tests/EngineTest.cpp b/Tests/EngineTest.cpp deleted file mode 100644 index e907897..0000000 --- a/Tests/EngineTest.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include - - -TEST(HelloTDD, MyFirstTest) { - EXPECT_EQ(1, 1); -}; - -TEST(TRANSFORM_COMPONENT_TESTS , CAN_EXTRACT_TRANSLATION_FROM_TRANSFORM_MATRIX) { - - auto component = YoggieEngine::TransformComponent{}; - - component.Position = glm::vec3(1.0f, 2.0f, 3.0f); - auto transformationMatrix = component.GetTransform(); - - auto newComponent = YoggieEngine::TransformComponent{}; - - newComponent.Decompose(transformationMatrix); - - EXPECT_EQ(newComponent.Position.x, component.Position.x); - EXPECT_EQ(newComponent.Position.y, component.Position.y); - EXPECT_EQ(newComponent.Position.z, component.Position.z); - -} - -TEST(TRANSFORM_COMPONENT_TESTS, CAN_EXTRACT_SCALE_FROM_TRANSFORM_MATRIX) { - auto component = YoggieEngine::TransformComponent{}; - - component.Scale = glm::vec3(1.0f, 2.0f, 3.0f); - - auto tranformationMatrix = component.GetTransform(); - - auto newComponent = YoggieEngine::TransformComponent{}; - - newComponent.Decompose(tranformationMatrix); - - EXPECT_EQ(newComponent.Scale.x, component.Scale.x); - EXPECT_EQ(newComponent.Scale.y, component.Scale.y); - EXPECT_EQ(newComponent.Scale.z, component.Scale.z); - -} - - -TEST(TRANSFORM_COMPONENT_TESTS, CAN_EXTRACT_ROTATION_FROM_TRANSFORM_MATRIX) { - auto component = YoggieEngine::TransformComponent{}; - component.Rotation = glm::vec3(2.0f, 10.0f, 20.0f); - - auto transformMatrix = component.GetTransform(); - - auto newComponent = YoggieEngine::TransformComponent{}; - - newComponent.Decompose(transformMatrix); - - - EXPECT_EQ(newComponent.Rotation.x, component.Rotation.x); - EXPECT_EQ(newComponent.Rotation.y, component.Rotation.y); - EXPECT_EQ(newComponent.Rotation.z, component.Rotation.z); - - -} - - -int main(int argc, char** argv) { - - - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); - -} \ No newline at end of file diff --git a/Tests/premake5.lua b/Tests/premake5.lua deleted file mode 100644 index fd19316..0000000 --- a/Tests/premake5.lua +++ /dev/null @@ -1,35 +0,0 @@ -project "EngineTests" - kind "ConsoleApp" - language "C++" - - - targetdir "%{wks.location}/%{prj.name}/build/%{cfg.buildcfg}" - objdir "%{wks.location}/%{prj.name}/build/%{cfg.buildcfg}/intermediates/" - - files{"**.h", "**.cpp"} - - includedirs{ - "../YoggieEngine/src", - incfolder["lua"], - incfolder["spdlog"], - incfolder["glm"], - incfolder["glad"], - incfolder["glfw"], - incfolder["imgui"], - incfolder["imguizmo"], - incfolder["entt"], - "../libs/physx/physx/include", - "../libs/physx/pxshared/include", - incfolder["GoogleTest"] - - } - - libdirs { - staticlib["yoggie"], - staticlib["GoogleTest"] - } - - links{ - "YoggieEngine", - "gtest" - } \ No newline at end of file diff --git a/YoggieEngine/CMakeLists.txt b/YoggieEngine/CMakeLists.txt new file mode 100644 index 0000000..a442a69 --- /dev/null +++ b/YoggieEngine/CMakeLists.txt @@ -0,0 +1,22 @@ +file(GLOB SOURCE_FILES src/*.cpp) +add_library(YoggieEngine ${SOURCE_FILES} ) +#target_precompile_headers(YoggieEngine PUBLIC src/YoggieEngine.h ) + +target_link_directories(YoggieEngine PUBLIC + "../libs/physx/physx/bin/win.x86_64.vc142.md/debug" +) +target_link_libraries(YoggieEngine + thirdparty_tools + PhysX_64 + PhysXCooking_64 + PhysXCommon_64 + PhysXFoundation_64 + PhysXPvdSDK_static_64 + PhysXExtensions_static_64 +) + +target_include_directories(YoggieEngine PUBLIC + "../libs/physx/pxshared/include" + "../libs/physx/physx/include" +) + diff --git a/YoggieEngine/premake5.lua b/YoggieEngine/premake5.lua deleted file mode 100644 index 40efa83..0000000 --- a/YoggieEngine/premake5.lua +++ /dev/null @@ -1,90 +0,0 @@ -project "YoggieEngine" - kind "StaticLib" - - pchheader "YoggieEngine.h" - pchsource "src/YoggieEngine.cpp" - - - targetdir "%{wks.location}/%{prj.name}/build/%{cfg.buildcfg}" - objdir "%{wks.location}/%{prj.name}/build/%{cfg.buildcfg}/intermediates/" - buildmessage "Building Yoggie Engine" - disablewarnings{ - "4099" -- Ignore the missing debug signals for GLFW warning - - } - - filter "system:Windows" - defines{ - "GLFW" - } - - includedirs { - "./src", - "../libs/spdlog/include", - "../libs/glm", - - "../libs/glfw/include", - "../libs/glew/include", - "../libs/glad/include", - - - "../libs/assimp/include", - "../libs/entt/src", - - "../libs/physx/pxshared/include", - "../libs/physx/physx/include", - - "../libs/lua/include", - - "../libs/GorillaAudio/include", - "../libs/steam-audio/include", - - "../libs/ImGui", - "../libs/yaml-cpp/include" - } - - links { - -- This needs to fall under the filter as the names can differ on different platforms - "phonon", - "lua54", - "spdlog", - "assimp-vc143-mtd", - "glfw3", - "ImGui", - "yaml-cpp", - - "PhysX_64", - "PhysXCooking_64", - "PhysXCommon_64", - "PhysXFoundation_64", - "PhysXPvdSDK_static_64", - "PhysXExtensions_static_64" - - } - - - libdirs { - "../libs/steam-audio/lib/windows-x64", - "../libs/lua", - "../libs/spdlog/build/Release", - "../libs/assimp/lib/Debug", - "../libs/glfw/build/src/Debug", - "../libs/physx/physx/bin/win.x86_64.vc142.md/debug", - } - - files { - - "src/**.cpp", - "src/**.h" - } - - prebuildcommands - { - ok,err = os.copyfile("YoggieEngine/src/Graphics/shaders/*" ,"SandboxApp/build/Debug/") - } - - postbuildcommands - { - ok,err = os.copyfile("YoggieEngine/build/Debug/intermediates/YoggieEngine.pch", "YoggieEngine/build/Debug/YoggieEngine.pch") - } - diff --git a/YoggieEngine/src/PerfCounter.cpp b/YoggieEngine/src/PerfCounter.cpp index 04154c3..d2420c8 100644 --- a/YoggieEngine/src/PerfCounter.cpp +++ b/YoggieEngine/src/PerfCounter.cpp @@ -1,72 +1,67 @@ -#include #include "PerfCounter.h" +#include namespace YoggieEngine { - uint64_t EngineInstrumentation::GetPrecisionTime() { - using namespace std::chrono; // REMINDER: This is kinda ugly but safes line width - return duration_cast(high_resolution_clock::now().time_since_epoch()).count(); - } - - void EngineInstrumentation::PerfomanceSamplerInit() { - - spdlog::info( "Initialize perf sampler" ); - /*EngineInstrumentation::frames = 0; - EngineInstrumentation::lastSampleTime = GetPrecisionTime();*/ - } - - - - void EngineInstrumentation::Update() { - - /* uint64_t MilliSecondsPast = GetPrecisionTime() - EngineInstrumentation::lastSampleTime; - - if (MilliSecondsPast >= 1000) { - - EngineInstrumentation::frameTime = (float)1000 / EngineInstrumentation::frames; - EngineInstrumentation::FPS = frames; - EngineInstrumentation::frames = 0; - EngineInstrumentation::lastSampleTime = GetPrecisionTime(); - }*/ - - - } - - void EngineInstrumentation::ShowStats() { - ImGui::Begin("Statistics", false, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize); - - ImGui::Text("Currently not available"); -/* ImGui::Text("FPS: %i", ES.FPS); - ImGui::Text("Frame Time: %f", ES.frameTime); - ImGui::Text("Verts: %i", ES.verts); - ImGui::Text("Draw Calls: %i", ES.DC); - */ - ImGui::End(); - } - - - PerfSampler::PerfSampler(const std::string& name) - : name(name) - { - using namespace std::chrono; - startTime = high_resolution_clock::now(); - - } - - PerfSampler::~PerfSampler() - { - Stop(); - } - - void PerfSampler::Stop() - { - using namespace std::chrono; - auto end = high_resolution_clock::now(); - auto durationInuSeconds = - duration_cast(end.time_since_epoch()).count() - - duration_cast(startTime.time_since_epoch()).count(); - - auto ms = durationInuSeconds * 0.001f; - - // std::cout << "[" << name << "]" << "Took: " << durationInuSeconds << " us (" << ms << " ms)" << std::endl; - } +uint64_t EngineInstrumentation::GetPrecisionTime() { + using namespace std::chrono; // REMINDER: This is kinda ugly but safes line + // width + return duration_cast( + high_resolution_clock::now().time_since_epoch()) + .count(); } + +void EngineInstrumentation::PerfomanceSamplerInit() { + + spdlog::info("Initialize perf sampler"); + /*EngineInstrumentation::frames = 0; + EngineInstrumentation::lastSampleTime = GetPrecisionTime();*/ +} + +void EngineInstrumentation::Update() { + + /* uint64_t MilliSecondsPast = GetPrecisionTime() - + EngineInstrumentation::lastSampleTime; + + if (MilliSecondsPast >= 1000) { + + EngineInstrumentation::frameTime = (float)1000 / + EngineInstrumentation::frames; EngineInstrumentation::FPS = frames; + EngineInstrumentation::frames = 0; + EngineInstrumentation::lastSampleTime = + GetPrecisionTime(); + }*/ +} + +void EngineInstrumentation::ShowStats() { + // ImGui::Begin("Statistics", false, ImGuiWindowFlags_NoCollapse | + //ImGuiWindowFlags_NoResize); + + // ImGui::Text("Currently not available"); + /* ImGui::Text("FPS: %i", ES.FPS); + ImGui::Text("Frame Time: %f", ES.frameTime); + ImGui::Text("Verts: %i", ES.verts); + ImGui::Text("Draw Calls: %i", ES.DC); + */ + // ImGui::End(); +} + +PerfSampler::PerfSampler(const std::string &name) : name(name) { + using namespace std::chrono; + startTime = high_resolution_clock::now(); +} + +PerfSampler::~PerfSampler() { Stop(); } + +void PerfSampler::Stop() { + using namespace std::chrono; + auto end = high_resolution_clock::now(); + auto durationInuSeconds = + duration_cast(end.time_since_epoch()).count() - + duration_cast(startTime.time_since_epoch()).count(); + + auto ms = durationInuSeconds * 0.001f; + + // std::cout << "[" << name << "]" << "Took: " << durationInuSeconds << " + //us (" << ms << " ms)" << std::endl; +} +} // namespace YoggieEngine diff --git a/buildSolution.bat b/buildSolution.bat deleted file mode 100644 index eb95ee9..0000000 --- a/buildSolution.bat +++ /dev/null @@ -1,11 +0,0 @@ -@echo off -echo Clean up .. -REM Does nothing for now -REM In the future we might want to remove certain files, if they exist, when re-generating the solution -echo Creating Solution for Yoggie engine... - -.\tools\premake5.exe vs2022 - - - -pause \ No newline at end of file diff --git a/libraries.cmake b/libraries.cmake new file mode 100644 index 0000000..18237c2 --- /dev/null +++ b/libraries.cmake @@ -0,0 +1,33 @@ +add_library( thirdparty_tools INTERFACE) +add_subdirectory(libs/ImGui) +target_link_directories(thirdparty_tools INTERFACE + "libs/glfw/build/src" + "libs/physx/physx/bin/win.x86_64.vc142.mt/release" + "libs/nativefiledialog/build/lib/Release/x64" + "libs/googletest/build/lib/Debug" +) + +target_link_libraries(thirdparty_tools INTERFACE + nfd + YoggieEngine +) +target_include_directories(thirdparty_tools INTERFACE + "YoggieEngine/src" + "libs/spdlog/include" + "libs/assimp/include" + "libs/glm" + "libs/entt/src" + "libs/yaml-cpp/include" + "libs/mINI/src" + "libs/googletest/googletest/include" + "libs/glad/include" + "libs/glfw/include" + "libs/glew/include" + "libs/lua/include" + "libs/guizmo" + "libs/nativefiledialog/src/include" + "libs/ImGui" +) + + + diff --git a/libraries.lua b/libraries.lua deleted file mode 100644 index d11563c..0000000 --- a/libraries.lua +++ /dev/null @@ -1,37 +0,0 @@ -incfolder = {} - ---Utils -incfolder["spdlog"] = "%{wks.location}/libs/spdlog/include" -incfolder["assimp"] = "%{wks.location}/libs/assimp/include" -incfolder["glm"] = "%{wks.location}/libs/glm" -incfolder["entt"] = "%{wks.location}/libs/entt/src" -incfolder["yamlcpp"] = "%{wks.location}/libs/yaml-cpp/include" -incfolder["mINI"] = "%{wks.location}/libs/mINI/src" -incfolder["GoogleTest"] = "%{wks.location}/libs/googletest/googletest/include" - --- Graphics -incfolder["glad"] = "%{wks.location}/libs/glad/include" -incfolder["glfw"] = "%{wks.location}/libs/glfw/include" -incfolder["glew"] = "%{wks.location}/libs/glew/include" --- Physics - --- Scripting -incfolder["lua"] = "%{wks.location}/libs/lua/include" - - --- Audio -incfolder["gorillaaudio"] = "%{wks.location}/libs/GorillaAudio/include" - --- Immediate Mode GUI -incfolder["imgui"] = "%{wks.location}/libs/ImGui" -incfolder["imguizmo"] = "%{wks.location}/libs/guizmo" -incfolder["nativefiledialog"] = "%{wks.location}/libs/nativefiledialog/src/include" - - - - -staticlib = {} - -staticlib["yoggie"] = "Yoggie/build/Debug" -staticlib["nativefiledialog"]= "%{wks.location}/libs/nativefiledialog/build/lib/Release/x64" -staticlib["GoogleTest"] = "%{wks.location}/libs/googletest/build/lib/Debug" diff --git a/libs/ImGui b/libs/ImGui index d666a1d..c191faf 160000 --- a/libs/ImGui +++ b/libs/ImGui @@ -1 +1 @@ -Subproject commit d666a1d4737739274449dbe0e8558454bba82ec4 +Subproject commit c191faf0ba478e9c58a69c63306986a21ebfb6e4 diff --git a/premake5.lua b/premake5.lua deleted file mode 100644 index 62ea898..0000000 --- a/premake5.lua +++ /dev/null @@ -1,44 +0,0 @@ -include("libraries") -print("Using Premake version ", _PREMAKE_VERSION) - -workspace "Yoggie GameEngine" - configurations { "Debug", "Release" } - - language "C++" - cppdialect "C++17" - architecture "x86_64" - - targetdir "%{wks.location}/libs/%{prj.name}/build/%{cfg.buildcfg}" - objdir "%{wks.location}/libs/%{prj.name}/build/%{cfg.buildcfg}/intermediates/" - - startproject("Editor") - - - defines{ - " _CRT_SECURE_NO_WARNINGS", - "GLFW_STATIC" - } - - filter "configurations:Debug" - defines {"DEBUG", "_DEBUG"} - symbols "On" - - filter "configurations:Release" - defines {"NDEBUG", "_DEBUG"} - optimize "On" - - - -include("./YoggieEngine") -include ("./Editor") -include ("./Tests") - -group("Other") - include("./SandboxApp") - -group("Libraries") - include('libs/ImGui') - include("libs/guizmo") - include("libs/yaml-cpp") - -