diff --git a/.gitignore b/.gitignore index bb660c6..74ff7e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,37 +1,7 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app - +# Directories +.vs/ bin/ bin-int/ -.vs/ -**.vcx** \ No newline at end of file + +# VS Files +**.vcxproj** \ No newline at end of file diff --git a/Light Engine.sln b/Light Engine.sln index 3d74f78..df598bb 100644 --- a/Light Engine.sln +++ b/Light Engine.sln @@ -6,6 +6,9 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Light Engine", "Light Engine\Light Engine.vcxproj", "{039B5335-8EC7-4005-AFF9-833E1B760755}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sandbox", "Sandbox\Sandbox.vcxproj", "{A72B03C9-4FE6-4288-AE22-8DD8E4E37A4D}" + ProjectSection(ProjectDependencies) = postProject + {039B5335-8EC7-4005-AFF9-833E1B760755} = {039B5335-8EC7-4005-AFF9-833E1B760755} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Light Engine/src/Engine/Application.cpp b/Light Engine/src/Engine/Application.cpp new file mode 100644 index 0000000..28ead81 --- /dev/null +++ b/Light Engine/src/Engine/Application.cpp @@ -0,0 +1,18 @@ +#include "Application.h" + +namespace Light { + + Application::Application() + { + } + + Application::~Application() + { + } + + void Application::GameLoop() + { + while (true); + } + +} \ No newline at end of file diff --git a/Light Engine/src/Engine/Application.h b/Light Engine/src/Engine/Application.h new file mode 100644 index 0000000..97ffe58 --- /dev/null +++ b/Light Engine/src/Engine/Application.h @@ -0,0 +1,18 @@ +#pragma once + +#include "Base.h" + +namespace Light { + + class Application + { + public: + Application(); + virtual ~Application(); + + void GameLoop(); + }; + + Application* CreateApplication(); + +} \ No newline at end of file diff --git a/Light Engine/src/Engine/Base.h b/Light Engine/src/Engine/Base.h new file mode 100644 index 0000000..2fa27df --- /dev/null +++ b/Light Engine/src/Engine/Base.h @@ -0,0 +1,9 @@ +#pragma once + +#if defined(LT_PLATFORM_WINDOWS) + #define LT_BUILD_PLATFORM "Windows" +#elif defined(LT_PLATFORM_LINUX) + #error "Unsupported platform: UNIX" +#else + #error "Unsupported platform: Unknown" +#endif \ No newline at end of file diff --git a/Light Engine/src/Engine/EntryPoint.h b/Light Engine/src/Engine/EntryPoint.h new file mode 100644 index 0000000..dd72b8a --- /dev/null +++ b/Light Engine/src/Engine/EntryPoint.h @@ -0,0 +1,14 @@ +#pragma once + +#ifdef LT_PLATFORM_WINDOWS + +extern Light::Application* Light::CreateApplication(); + +int main(int argc, char** argv) +{ + auto application = Light::CreateApplication(); + application->GameLoop(); + delete application; +} + +#endif \ No newline at end of file diff --git a/Light Engine/src/LightEngine.h b/Light Engine/src/LightEngine.h new file mode 100644 index 0000000..4b843b8 --- /dev/null +++ b/Light Engine/src/LightEngine.h @@ -0,0 +1,7 @@ +#pragma once + +#include "Engine/Base.h" + +#include "Engine/Application.h" + +#include "Engine/EntryPoint.h" \ No newline at end of file diff --git a/Sandbox/SandboxApp.cpp b/Sandbox/SandboxApp.cpp new file mode 100644 index 0000000..877ff8d --- /dev/null +++ b/Sandbox/SandboxApp.cpp @@ -0,0 +1,15 @@ +#include + +class Sandbox : public Light::Application +{ +public: + Sandbox() + { + } + +}; + +Light::Application* Light::CreateApplication() +{ + return new Sandbox(); +} \ No newline at end of file diff --git a/Sandbox/main.cpp b/Sandbox/main.cpp deleted file mode 100644 index 58901c3..0000000 --- a/Sandbox/main.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -int main() -{ - std::cout << "Hello world!" << std::endl; - std::cin.get(); - - return 0; -} \ No newline at end of file