diff --git a/Juliet/Juliet.vcxproj b/Juliet/Juliet.vcxproj index 9d5cd4b..07869ea 100644 --- a/Juliet/Juliet.vcxproj +++ b/Juliet/Juliet.vcxproj @@ -1,233 +1,287 @@ - - - Debug - x64 - - - Release - x64 - - - - 17.0 - Win32Proj - {1bbc0b92-e4d8-4838-974b-439c5c501e82} - Juliet - 10.0 - - - - StaticLibrary - true - ClangCL - Unicode - - - StaticLibrary - false - ClangCL - true - Unicode - - - - - - - - - - - - - - - $(SolutionDir)\lib\$(Platform)\$(Configuration)\ - $(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\ - $(SolutionDir)Juliet\include\;$(SolutionDir)Juliet\src\;$(SolutionDir)Juliet\src\Graphics\RHI\DX12\D3D12;$(IncludePath) - - - $(SolutionDir)\bin\$(Platform)\$(Configuration)\ - $(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\ - $(SolutionDir)Juliet\include\;$(SolutionDir)Juliet\src\;$(SolutionDir)Juliet\src\Graphics\RHI\DX12\D3D12;$(IncludePath) - - - - Level3 - true - _DEBUG;_LIB;JULIET_WIN32;%(PreprocessorDefinitions) - true - Use - pch.h - stdcpp20 - Fast - false - false - - - - - true - - - - - Level3 - true - true - true - NDEBUG;_LIB;JULIET_WIN32;%(PreprocessorDefinitions) - true - Use - pch.h - stdcpp20 - Fast - false - false - - - - - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MultiThreadedDebugDll - Disabled - true - NoListing - W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ - false - W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ - Default - Default - Column - false - false - false - NotSet - Fast - Default - false - stdcpp20 - Default - W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ - false - Neither - W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ - Cdecl - Use - pch.h - W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\Juliet.pch - false - false - false - false - false - W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ - true - true - false - Default - W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\Juliet.tlog\ - true - false - Level3 - W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ - ProgramDatabase - false - false - true - _DEBUG;_LIB;JULIET_WIN32;_UNICODE;UNICODE; - false - true - true - Default - --target=amd64-pc-windows-msvc - - - Create - Create - - - - - - - - + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {1bbc0b92-e4d8-4838-974b-439c5c501e82} + Juliet + 10.0 + + + + DynamicLibrary + true + ClangCL + Unicode + + + DynamicLibrary + false + ClangCL + true + Unicode + + + + + + + + + + + + + + + $(SolutionDir)\lib\$(Platform)\$(Configuration)\ + $(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\ + $(SolutionDir)Juliet\include\;$(SolutionDir)Juliet\src\;$(SolutionDir)Juliet\src\Graphics\DX12\D3D12;$(IncludePath) + + + $(SolutionDir)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\ + $(SolutionDir)Juliet\include\;$(SolutionDir)Juliet\src\;$(SolutionDir)Juliet\src\Graphics\DX12\D3D12;$(IncludePath) + + + + Level3 + true + _DEBUG;JULIET_EXPORT;JULIET_WIN32;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpp20 + Fast + false + false + + + + + true + ws2_32.lib;d3d12.lib;dxgi.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + + + Level3 + true + true + true + NDEBUG;JULIET_EXPORT;JULIET_WIN32;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpp20 + Fast + false + false + + + + + true + true + true + ws2_32.lib;d3d12.lib;dxgi.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MultiThreadedDebugDll + Disabled + true + NoListing + W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ + false + W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ + Default + Default + Column + false + false + false + NotSet + Fast + Default + false + stdcpp20 + Default + W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ + false + Neither + W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ + Cdecl + Use + pch.h + W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\Juliet.pch + false + false + false + false + false + W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ + true + true + false + Default + W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\Juliet.tlog\ + true + false + Level3 + W:\Classified\Juliet\Intermediate\Juliet\x64\Debug\ + ProgramDatabase + false + false + true + _DEBUG;_LIB;JULIET_WIN32;_UNICODE;UNICODE; + false + true + true + Default + --target=amd64-pc-windows-msvc + + + Create + Create + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Juliet/Juliet.vcxproj.filters b/Juliet/Juliet.vcxproj.filters index 3b67e0a..403d914 100644 --- a/Juliet/Juliet.vcxproj.filters +++ b/Juliet/Juliet.vcxproj.filters @@ -54,10 +54,247 @@ Header Files\Engine - + Header Files - + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + Header Files @@ -71,5 +308,71 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + \ No newline at end of file diff --git a/Juliet/include/Core/Application/ApplicationManager.h b/Juliet/include/Core/Application/ApplicationManager.h index b158234..c0b79c3 100644 --- a/Juliet/include/Core/Application/ApplicationManager.h +++ b/Juliet/include/Core/Application/ApplicationManager.h @@ -5,5 +5,6 @@ namespace Juliet { enum class JulietInit_Flags : uint8; - void StartApplication(IApplication& app, JulietInit_Flags flags); + + extern JULIET_API void StartApplication(IApplication& app, JulietInit_Flags flags); } // namespace Juliet diff --git a/Juliet/include/Core/Common/CoreUtils.h b/Juliet/include/Core/Common/CoreUtils.h index de9ed3f..0626426 100644 --- a/Juliet/include/Core/Common/CoreUtils.h +++ b/Juliet/include/Core/Common/CoreUtils.h @@ -1,8 +1,6 @@ #pragma once -#include -#include -#include +#include #if _DEBUG #define Assert(expression) \ @@ -19,4 +17,4 @@ #define Assert(Expression) #endif -void JulietAssert(const char* expression); +extern void JULIET_API JulietAssert(const char* expression); diff --git a/Juliet/include/Core/HAL/Display/Display.h b/Juliet/include/Core/HAL/Display/Display.h index e88c8f7..070359e 100644 --- a/Juliet/include/Core/HAL/Display/Display.h +++ b/Juliet/include/Core/HAL/Display/Display.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include @@ -8,11 +9,11 @@ namespace Juliet struct Window; using WindowID = uint8; - extern Window* CreatePlatformWindow(const char* title, uint16 width, uint16 height, int flags = 0 /* unused */); - extern void DestroyPlatformWindow(NonNullPtr window); + extern JULIET_API Window* CreatePlatformWindow(const char* title, uint16 width, uint16 height, int flags = 0 /* unused */); + extern JULIET_API void DestroyPlatformWindow(NonNullPtr window); - extern void ShowWindow(NonNullPtr window); - extern void HideWindow(NonNullPtr window); + extern JULIET_API void ShowWindow(NonNullPtr window); + extern JULIET_API void HideWindow(NonNullPtr window); - extern WindowID GetWindowID(NonNullPtr window); + extern JULIET_API WindowID GetWindowID(NonNullPtr window); } // namespace Juliet diff --git a/Juliet/include/Core/HAL/Event/SystemEvent.h b/Juliet/include/Core/HAL/Event/SystemEvent.h index bd29843..36aff95 100644 --- a/Juliet/include/Core/HAL/Event/SystemEvent.h +++ b/Juliet/include/Core/HAL/Event/SystemEvent.h @@ -4,6 +4,7 @@ #include #include #include +#include // Handles all events from systems handling the Hardware // Very inspired by SDL3 @@ -106,15 +107,15 @@ namespace Juliet // Poll for any event, return false if no event is available. // Equivalent to WaitEvent(event, 0); // Will not block - extern bool GetEvent(SystemEvent& event); + extern JULIET_API bool GetEvent(SystemEvent& event); // TODO : use chrono to tag the timeout correctly with nanosec // timeout == -1 means wait for any event before pursuing // timeout == 0 means checking once for the frame and getting out // timeout > 0 means wait until time is out - extern bool WaitEvent(SystemEvent& event, int32 timeoutInNS = -1); + extern JULIET_API bool WaitEvent(SystemEvent& event, int32 timeoutInNS = -1); // Add an event onto the event queue. // TODO : support array of events - extern bool AddEvent(SystemEvent& event); + extern JULIET_API bool AddEvent(SystemEvent& event); } // namespace Juliet diff --git a/Juliet/include/Core/Logging/LogManager.h b/Juliet/include/Core/Logging/LogManager.h index 7c6cd58..9fc0e7f 100644 --- a/Juliet/include/Core/Logging/LogManager.h +++ b/Juliet/include/Core/Logging/LogManager.h @@ -1,5 +1,7 @@ #pragma once +#include + // TODO : Juliet strings #include // TODO Juliet Containers + Allocators... @@ -37,7 +39,7 @@ namespace Juliet static void OutputLog(Entry& entry); }; - void InitializeLogManager(); - void ShutdownLogManager(); - void Log(LogLevel level, LogCategory category, const char* fmt, ...); + extern void JULIET_API InitializeLogManager(); + extern void JULIET_API ShutdownLogManager(); + extern void JULIET_API Log(LogLevel level, LogCategory category, const char* fmt, ...); } // namespace Juliet diff --git a/Juliet/include/Graphics/Graphics.h b/Juliet/include/Graphics/Graphics.h index e703134..ff54ea4 100644 --- a/Juliet/include/Graphics/Graphics.h +++ b/Juliet/include/Graphics/Graphics.h @@ -1,11 +1,12 @@ #pragma once #include +#include // Graphics Interface namespace Juliet { struct GraphicsDevice; - extern GraphicsDevice* CreateGraphicsDevice(GraphicsConfig config); + extern JULIET_API GraphicsDevice* CreateGraphicsDevice(GraphicsConfig config); } // namespace Juliet diff --git a/Juliet/include/Juliet.h b/Juliet/include/Juliet.h new file mode 100644 index 0000000..a4c61c2 --- /dev/null +++ b/Juliet/include/Juliet.h @@ -0,0 +1,21 @@ +#pragma once + +// Should be included in all files to define basic includes and macros + +// clang-format off +#if defined(_WIN32) +#define JULIET_WIN32 1 +#endif + +#ifndef JULIET_API +# if defined(JULIET_WIN32) +# ifdef JULIET_EXPORT +# define JULIET_API __declspec(dllexport) +# else + #define JULIET_API +# endif +# else +# define JULIET_API (void) // Only Win32 is supported for now +# endif +#endif +// clang-format on diff --git a/Juliet/include/pch.h b/Juliet/include/pch.h index 65063f9..f32bbc8 100644 --- a/Juliet/include/pch.h +++ b/Juliet/include/pch.h @@ -7,6 +7,7 @@ #ifndef PCH_H #define PCH_H +#include #include #include #include diff --git a/JulietApp/JulietApp.vcxproj b/JulietApp/JulietApp.vcxproj index e00b058..c968467 100644 --- a/JulietApp/JulietApp.vcxproj +++ b/JulietApp/JulietApp.vcxproj @@ -1,105 +1,105 @@ - - - Debug - x64 - - - Release - x64 - - - - - - - - - - 17.0 - Win32Proj - {4b2a0f9c-5f78-4bc9-bee9-1e58bb85fa79} - JulietApp - 10.0 - - - - Application - true - ClangCL - Unicode - - - Application - false - ClangCL - true - Unicode - - - - - - - - - - - - - - - $(SolutionDir)\lib\$(Platform)\$(Configuration)\;$(LibraryPath) - $(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\ - $(SolutionDir)\bin\$(Platform)\$(Configuration)\ - $(SolutionDir)Juliet\include\;$(SolutionDir)JulietApp;$(IncludePath) - - - $(SolutionDir)Juliet\include\;$(SolutionDir)JulietApp;$(IncludePath) - $(SolutionDir)\lib\$(Platform)\$(Configuration)\;$(LibraryPath) - $(SolutionDir)\bin\$(Platform)\$(Configuration)\ - $(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\ - - - - Level3 - true - _DEBUG;JULIET_WIN32;%(PreprocessorDefinitions) - true - stdcpp20 - false - Fast - false - - - Console - true - Juliet.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level3 - true - true - true - NDEBUG;JULIET_WIN32;%(PreprocessorDefinitions) - true - stdcpp20 - false - Fast - false - - - Console - true - true - true - Juliet.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - + + + Debug + x64 + + + Release + x64 + + + + + + + + + + 17.0 + Win32Proj + {4b2a0f9c-5f78-4bc9-bee9-1e58bb85fa79} + JulietApp + 10.0 + + + + Application + true + ClangCL + Unicode + + + Application + false + ClangCL + true + Unicode + + + + + + + + + + + + + + + $(SolutionDir)\lib\$(Platform)\$(Configuration)\;$(LibraryPath) + $(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\ + $(SolutionDir)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)Juliet\include\;$(SolutionDir)JulietApp;$(IncludePath) + + + $(SolutionDir)Juliet\include\;$(SolutionDir)JulietApp;$(IncludePath) + $(SolutionDir)\lib\$(Platform)\$(Configuration)\;$(LibraryPath) + $(SolutionDir)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\ + + + + Level3 + true + _DEBUG;JULIET_WIN32;%(PreprocessorDefinitions) + true + stdcpp20 + false + Fast + false + + + Console + true + Juliet.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;JULIET_WIN32;%(PreprocessorDefinitions) + true + stdcpp20 + false + Fast + false + + + Console + true + true + true + Juliet.lib;%(AdditionalDependencies) + + + + + \ No newline at end of file