- Various clang reformat

- Added shader compiler app (doing nothing)
- Various Project files changes
This commit is contained in:
2025-03-01 11:01:42 -05:00
parent 7c8f8a3bb1
commit 67528aaee1
19 changed files with 218 additions and 173 deletions

View File

@@ -72,7 +72,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Juliet.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>Juliet.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(SolutionDir)\lib\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)$(TargetName)_$(Random).pdb</ProgramDatabaseFile> <ProgramDatabaseFile>$(OutDir)$(TargetName)_$(Random).pdb</ProgramDatabaseFile>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
@@ -94,12 +94,12 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(SolutionDir)\lib\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
<AdditionalDependencies>Juliet.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>Juliet.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="game.cpp" /> <ClCompile Include="game.cpp"/>
<ClCompile Include="Entity\EntityManager.cpp"/> <ClCompile Include="Entity\EntityManager.cpp"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -15,6 +15,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "Game\Game.vcxproj",
{1BBC0B92-E4D8-4838-974B-439C5C501E82} = {1BBC0B92-E4D8-4838-974B-439C5C501E82} {1BBC0B92-E4D8-4838-974B-439C5C501E82} = {1BBC0B92-E4D8-4838-974B-439C5C501E82}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JulietShaderCompiler", "JulietShaderCompiler\JulietShaderCompiler.vcxproj", "{26880364-45F4-4817-BFD3-0ACC0958757D}"
ProjectSection(ProjectDependencies) = postProject
{1BBC0B92-E4D8-4838-974B-439C5C501E82} = {1BBC0B92-E4D8-4838-974B-439C5C501E82}
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64 Debug|x64 = Debug|x64
@@ -33,6 +38,10 @@ Global
{B7B12DCC-1A69-4371-A9FE-D6E7671497B0}.Debug|x64.Build.0 = Debug|x64 {B7B12DCC-1A69-4371-A9FE-D6E7671497B0}.Debug|x64.Build.0 = Debug|x64
{B7B12DCC-1A69-4371-A9FE-D6E7671497B0}.Release|x64.ActiveCfg = Release|x64 {B7B12DCC-1A69-4371-A9FE-D6E7671497B0}.Release|x64.ActiveCfg = Release|x64
{B7B12DCC-1A69-4371-A9FE-D6E7671497B0}.Release|x64.Build.0 = Release|x64 {B7B12DCC-1A69-4371-A9FE-D6E7671497B0}.Release|x64.Build.0 = Release|x64
{26880364-45F4-4817-BFD3-0ACC0958757D}.Debug|x64.ActiveCfg = Debug|x64
{26880364-45F4-4817-BFD3-0ACC0958757D}.Debug|x64.Build.0 = Debug|x64
{26880364-45F4-4817-BFD3-0ACC0958757D}.Release|x64.ActiveCfg = Release|x64
{26880364-45F4-4817-BFD3-0ACC0958757D}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@@ -71,6 +71,7 @@
</SubSystem> </SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>ws2_32.lib;dxgi.lib;dxguid.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>ws2_32.lib;dxgi.lib;dxguid.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
<ImportLibrary>$(SolutionDir)\lib\$(Platform)\$(Configuration)\$(TargetName).lib</ImportLibrary>
</Link> </Link>
<Lib> <Lib>
<AdditionalDependencies> <AdditionalDependencies>
@@ -99,6 +100,7 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>ws2_32.lib;d3d12.lib;dxgi.lib;dxguid.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>ws2_32.lib;d3d12.lib;dxgi.lib;dxguid.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
<ImportLibrary>$(SolutionDir)\lib\$(Platform)\$(Configuration)\$(TargetName).lib</ImportLibrary>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
@@ -113,94 +115,96 @@
<ClInclude Include="include\Core\Common\NonNullPtr.h"/> <ClInclude Include="include\Core\Common\NonNullPtr.h"/>
<ClInclude Include="include\Core\Common\Singleton.h"/> <ClInclude Include="include\Core\Common\Singleton.h"/>
<ClInclude Include="include\Core\Container\Vector.h"/> <ClInclude Include="include\Core\Container\Vector.h"/>
<ClInclude Include="include\Core\HAL\Display\Display.h" /> <ClInclude Include="include\Core\HAL\Display\Display.h"/>
<ClInclude Include="include\Core\HAL\Event\SystemEvent.h" /> <ClInclude Include="include\Core\HAL\Event\SystemEvent.h"/>
<ClInclude Include="include\Core\HAL\Keyboard\Keyboard.h" /> <ClInclude Include="include\Core\HAL\Keyboard\Keyboard.h"/>
<ClInclude Include="include\Core\HAL\Keyboard\KeyCode.h" /> <ClInclude Include="include\Core\HAL\Keyboard\KeyCode.h"/>
<ClInclude Include="include\Core\HAL\Keyboard\ScanCode.h" /> <ClInclude Include="include\Core\HAL\Keyboard\ScanCode.h"/>
<ClInclude Include="include\Core\HAL\Mouse\Mouse.h" /> <ClInclude Include="include\Core\HAL\Mouse\Mouse.h"/>
<ClInclude Include="include\Core\HotReload\HotReload.h" /> <ClInclude Include="include\Core\HotReload\HotReload.h"/>
<ClInclude Include="include\Core\JulietInit.h" /> <ClInclude Include="include\Core\JulietInit.h"/>
<ClInclude Include="include\Core\Logging\LogManager.h" /> <ClInclude Include="include\Core\Logging\LogManager.h"/>
<ClInclude Include="include\Core\Logging\LogTypes.h" /> <ClInclude Include="include\Core\Logging\LogTypes.h"/>
<ClInclude Include="include\Core\Math\Shape.h" /> <ClInclude Include="include\Core\Math\Shape.h"/>
<ClInclude Include="include\Core\Memory\Allocator.h" /> <ClInclude Include="include\Core\Memory\Allocator.h"/>
<ClInclude Include="include\Core\Memory\Utils.h" /> <ClInclude Include="include\Core\Memory\Utils.h"/>
<ClInclude Include="include\Core\Networking\IPAddress.h" /> <ClInclude Include="include\Core\Networking\IPAddress.h"/>
<ClInclude Include="include\Core\Networking\NetworkPacket.h" /> <ClInclude Include="include\Core\Networking\NetworkPacket.h"/>
<ClInclude Include="include\Core\Networking\Socket.h" /> <ClInclude Include="include\Core\Networking\Socket.h"/>
<ClInclude Include="include\Core\Networking\SocketHandle.h" /> <ClInclude Include="include\Core\Networking\SocketHandle.h"/>
<ClInclude Include="include\Core\Networking\TcpListener.h" /> <ClInclude Include="include\Core\Networking\TcpListener.h"/>
<ClInclude Include="include\Core\Networking\TcpSocket.h" /> <ClInclude Include="include\Core\Networking\TcpSocket.h"/>
<ClInclude Include="include\Core\Thread\Thread.h" /> <ClInclude Include="include\Core\Thread\Thread.h"/>
<ClInclude Include="include\Engine\Class.h" /> <ClInclude Include="include\Engine\Class.h"/>
<ClInclude Include="include\Engine\Engine.h" /> <ClInclude Include="include\Engine\Engine.h"/>
<ClInclude Include="include\Graphics\Colors.h" /> <ClInclude Include="include\Graphics\Colors.h"/>
<ClInclude Include="include\Graphics\Graphics.h" /> <ClInclude Include="include\Graphics\Graphics.h"/>
<ClInclude Include="include\Graphics\GraphicsConfig.h" /> <ClInclude Include="include\Graphics\GraphicsConfig.h"/>
<ClInclude Include="include\Graphics\RenderPass.h" /> <ClInclude Include="include\Graphics\RenderPass.h"/>
<ClInclude Include="include\Graphics\Texture.h" /> <ClInclude Include="include\Graphics\Texture.h"/>
<ClInclude Include="include\Juliet.h" /> <ClInclude Include="include\Juliet.h"/>
<ClInclude Include="include\pch.h" /> <ClInclude Include="include\pch.h"/>
<ClInclude Include="src\Core\HAL\Display\DisplayDevice.h" /> <ClInclude Include="src\Core\HAL\Display\DisplayDevice.h"/>
<ClInclude Include="src\Core\HAL\Display\Display_Private.h" /> <ClInclude Include="src\Core\HAL\Display\Display_Private.h"/>
<ClInclude Include="src\Core\HAL\Display\Win32\Win32DisplayEvent.h" /> <ClInclude Include="src\Core\HAL\Display\Win32\Win32DisplayEvent.h"/>
<ClInclude Include="src\Core\HAL\Display\Win32\Win32Window.h" /> <ClInclude Include="src\Core\HAL\Display\Win32\Win32Window.h"/>
<ClInclude Include="src\Core\HAL\Display\Window.h" /> <ClInclude Include="src\Core\HAL\Display\Window.h"/>
<ClInclude Include="src\Core\HAL\Event\KeyboardMapping.h" /> <ClInclude Include="src\Core\HAL\Event\KeyboardMapping.h"/>
<ClInclude Include="src\Core\HAL\Event\Keyboard_Private.h" /> <ClInclude Include="src\Core\HAL\Event\Keyboard_Private.h"/>
<ClInclude Include="src\Core\HAL\Event\Mouse_Private.h" /> <ClInclude Include="src\Core\HAL\Event\Mouse_Private.h"/>
<ClInclude Include="src\Core\HAL\Event\Win32ScanCode.h" /> <ClInclude Include="src\Core\HAL\Event\Win32ScanCode.h"/>
<ClInclude Include="src\Core\HAL\Event\WindowEvent.h" /> <ClInclude Include="src\Core\HAL\Event\WindowEvent.h"/>
<ClInclude Include="src\Core\HAL\Filesystem\Filesystem_Platform.h" /> <ClInclude Include="src\Core\HAL\Filesystem\Filesystem_Platform.h"/>
<ClInclude Include="src\Core\HAL\Filesystem\Filesystem_Private.h" /> <ClInclude Include="src\Core\HAL\Filesystem\Filesystem_Private.h"/>
<ClInclude Include="src\Core\Networking\SocketPlatformImpl.h" /> <ClInclude Include="src\Core\Networking\SocketPlatformImpl.h"/>
<ClInclude Include="src\Core\HAL\Win32.h" /> <ClInclude Include="src\Core\HAL\Win32.h"/>
<ClInclude Include="src\Graphics\D3D12\D3D12Common.h" /> <ClInclude Include="src\Graphics\D3D12\D3D12Common.h"/>
<ClInclude Include="src\Graphics\D3D12\D3D12RenderPass.h" /> <ClInclude Include="src\Graphics\D3D12\D3D12RenderPass.h"/>
<ClInclude Include="src\Graphics\D3D12\D3D12Synchronization.h" /> <ClInclude Include="src\Graphics\D3D12\D3D12Shader.h"/>
<ClInclude Include="src\Graphics\D3D12\D3D12Texture.h" /> <ClInclude Include="src\Graphics\D3D12\D3D12Synchronization.h"/>
<ClInclude Include="src\Graphics\D3D12\DX12CommandList.h" /> <ClInclude Include="src\Graphics\D3D12\D3D12Texture.h"/>
<ClInclude Include="src\Graphics\D3D12\DX12GraphicsDevice.h" /> <ClInclude Include="src\Graphics\D3D12\DX12CommandList.h"/>
<ClInclude Include="src\Graphics\D3D12\DX12Includes.h" /> <ClInclude Include="src\Graphics\D3D12\DX12GraphicsDevice.h"/>
<ClInclude Include="src\Graphics\D3D12\DX12SwapChain.h" /> <ClInclude Include="src\Graphics\D3D12\DX12Includes.h"/>
<ClInclude Include="src\Graphics\D3D12\DX12Utils.h" /> <ClInclude Include="src\Graphics\D3D12\DX12SwapChain.h"/>
<ClInclude Include="src\Graphics\GraphicsDevice.h" /> <ClInclude Include="src\Graphics\D3D12\DX12Utils.h"/>
<ClInclude Include="src\Graphics\GraphicsDevice.h"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\Core\Application\ApplicationManager.cpp" /> <ClCompile Include="src\Core\Application\ApplicationManager.cpp"/>
<ClCompile Include="src\Core\Common\CoreUtils.cpp" /> <ClCompile Include="src\Core\Common\CoreUtils.cpp"/>
<ClCompile Include="src\Core\HAL\Display\Display.cpp" /> <ClCompile Include="src\Core\HAL\Display\Display.cpp"/>
<ClCompile Include="src\Core\HAL\Display\Win32\Win32DisplayDevice.cpp" /> <ClCompile Include="src\Core\HAL\Display\Win32\Win32DisplayDevice.cpp"/>
<ClCompile Include="src\Core\HAL\Display\Win32\Win32DisplayEvent.cpp" /> <ClCompile Include="src\Core\HAL\Display\Win32\Win32DisplayEvent.cpp"/>
<ClCompile Include="src\Core\HAL\Display\Win32\Win32Window.cpp" /> <ClCompile Include="src\Core\HAL\Display\Win32\Win32Window.cpp"/>
<ClCompile Include="src\Core\HAL\DynLib\Win32\DynamicLibrary.cpp" /> <ClCompile Include="src\Core\HAL\DynLib\Win32\DynamicLibrary.cpp"/>
<ClCompile Include="src\Core\HAL\Event\Keyboard.cpp" /> <ClCompile Include="src\Core\HAL\Event\Keyboard.cpp"/>
<ClCompile Include="src\Core\HAL\Event\KeyboardMapping.cpp" /> <ClCompile Include="src\Core\HAL\Event\KeyboardMapping.cpp"/>
<ClCompile Include="src\Core\HAL\Event\Mouse.cpp" /> <ClCompile Include="src\Core\HAL\Event\Mouse.cpp"/>
<ClCompile Include="src\Core\HAL\Event\SystemEvent.cpp" /> <ClCompile Include="src\Core\HAL\Event\SystemEvent.cpp"/>
<ClCompile Include="src\Core\HAL\Event\WindowEvent.cpp" /> <ClCompile Include="src\Core\HAL\Event\WindowEvent.cpp"/>
<ClCompile Include="src\Core\HAL\Filesystem\Filesystem.cpp" /> <ClCompile Include="src\Core\HAL\Filesystem\Filesystem.cpp"/>
<ClCompile Include="src\Core\HAL\Filesystem\Win32\Win32Filesystem.cpp" /> <ClCompile Include="src\Core\HAL\Filesystem\Win32\Win32Filesystem.cpp"/>
<ClCompile Include="src\Core\HotReload\HotReload.cpp" /> <ClCompile Include="src\Core\HotReload\HotReload.cpp"/>
<ClCompile Include="src\Core\HotReload\Win32\Win32HotReload.cpp" /> <ClCompile Include="src\Core\HotReload\Win32\Win32HotReload.cpp"/>
<ClCompile Include="src\Core\Juliet.cpp" /> <ClCompile Include="src\Core\Juliet.cpp"/>
<ClCompile Include="src\Core\Logging\LogManager.cpp" /> <ClCompile Include="src\Core\Logging\LogManager.cpp"/>
<ClCompile Include="src\Core\Memory\Allocator.cpp" /> <ClCompile Include="src\Core\Memory\Allocator.cpp"/>
<ClCompile Include="src\Core\Networking\NetworkPacket.cpp" /> <ClCompile Include="src\Core\Networking\NetworkPacket.cpp"/>
<ClCompile Include="src\Core\Networking\Socket.cpp" /> <ClCompile Include="src\Core\Networking\Socket.cpp"/>
<ClCompile Include="src\Core\Networking\TcpListener.cpp" /> <ClCompile Include="src\Core\Networking\TcpListener.cpp"/>
<ClCompile Include="src\Core\Networking\TcpSocket.cpp" /> <ClCompile Include="src\Core\Networking\TcpSocket.cpp"/>
<ClCompile Include="src\Core\Networking\Win32\Win32SocketPlatformImpl.cpp" /> <ClCompile Include="src\Core\Networking\Win32\Win32SocketPlatformImpl.cpp"/>
<ClCompile Include="src\Engine\Engine.cpp" /> <ClCompile Include="src\Engine\Engine.cpp"/>
<ClCompile Include="src\Graphics\D3D12\D3D12Common.cpp" /> <ClCompile Include="src\Graphics\D3D12\D3D12Common.cpp"/>
<ClCompile Include="src\Graphics\D3D12\D3D12RenderPass.cpp" /> <ClCompile Include="src\Graphics\D3D12\D3D12RenderPass.cpp"/>
<ClCompile Include="src\Graphics\D3D12\D3D12Synchronization.cpp" /> <ClCompile Include="src\Graphics\D3D12\D3D12Shader.cpp"/>
<ClCompile Include="src\Graphics\D3D12\D3D12Texture.cpp" /> <ClCompile Include="src\Graphics\D3D12\D3D12Synchronization.cpp"/>
<ClCompile Include="src\Graphics\D3D12\DX12CommandList.cpp" /> <ClCompile Include="src\Graphics\D3D12\D3D12Texture.cpp"/>
<ClCompile Include="src\Graphics\D3D12\DX12GraphicsDevice.cpp" /> <ClCompile Include="src\Graphics\D3D12\DX12CommandList.cpp"/>
<ClCompile Include="src\Graphics\D3D12\DX12SwapChain.cpp" /> <ClCompile Include="src\Graphics\D3D12\DX12GraphicsDevice.cpp"/>
<ClCompile Include="src\Graphics\D3D12\DX12Utils.cpp" /> <ClCompile Include="src\Graphics\D3D12\DX12SwapChain.cpp"/>
<ClCompile Include="src\Graphics\D3D12\DX12Utils.cpp"/>
<ClCompile Include="src\Graphics\Graphics.cpp"> <ClCompile Include="src\Graphics\Graphics.cpp">
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
@@ -261,8 +265,8 @@
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="include\Core\Thread\Mutex.h" /> <Content Include="include\Core\Thread\Mutex.h"/>
<Content Include="src\TODO.txt" /> <Content Include="src\TODO.txt"/>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include <Juliet.h>
#include <Core/Common/CoreTypes.h> #include <Core/Common/CoreTypes.h>
#include <Juliet.h>
// TODO : Juliet strings // TODO : Juliet strings
#include <string> #include <string>

View File

@@ -9,4 +9,4 @@ namespace Juliet
int32 Width; int32 Width;
int32 Height; int32 Height;
}; };
} } // namespace Juliet

View File

@@ -14,4 +14,4 @@ namespace Juliet
{ {
} }
} }
} } // namespace Juliet

View File

@@ -23,18 +23,18 @@ namespace Juliet
struct ColorTargetInfo struct ColorTargetInfo
{ {
Texture* TargetTexture; Texture* TargetTexture;
uint32 MipLevel; uint32 MipLevel;
union union
{ {
uint32 DepthPlane; uint32 DepthPlane;
uint32 LayerIndex; uint32 LayerIndex;
}; };
bool CycleTexture; // Whether the texture should be cycled if already bound (and load operation != LOAD) bool CycleTexture; // Whether the texture should be cycled if already bound (and load operation != LOAD)
Texture* ResolveTexture; Texture* ResolveTexture;
uint32 ResolveMipLevel; uint32 ResolveMipLevel;
uint32 ResolveLayerIndex; uint32 ResolveLayerIndex;
bool CycleResolveTexture; bool CycleResolveTexture;
FColor ClearColor; FColor ClearColor;
LoadOperation LoadOperation; LoadOperation LoadOperation;

View File

@@ -9,7 +9,7 @@ namespace Juliet::Win32
{ {
namespace namespace
{ {
constexpr auto WindowClassName = L"JulietWindowClass"; constexpr auto WindowClassName = L"JulietWindowClass";
constexpr LPCWSTR WindowClassPtr = WindowClassName; constexpr LPCWSTR WindowClassPtr = WindowClassName;
bool SetupWindowState(NonNullPtr<DisplayDevice> self, NonNullPtr<Window> window, HWND handle) bool SetupWindowState(NonNullPtr<DisplayDevice> self, NonNullPtr<Window> window, HWND handle)
@@ -46,7 +46,7 @@ namespace Juliet::Win32
HINSTANCE instance = GetModuleHandle(nullptr); HINSTANCE instance = GetModuleHandle(nullptr);
// TODO : Put outside, we should not create a new class for each new window // TODO : Put outside, we should not create a new class for each new window
WNDCLASSEX WindowClass = {}; WNDCLASSEX WindowClass = {};
WindowClass.cbSize = sizeof(WNDCLASSEX); WindowClass.cbSize = sizeof(WNDCLASSEX);
WindowClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; WindowClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
WindowClass.lpfnWndProc = Win32MainWindowCallback; WindowClass.lpfnWndProc = Win32MainWindowCallback;
@@ -65,7 +65,7 @@ namespace Juliet::Win32
int x = CW_USEDEFAULT, y = CW_USEDEFAULT; int x = CW_USEDEFAULT, y = CW_USEDEFAULT;
const int w = window->Width, h = window->Height; const int w = window->Width, h = window->Height;
HWND handle = CreateWindowEx(styleEx, WindowClassPtr, L"JULIET TODO PASS TITLE", style, x, y, w, h, nullptr, HWND handle = CreateWindowEx(styleEx, WindowClassPtr, L"JULIET TODO PASS TITLE", style, x, y, w, h, nullptr,
nullptr, instance, nullptr); nullptr, instance, nullptr);
PumpEvents(self); PumpEvents(self);

View File

@@ -1,8 +1,8 @@
#include <pch.h> #include <pch.h>
#include <Core/HAL/Filesystem/Filesystem.h> #include <Core/HAL/Filesystem/Filesystem.h>
#include <Core/HAL/Filesystem/Filesystem_Private.h>
#include <Core/HAL/Filesystem/Filesystem_Platform.h> #include <Core/HAL/Filesystem/Filesystem_Platform.h>
#include <Core/HAL/Filesystem/Filesystem_Private.h>
#include <Core/Memory/Allocator.h> #include <Core/Memory/Allocator.h>
namespace Juliet namespace Juliet

View File

@@ -3,4 +3,4 @@
namespace Juliet::Platform namespace Juliet::Platform
{ {
extern char* GetBasePath(); extern char* GetBasePath();
} }

View File

@@ -4,4 +4,4 @@ namespace Juliet
{ {
extern void InitFilesystem(); extern void InitFilesystem();
extern void ShutdownFilesystem(); extern void ShutdownFilesystem();
} } // namespace Juliet

View File

@@ -23,8 +23,8 @@ namespace Juliet
return lastWriteTime; return lastWriteTime;
} }
constexpr size_t kMaxAttempts = 256; constexpr size_t kMaxAttempts = 256;
constexpr size_t kMaxDLLID = 256; constexpr size_t kMaxDLLID = 256;
constexpr size_t kTempDLLBufferSizeForID = 6; // ID numbers + \0 constexpr size_t kTempDLLBufferSizeForID = 6; // ID numbers + \0
} // namespace } // namespace
@@ -52,7 +52,7 @@ namespace Juliet
size_t basePathLength = strlen(basePath); size_t basePathLength = strlen(basePath);
const size_t tempDllMaxBufferSize = basePathLength + code.TransientDLLName.Size + kTempDLLBufferSizeForID; const size_t tempDllMaxBufferSize = basePathLength + code.TransientDLLName.Size + kTempDLLBufferSizeForID;
auto tempDllPath = static_cast<char*>(Calloc(tempDllMaxBufferSize, sizeof(char))); auto tempDllPath = static_cast<char*>(Calloc(tempDllMaxBufferSize, sizeof(char)));
for (uint32 attempt = 0; attempt < kMaxAttempts; ++attempt) for (uint32 attempt = 0; attempt < kMaxAttempts; ++attempt)
{ {
// int to char // int to char

View File

@@ -0,0 +1,16 @@
#include <pch.h>
#include <Graphics/D3D12/D3D12Shader.h>
namespace Juliet::D3D12
{
namespace
{
void CompileShader(const char* shaderFile) {}
} // namespace
void LoadShader(const char* shaderFile)
{
CompileShader(shaderFile);
}
} // namespace Juliet::D3D12

View File

@@ -0,0 +1,6 @@
#pragma once
namespace Juliet::D3D12
{
extern void LoadShader(const char* shaderFile);
}

View File

@@ -70,9 +70,9 @@ namespace Juliet::D3D12
D3D12_RESOURCE_STATES newTextureUsage); D3D12_RESOURCE_STATES newTextureUsage);
extern D3D12TextureSubresource* FetchTextureSubresource(NonNullPtr<D3D12TextureContainer> container, extern D3D12TextureSubresource* FetchTextureSubresource(NonNullPtr<D3D12TextureContainer> container,
uint32 layer, uint32 level); uint32 layer, uint32 level);
extern void TextureSubresourceBarrier(NonNullPtr<D3D12CommandList> commandList, extern void TextureSubresourceBarrier(NonNullPtr<D3D12CommandList> commandList,
D3D12_RESOURCE_STATES sourceState, D3D12_RESOURCE_STATES destinationState, D3D12_RESOURCE_STATES sourceState, D3D12_RESOURCE_STATES destinationState,
NonNullPtr<D3D12TextureSubresource> textureSubresource); NonNullPtr<D3D12TextureSubresource> textureSubresource);
// Texture usage transition // Texture usage transition
extern void TextureSubresourceTransitionFromDefaultUsage(NonNullPtr<D3D12CommandList> commandList, extern void TextureSubresourceTransitionFromDefaultUsage(NonNullPtr<D3D12CommandList> commandList,

View File

@@ -46,7 +46,7 @@ namespace Juliet::D3D12
uint32 PresentDataCount; uint32 PresentDataCount;
D3D12Fence* InFlightFence; D3D12Fence* InFlightFence;
bool AutoReleaseFence; bool AutoReleaseFence;
D3D12GraphicsCommandListData GraphicsCommandList; D3D12GraphicsCommandListData GraphicsCommandList;
D3D12GraphicsCommandListData ComputeCommandList; D3D12GraphicsCommandListData ComputeCommandList;

View File

@@ -17,6 +17,12 @@
#include <dxgi1_6.h> #include <dxgi1_6.h>
#include "d3d12.h" #include "d3d12.h"
#include <d3d12shader.h>
// TODO: Should not use this when shipping
// Prebake the shaders and embed .dxil files
// When not shipping, thats ok to compile them
// #include <dxcapi.h>
#ifdef _DEBUG #ifdef _DEBUG
#include <dxgidebug.h> #include <dxgidebug.h>
#endif #endif

View File

@@ -11,69 +11,73 @@
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Game\Game.vcxproj">
<Project>{b7b12dcc-1a69-4371-a9fe-d6e7671497b0}</Project>
<Name>Game</Name>
</ProjectReference>
<ProjectReference Include="..\Juliet\Juliet.vcxproj"> <ProjectReference Include="..\Juliet\Juliet.vcxproj">
<Project>{1bbc0b92-e4d8-4838-974b-439c5c501e82}</Project> <Project>{1bbc0b92-e4d8-4838-974b-439c5c501e82}</Project>
<Name>Juliet</Name> <Name>Juliet</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="main.h" /> <ClInclude Include="main.h"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="main.cpp"> <ClCompile Include="main.cpp">
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SupportJustMyCode>true</SupportJustMyCode> <SupportJustMyCode>true</SupportJustMyCode>
<AssemblerOutput>NoListing</AssemblerOutput> <AssemblerOutput>NoListing</AssemblerOutput>
<AssemblerListingLocation>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</AssemblerListingLocation> <AssemblerListingLocation>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</AssemblerListingLocation>
<UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions>
<BrowseInformationFile>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</BrowseInformationFile> <BrowseInformationFile>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</BrowseInformationFile>
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
<ConformanceMode>Default</ConformanceMode> <ConformanceMode>Default</ConformanceMode>
<DiagnosticsFormat>Column</DiagnosticsFormat> <DiagnosticsFormat>Column</DiagnosticsFormat>
<ExceptionHandling>false</ExceptionHandling> <ExceptionHandling>false</ExceptionHandling>
<EnableASAN>false</EnableASAN> <EnableASAN>false</EnableASAN>
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel> <FloatingPointModel>Fast</FloatingPointModel>
<InlineFunctionExpansion>Default</InlineFunctionExpansion> <InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>false</IntrinsicFunctions> <IntrinsicFunctions>false</IntrinsicFunctions>
<LanguageStandard>stdcpp20</LanguageStandard> <LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard_C>Default</LanguageStandard_C> <LanguageStandard_C>Default</LanguageStandard_C>
<ModuleDependenciesFile>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</ModuleDependenciesFile> <ModuleDependenciesFile>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</ModuleDependenciesFile>
<OmitDefaultLibName>false</OmitDefaultLibName> <OmitDefaultLibName>false</OmitDefaultLibName>
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
<ObjectFileName>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</ObjectFileName> <ObjectFileName>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</ObjectFileName>
<CallingConvention>Cdecl</CallingConvention> <CallingConvention>Cdecl</CallingConvention>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\JulietApp.pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\JulietApp.pch</PrecompiledHeaderOutputFile>
<PreprocessToFile>false</PreprocessToFile> <PreprocessToFile>false</PreprocessToFile>
<PreprocessKeepComments>false</PreprocessKeepComments> <PreprocessKeepComments>false</PreprocessKeepComments>
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies> <ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
<ShowIncludes>false</ShowIncludes> <ShowIncludes>false</ShowIncludes>
<SourceDependenciesFile>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</SourceDependenciesFile> <SourceDependenciesFile>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</SourceDependenciesFile>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<BufferSecurityCheck>true</BufferSecurityCheck> <BufferSecurityCheck>true</BufferSecurityCheck>
<SmallerTypeCheck>false</SmallerTypeCheck> <SmallerTypeCheck>false</SmallerTypeCheck>
<StructMemberAlignment>Default</StructMemberAlignment> <StructMemberAlignment>Default</StructMemberAlignment>
<TrackerLogDirectory>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\JulietApp.tlog\</TrackerLogDirectory> <TrackerLogDirectory>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\JulietApp.tlog\</TrackerLogDirectory>
<MinimalRebuildFromTracking>true</MinimalRebuildFromTracking> <MinimalRebuildFromTracking>true</MinimalRebuildFromTracking>
<TreatWarningAsError>false</TreatWarningAsError> <TreatWarningAsError>false</TreatWarningAsError>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<XMLDocumentationFileName>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</XMLDocumentationFileName> <XMLDocumentationFileName>W:\Classified\Juliet\Intermediate\JulietApp\x64\Debug\</XMLDocumentationFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<IntelJCCErratum>false</IntelJCCErratum> <IntelJCCErratum>false</IntelJCCErratum>
<BuildStlModules>false</BuildStlModules> <BuildStlModules>false</BuildStlModules>
<TreatExternalTemplatesAsInternal>true</TreatExternalTemplatesAsInternal> <TreatExternalTemplatesAsInternal>true</TreatExternalTemplatesAsInternal>
<PreprocessorDefinitions>_DEBUG;JULIET_WIN32;_UNICODE;UNICODE;</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;JULIET_WIN32;_UNICODE;UNICODE;</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<LinkCompiled>true</LinkCompiled> <LinkCompiled>true</LinkCompiled>
<ClangClMode>true</ClangClMode> <ClangClMode>true</ClangClMode>
<MSCVersion>Default</MSCVersion> <MSCVersion>Default</MSCVersion>
<AdditionalOptions>--target=amd64-pc-windows-msvc </AdditionalOptions> <AdditionalOptions>--target=amd64-pc-windows-msvc</AdditionalOptions>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion> <VCProjectVersion>17.0</VCProjectVersion>
@@ -111,12 +115,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IntDir>$(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> <IntDir>$(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</OutDir> <OutDir>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</OutDir>
<IncludePath>$(SolutionDir)Juliet\include\;$(SolutionDir)JulietApp;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)\bin\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(SolutionDir)Juliet\include\;$(SolutionDir)JulietApp;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)\bin\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
<OutDir>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</OutDir> <OutDir>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> <IntDir>$(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup> </PropertyGroup>
@@ -130,11 +130,13 @@
<ExceptionHandling>false</ExceptionHandling> <ExceptionHandling>false</ExceptionHandling>
<FloatingPointModel>Fast</FloatingPointModel> <FloatingPointModel>Fast</FloatingPointModel>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<AdditionalIncludeDirectories>$(SolutionDir)Juliet\include\;$(SolutionDir)JulietApp;$(IncludePath)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Juliet.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>Juliet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\lib\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
</Link> </Link>
<PreBuildEvent> <PreBuildEvent>
<Command></Command> <Command></Command>
@@ -152,6 +154,7 @@
<ExceptionHandling>false</ExceptionHandling> <ExceptionHandling>false</ExceptionHandling>
<FloatingPointModel>Fast</FloatingPointModel> <FloatingPointModel>Fast</FloatingPointModel>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<AdditionalIncludeDirectories>$(SolutionDir)Juliet\include\;$(SolutionDir)JulietApp;$(IncludePath)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@@ -159,6 +162,7 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Juliet.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>Juliet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\lib\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>

View File

@@ -58,12 +58,12 @@ void JulietApplication::Init()
if (Running) if (Running)
{ {
AttachToWindow(GraphicsDevice, MainWindow); AttachToWindow(GraphicsDevice, MainWindow);
//Game = LoadDynamicLibrary("Game.dll"); // Game = LoadDynamicLibrary("Game.dll");
GameCode.Functions = reinterpret_cast<void**>(&Game); GameCode.Functions = reinterpret_cast<void**>(&Game);
GameCode.FunctionCount = ArraySize(GameFunctionTable); GameCode.FunctionCount = ArraySize(GameFunctionTable);
GameCode.FunctionNames = GameFunctionTable; GameCode.FunctionNames = GameFunctionTable;
InitHotReloadCode(GameCode, StringBufferParam("Game.dll"),StringBufferParam("Game_Temp.dll"), StringBufferParam("lock.tmp")); InitHotReloadCode(GameCode, StringBufferParam("Game.dll"), StringBufferParam("Game_Temp.dll"), StringBufferParam("lock.tmp"));
if ((Running = GameCode.IsValid)) if ((Running = GameCode.IsValid))
{ {
Game.Init(); Game.Init();