Compare commits
No commits in common. "9d4436cc0055a68996b4d43422798cb2b1e1c3a5" and "32c5bafa076b2cec93ce9003fdd627742b750418" have entirely different histories.
9d4436cc00
...
32c5bafa07
14 changed files with 32 additions and 285 deletions
38
.gitignore
vendored
38
.gitignore
vendored
|
@ -1,6 +1,32 @@
|
|||
bin/
|
||||
bin-int/
|
||||
*.sln
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
||||
!/vendor/**
|
||||
# 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
|
||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule "FluxEngine/vendor/spdlog"]
|
||||
path = FluxEngine/vendor/spdlog
|
||||
url = https://github.com/gabime/spdlog
|
|
@ -1,6 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "Flux/Application.h"
|
||||
#include "Flux/Log.h"
|
||||
|
||||
#include "Flux/EntryPoint.h"
|
|
@ -1,19 +0,0 @@
|
|||
#include "Application.h"
|
||||
|
||||
#include "Log.h"
|
||||
|
||||
namespace Flux {
|
||||
|
||||
Application::Application()
|
||||
{
|
||||
}
|
||||
|
||||
Application::~Application()
|
||||
{
|
||||
}
|
||||
void Application::Run()
|
||||
{
|
||||
FLUX_CORE_TRACE("FLUX Engine Running!");
|
||||
while (true);
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "Core.h"
|
||||
|
||||
namespace Flux {
|
||||
class FLUX_API Application
|
||||
{
|
||||
public:
|
||||
Application();
|
||||
virtual ~Application();
|
||||
|
||||
void Run();
|
||||
};
|
||||
|
||||
Application* CreateApplication();
|
||||
}
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef FLUX_PLATFORM_WINDOWS
|
||||
#ifdef FLUX_BUILD_DLL
|
||||
#define FLUX_API __declspec(dllexport)
|
||||
#else
|
||||
#define FLUX_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#error Flux only supports windows!
|
||||
#endif
|
|
@ -1,21 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "Log.h"
|
||||
|
||||
#ifdef FLUX_PLATFORM_WINDOWS
|
||||
|
||||
extern Flux::Application* Flux::CreateApplication();
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
Flux::Log::Init();
|
||||
|
||||
FLUX_CORE_WARN("Logging Initialized!");
|
||||
int a = 5;
|
||||
FLUX_INFO("Hello! {0}", a);
|
||||
|
||||
auto app = Flux::CreateApplication();
|
||||
app->Run();
|
||||
delete app;
|
||||
}
|
||||
#endif
|
|
@ -1,19 +0,0 @@
|
|||
#include "Log.h"
|
||||
|
||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||
|
||||
namespace Flux
|
||||
{
|
||||
std::shared_ptr<spdlog::logger> Log::s_CoreLogger;
|
||||
std::shared_ptr<spdlog::logger> Log::s_ClientLogger;
|
||||
|
||||
void Log::Init()
|
||||
{
|
||||
spdlog::set_pattern("%^[%T] %n: %v%$");
|
||||
s_CoreLogger = spdlog::stdout_color_mt("FLUX");
|
||||
s_CoreLogger->set_level(spdlog::level::trace);
|
||||
|
||||
s_ClientLogger = spdlog::stdout_color_mt("APP");
|
||||
s_ClientLogger->set_level(spdlog::level::trace);
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
#include "Core.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
|
||||
namespace Flux
|
||||
{
|
||||
class FLUX_API Log
|
||||
{
|
||||
public:
|
||||
static void Init();
|
||||
inline static std::shared_ptr<spdlog::logger>& GetCoreLogger() { return s_CoreLogger; }
|
||||
inline static std::shared_ptr<spdlog::logger>& GetClientLogger() { return s_ClientLogger; }
|
||||
private:
|
||||
static std::shared_ptr<spdlog::logger> s_CoreLogger;
|
||||
static std::shared_ptr<spdlog::logger> s_ClientLogger;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// Core log macros
|
||||
#define FLUX_CORE_TRACE(...) ::Flux::Log::GetCoreLogger()->trace(__VA_ARGS__)
|
||||
#define FLUX_CORE_INFO(...) ::Flux::Log::GetCoreLogger()->info(__VA_ARGS__)
|
||||
#define FLUX_CORE_WARN(...) ::Flux::Log::GetCoreLogger()->warn(__VA_ARGS__)
|
||||
#define FLUX_CORE_ERROR(...) ::Flux::Log::GetCoreLogger()->error(__VA_ARGS__)
|
||||
#define FLUX_CORE_FATAL(...) ::Flux::Log::GetCoreLogger()->fatal(__VA_ARGS__)
|
||||
|
||||
// Client log macros
|
||||
#define FLUX_TRACE(...) ::Flux::Log::GetCoreLogger()->trace(__VA_ARGS__)
|
||||
#define FLUX_INFO(...) ::Flux::Log::GetCoreLogger()->info(__VA_ARGS__)
|
||||
#define FLUX_WARN(...) ::Flux::Log::GetCoreLogger()->warn(__VA_ARGS__)
|
||||
#define FLUX_ERROR(...) ::Flux::Log::GetCoreLogger()->error(__VA_ARGS__)
|
||||
#define FLUX_FATAL(...) ::Flux::Log::GetCoreLogger()->fatal(__VA_ARGS__)
|
|
@ -1,2 +0,0 @@
|
|||
call .\vendor\bin\premake\premake5.exe vs2022
|
||||
PAUSE
|
|
@ -1,19 +0,0 @@
|
|||
#include <Flux.h>
|
||||
|
||||
class Sandbox : public Flux::Application
|
||||
{
|
||||
public:
|
||||
Sandbox()
|
||||
{
|
||||
|
||||
}
|
||||
~Sandbox()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Flux::Application* Flux::CreateApplication()
|
||||
{
|
||||
return new Sandbox();
|
||||
}
|
98
premake5.lua
98
premake5.lua
|
@ -1,98 +0,0 @@
|
|||
workspace "FluxEngine"
|
||||
architecture "x64"
|
||||
startproject "Sandbox"
|
||||
|
||||
configurations { "Debug", "Release", "Dist" }
|
||||
|
||||
outputdir = "%{cfg.buildcfg}-%{cfg.system}"
|
||||
|
||||
project "FluxEngine"
|
||||
location "FluxEngine"
|
||||
kind "SharedLib"
|
||||
language "C++"
|
||||
|
||||
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
|
||||
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
files
|
||||
{
|
||||
"%{prj.name}/src/**.h",
|
||||
"%{prj.name}/src/**.cpp",
|
||||
}
|
||||
|
||||
includedirs
|
||||
{
|
||||
"%{prj.name}/vendor/spdlog/include",
|
||||
}
|
||||
|
||||
filter "system:windows"
|
||||
cppdialect "C++20"
|
||||
staticruntime "on"
|
||||
systemversion "latest"
|
||||
defines
|
||||
{
|
||||
"FLUX_PLATFORM_WINDOWS",
|
||||
"FLUX_BUILD_DLL"
|
||||
}
|
||||
|
||||
postbuildcommands
|
||||
{
|
||||
("{COPY} %{cfg.buildtarget.relpath} ../bin/".. outputdir .. "/Sandbox")
|
||||
}
|
||||
filter "configurations:Debug"
|
||||
defines "FLUX_DEBUG"
|
||||
symbols "On"
|
||||
|
||||
filter "configurations:Release"
|
||||
defines "FLUX_RELEASE"
|
||||
optimize "On"
|
||||
|
||||
filter "configurations:Dist"
|
||||
defines "FLUX_DIST"
|
||||
optimize "On"
|
||||
|
||||
project "Sandbox"
|
||||
location "Sandbox"
|
||||
kind "ConsoleApp"
|
||||
language "C++"
|
||||
|
||||
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
|
||||
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
files
|
||||
{
|
||||
"%{prj.name}/src/**.h",
|
||||
"%{prj.name}/src/**.cpp",
|
||||
}
|
||||
|
||||
includedirs
|
||||
{
|
||||
"FluxEngine/vendor/spdlog/include",
|
||||
"FluxEngine/src"
|
||||
}
|
||||
|
||||
links
|
||||
{
|
||||
"FluxEngine"
|
||||
}
|
||||
|
||||
filter "system:windows"
|
||||
cppdialect "C++20"
|
||||
staticruntime "on"
|
||||
systemversion "latest"
|
||||
defines
|
||||
{
|
||||
"FLUX_PLATFORM_WINDOWS"
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
defines "FLUX_DEBUG"
|
||||
symbols "On"
|
||||
|
||||
filter "configurations:Release"
|
||||
defines "FLUX_RELEASE"
|
||||
optimize "On"
|
||||
|
||||
filter "configurations:Dist"
|
||||
defines "FLUX_DIST"
|
||||
optimize "On"
|
27
vendor/bin/premake/LICENSE.txt
vendored
27
vendor/bin/premake/LICENSE.txt
vendored
|
@ -1,27 +0,0 @@
|
|||
Copyright (c) 2003-2022 Jason Perkins and individual contributors.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of Premake nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
BIN
vendor/bin/premake/premake5.exe
vendored
BIN
vendor/bin/premake/premake5.exe
vendored
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue