Compare commits

...

11 Commits

Author SHA1 Message Date
0a75554071 Updated memory debugger to have a better display of memory
Made with gemini
2026-01-25 15:19:39 -05:00
3dd0a4a6f1 feat: Implement a memory arena system with an ImGui-based visual debugger for allocation visualization.
Made using Gemini
2026-01-25 12:14:06 -05:00
0788fdeb98 Upgraded MemoryArena to allow poping memory and creating an arena for a specific part and not pushing completely on the same stack.
Made with Gemini
+ Updates skills to have better agents.
2026-01-25 11:01:32 -05:00
73db1174f2 feat: add initial skill definitions for debugger, C++ game engine, graphics, and video game tester roles. 2026-01-24 18:28:41 -05:00
d4e4229d61 Fixing the D3D12DescriptorHeap.cpp memory leak. Was creating descriptor heap every time a pipeline was bound when we only need it once per commandlist.
fixed some vibe code weird shit
2026-01-23 21:43:48 -05:00
c10d371836 Cleaned up memory arena debugger + tag.
WIP
2026-01-21 20:36:38 -05:00
a41a5e6b20 generated solution 2026-01-21 19:05:34 -05:00
c5af6850c2 Moved imgui bff to external folder and not in the submodule (oops) 2026-01-21 19:04:53 -05:00
891c404889 Added debug renderer + imgui renderer
All code made by gemini with some help
2026-01-20 22:46:10 -05:00
0687ce5af1 MemoryArena updates using Gemini. Add some debug tag so we can debug memory allocations 2026-01-20 22:16:04 -05:00
d2b91c46d4 Misc changes
Update gitignore + adding some agent skills and tweaking workflows.
Also updated some scipts
2026-01-20 22:14:54 -05:00
66 changed files with 3962 additions and 775 deletions

View File

@@ -2,6 +2,8 @@
trigger: always_on
---
Code compiles with all warning active and warning as errors.
use static_cast or reinterpret_cast but not parenthesis for casting.
No exceptions
Use [[nodiscard]]
auto is allowed but when its a pointer add the * and when reference adds the &
@@ -10,4 +12,5 @@ Types are CamelCase
Functions are CamelCase.
Add Assert to make sure all assumptions are good. Parameters of functions for example should be verified with Assert.
Code should be self commented using proper variable names, types and functions. No need to add comments most of the time, unless the algorithm is very complex and hard to read.
When creating a new system framework, make a unit test. To make the unit test we should not modify the framework code for special unit test case.
When creating a new system framework, make a unit test. To make the unit test we should not modify the framework code for special unit test case.
Always put braces for if,else,for,while etc.

View File

@@ -1,6 +1,8 @@
---
name: C++ Game Engine Programmer
name: cpp-game-engine-programmer
description: An expert C++ systems programmer specialized in game engine architecture, memory management, and D3D12 graphics.
trusted_commands:
- "misc\agent_build.bat *"
---
# C++ Game Engine Programmer Skill

View File

@@ -0,0 +1,25 @@
---
name: debugger-programmer
description: An expert C++ systems programmer specialized in game engine debugging
trusted_commands:
- "miscagent_build.bat *"
---
# C++ Game Engine Programmer Skill
## Role
You are a senior engine architect for the Juliet project. Your expertise lies in debugging C++ game engine. You add logs and use debug tricks to find the root cause of the issues.
## Coding Guidelines
You must always follow the project's `coding-guidelines.md`. Key tenets include:
- **No Exceptions**: Use asserts and return codes.
- **[[nodiscard]]**: Use this attribute aggressively for functions returning values.
- **Type Safety**: Use strong types (CamelCase).
- **Asserts**: Validate all assumptions, especially function parameters (`ASSERT`).
## Workflows
- **Building**: Use the misc\Agent_build.bat or the /build command to compile the project.
- **Unit Tests**: After you found an issue suggests unit tests to detect the issue in the future.
## Tone
Professional, technical, and precise. Focus on explaining your debugging strategy.

View File

@@ -1,5 +1,5 @@
---
name: Graphics Programmer & Tech Artist
name: graphics-programmer
description: An expert in 3D rendering, shader development (HLSL), and visual aesthetics, acting as a bridge between technical implementation and artistic vision.
---

View File

@@ -1,5 +1,5 @@
---
name: Video Game Tester
name: video-game-tester
description: A rigorous QA specialist and test automation engineer focused on verifying game stability and correctness.
---

View File

@@ -3,14 +3,15 @@ description: Build the Juliet project using FastBuild
---
// turbo-all
// @auto-approve: true
This workflow sets up the Juliet build environment and runs `fbuild`.
1. To build a specific configuration (e.g., msvc-Debug):
`cmd /c "misc\shell.bat & fbuild msvc-Debug"`
`misc\agent_build.bat clang-Debug"`
2. To build the default clang:
`cmd /c "misc\shell.bat & fbuild clang"`
`misc\agent_build.bat clang"`
3. To see all available targets:
`cmd /c "misc\shell.bat & fbuild -showtargets"`
`misc\agent_build.bat -showtargets"`

View File

@@ -1,9 +1,10 @@
---
description: Recompile shaders for the Juliet project
---
// turbo-all
This workflow recompiles all shaders using the `recompile_shaders.bat` script.
1. Recompile all shaders:
`cmd /c "misc\shell.bat & misc\recompile_shaders.bat"`
`misc\recompile_shaders.bat"`

4
.gitignore vendored
View File

@@ -14,6 +14,10 @@
.vs/
[Ii]ntermediate/
# Logs
build_*.txt
launch_*.txt
# Prerequisites
*.d

View File

@@ -1,45 +1,64 @@
# Memory System Status & Migration Plan
# Paged Memory Arena Architecture
## Completed Work
## Status
**Implemented & Active** (Jan 2026)
### Core Systems
- **MemoryArena**: Implemented linear allocator with alignment, markers, and reset support.
- **Global Arenas**:
- `ScratchArena` (64MB): Transient per-frame memory.
- `EngineArena` (256MB): Persistent engine memory (internal).
- `GameArena` (512MB): Persistent game memory (exported to Game DLL).
- **Helpers**: Added `ArenaPushType<T>` and `ArenaPushArray<T>` with automatic zero-initialization.
## Overview
The memory system uses a **Paged Arena** model backed by global **Memory Pools**. This architecture supports indefinite growth, efficient clearing, and minimizes OS-level allocations by sub-allocating from large pre-reserved buffers.
### Migrated Subsystems
- **Display**: `Win32Window` and `Win32DisplayDevice` now use `EngineArena`.
- **Game Entities**: `Entity.h` uses `GameArena` for entity allocation; manual `free` calls removed from `game.cpp`.
- **Hot Reload**: `HotReload.cpp` (persistent paths to `EngineArena`) and `Win32HotReload.cpp` (temp paths to `ScratchArena`).
## Architecture
## Remaining Work
### 1. Memory Pool (`MemoryPool`)
A Global Source of memory blocks.
- **Role**: Manages a large contiguous memory region (e.g., 512MB for Game).
- **Implementation**: Free List Allocator.
- **Operations**: `AllocateBlock` (First-Fit with Splitting), `FreeBlock` (Returns to list).
- **Optimization**: **Block Splitting** is implemented to preserve free space. If a block in the free list is significantly larger than requested (`Alloc + Header + 16 bytes`), it is split, and the remainder is returned to the free list. This prevents pool exhaustion from small allocations consuming large blocks.
- **Instances**:
- `g_EngineMemory` (256MB)
- `g_GameMemory` (512MB)
- `g_ScratchMemory` (64MB)
The following subsystems still use legacy `malloc`/`calloc`/`realloc`/`free` and need to be migrated.
### 2. Memory Arena (`MemoryArena`)
A High-Level Allocator.
- **Structure**: A linked list of `MemoryBlocks`.
- **Behavior**:
- **Growth**: Starts with one block. If an allocation exceeds capacity, it requests a new Block (Page) from the backing Pool and links it.
- **Alloc**: Linear bump-pointer within the current block.
- **Clear**: Returns all blocks (except the first) to the Pool. Resets the first block.
- **Realloc**: Supports in-place expansion (if top of stack) or copy-and-move.
- **Instances**: `GetGameArena()`, `GetEngineArena()`, `GetScratchArena()`.
### 3. Memory Block (`MemoryBlock`)
The unit of exchange between Pool and Arena.
- **Header**: Includes `Magic` (debug safety), `Next` pointer, `TotalSize` (renamed from `Size`), and `Used` offset.
- **Alignment**: 16-byte alignment enforced.
- **Safety**: Debug builds use memory poisoning (`0xCD` on alloc, `0xDD` on free) and Magic number checks to detect corruption.
### 4. Arena Pop (`ArenaPop`)
Support for LIFO allocations (reclaiming memory).
- **Behavior**: Checks if the pointer is at the very top of the stack (`CurrentBlock->Used`).
- **Optimization**: If valid, decrements `Used` to reclaim space. If not (fragmented), does nothing.
- **Usage**: Critical for `ImGui` vector resizing to prevent exponential memory consumption.
### IO System
- **Files**: `Core/HAL/IO/IOStream.cpp`, `Core/HAL/IO/Win32/Win32IOStream.cpp`
- **Allocations**: `IOStream` instance, data buffers, `Win32IOStreamDataPayload`.
- **Challenge**: `Realloc` is used for growing buffers.
- **Strategy**:
- `IOStream` struct -> `ScratchArena` (if transient) or `EngineArena`.
- Buffers: Evaluate if `ArenaPush` with large enough capacity is sufficient, or implement a growable buffer on top of arena (or use `std::vector` with custom allocator if absolutely needed, but prefer simple fixed max size if possible).
## Usage
### Graphics / Debug
- **Files**: `Graphics/DebugDisplayRenderer.cpp`
- **Allocations**: `DepthTestedVertices`, `OverlayVertices`.
- **Strategy**: Use `EngineArena` or a dedicated `RenderArena` if these are persistent. If per-frame, move to `ScratchArena`.
```cpp
// 1. Get an Arena
MemoryArena* arena = GetScratchArena();
### Shader Compiler
- **Files**: `JulietShaderCompiler/ShaderCompiler.cpp`
- **Allocations**: Argument arrays, file buffers.
- **Strategy**: Use `ScratchArena` for all compilation tasks as they are transient.
// 2. Push Data
MyStruct* data = ArenaPushType<MyStruct>(arena, "Tag");
void* raw = ArenaPush(arena, 1024, 16, "RawBuffer");
### Filesystem
- **Files**: `Core/HAL/Filesystem/Filesystem.cpp`
- **Allocations**: `CachedBasePath`.
- **Strategy**: Migrate to `EngineArena` (persistent).
// 3. Pop Data (LIFO)
ArenaPop(arena, raw, 1024); // Reclaims memory
// 4. Reset (Scratch only)
ScratchArenaReset(); // Returns pages to g_ScratchMemory
```
## Migration Status
- **ImGui**: Migrated to `GetEngineArena()` (Paged) with `ArenaPop` support for efficient vector resizing.
- **Display/Window**: Uses Engine Arena.
- **Game Entities**: Uses Game Arena.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -13,9 +13,12 @@ Output main(uint vertexIndex : SV_VertexID)
// Retrieve the vertex buffer using SM6.6 bindless syntax
ByteAddressBuffer buffer = ResourceDescriptorHeap[BufferIndex];
// TextureIndex is used as vertex offset for consolidated buffer (depth-tested at 0, overlay at halfMax)
uint actualVertexIndex = vertexIndex + TextureIndex;
// Vertex layout: float3 Position (12 bytes) + float4 Color (16 bytes) = 28 bytes stride
uint stride = 28;
uint offset = vertexIndex * stride;
uint offset = actualVertexIndex * stride;
float3 pos = asfloat(buffer.Load3(offset));
float4 col = asfloat(buffer.Load4(offset + 12));

View File

@@ -0,0 +1,38 @@
struct Input
{
float4 Color : TEXCOORD0;
float2 UV : TEXCOORD1;
};
#include "RootConstants.hlsl"
float4 main(Input input) : SV_Target0
{
// Retrieve the texture using SM6.6 bindless syntax
// Texture2D texture = ResourceDescriptorHeap[TextureIndex]; (Must cast to Texture2D<float4>)
// Wait, ResourceDescriptorHeap indexing returns a wrapper, usually we use Textures[TextureIndex]?
// Juliet seems to use `ResourceDescriptorHeap` for Buffers.
// Let's check Triangle.vert/frag.
// In bindless, usually:
// Texture2D<float4> tex = ResourceDescriptorHeap[TextureIndex];
// SamplerState samp = SamplerDescriptorHeap[0]; // Assuming static sampler or passed index
// I need to check how Juliet accesses textures.
// I'll assume standard SM6.6 usage.
Texture2D<float4> tex = ResourceDescriptorHeap[TextureIndex];
SamplerState samp = SamplerDescriptorHeap[0]; // Point sampler or Linear? ImGui usually uses Linear.
// D3D12GraphicsDevice.cpp created static samplers.
// Root signature has Static Samplers.
// RegisterSpace 0.
// Sampler register 0 is Point/Nearest?
// Let's check CreateGraphicsRootSignature in D3D12GraphicsDevice.cpp.
// It creates s_nearest at 0.
// If I want Linear, I might need another sampler or rely on s_nearest for font (pixel art font?)
// Default ImGui font is usually antialiased, so Linear is preferred.
// But pixel aligned UI...
// I will use `SamplerDescriptorHeap[0]` for now.
return input.Color * tex.Sample(samp, input.UV);
}

View File

@@ -0,0 +1,70 @@
struct Output
{
float4 Color : TEXCOORD0;
float2 UV : TEXCOORD1;
float4 Position : SV_Position;
};
#include "RootConstants.hlsl"
struct Vertex
{
float2 Pos;
float2 UV;
uint Color;
};
Output main(uint vertexIndex : SV_VertexID)
{
Output output;
// Retrieve the vertex buffer using SM6.6 bindless syntax
ByteAddressBuffer buffer = ResourceDescriptorHeap[BufferIndex];
// Add VertexOffset for indexed drawing with bindless buffers
// (SV_VertexID in indexed draw is raw index from index buffer, doesn't include BaseVertexLocation)
uint actualVertexIndex = vertexIndex + VertexOffset;
// ImDrawVert stride = 20 bytes (Vec2 pos + Vec2 uv + uint color)
uint stride = 20;
uint offset = actualVertexIndex * stride;
float2 pos = asfloat(buffer.Load2(offset));
float2 uv = asfloat(buffer.Load2(offset + 8));
uint col = buffer.Load(offset + 16);
// Unpack color (uint to float4)
// ImGui colors are 0xAABBGGRR (ABGR packed)
// We need to unpack to float4.
// HLSL unpacks as little endian.
// uint 0xAABBGGRR -> byte0=RR, byte1=GG, byte2=BB, byte3=AA
float4 c;
c.x = float(col & 0xFF) / 255.0f;
c.y = float((col >> 8) & 0xFF) / 255.0f;
c.z = float((col >> 16) & 0xFF) / 255.0f;
c.w = float((col >> 24) & 0xFF) / 255.0f;
// Transform
// ImGui sends pixel coordinates.
// We need to transform to NDC [-1, 1].
// PushConstants should contain Scale and Translate.
// float2 Scale = 2.0 / DisplaySize
// float2 Translate = -1.0 - (DisplayPos * Scale)
// We will assume PushConstants are float2 Scale, float2 Translate.
// Struct in RootConstants.hlsl?
// RootConstants.hlsl likely defines `cbuffer PushConstants : register(b0)`.
// Let's assume standard push constants usage.
// Debug.vert.hlsl used `ViewProjection`.
// We need to customize PushConstants or reuse `ViewProjection` slot?
// Juliet uses 128 bytes of push constants.
// We can map float4 ProjectionMatrix (or similar).
// Use Scale and Translate from RootConstants
output.Position = float4(pos * Scale + Translate, 0.0f, 1.0f);
output.Color = c;
output.UV = uv;
return output;
}

291
External/ImGui.vcxproj vendored Normal file
View File

@@ -0,0 +1,291 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="x64-Debug|x64">
<Configuration>x64-Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Profile|x64">
<Configuration>x64-Profile</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Release|x64">
<Configuration>x64-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Debug|x64">
<Configuration>x64Clang-Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Profile|x64">
<Configuration>x64Clang-Profile</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Release|x64">
<Configuration>x64Clang-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="imgui\.editorconfig" />
<CustomBuild Include="imgui\backends\imgui_impl_allegro5.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_allegro5.h" />
<CustomBuild Include="imgui\backends\imgui_impl_android.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_android.h" />
<CustomBuild Include="imgui\backends\imgui_impl_dx10.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_dx10.h" />
<CustomBuild Include="imgui\backends\imgui_impl_dx11.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_dx11.h" />
<CustomBuild Include="imgui\backends\imgui_impl_dx12.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_dx12.h" />
<CustomBuild Include="imgui\backends\imgui_impl_dx9.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_dx9.h" />
<CustomBuild Include="imgui\backends\imgui_impl_glfw.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_glfw.h" />
<CustomBuild Include="imgui\backends\imgui_impl_glut.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_glut.h" />
<CustomBuild Include="imgui\backends\imgui_impl_metal.h" />
<CustomBuild Include="imgui\backends\imgui_impl_metal.mm" />
<CustomBuild Include="imgui\backends\imgui_impl_null.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_null.h" />
<CustomBuild Include="imgui\backends\imgui_impl_opengl2.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_opengl2.h" />
<CustomBuild Include="imgui\backends\imgui_impl_opengl3.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_opengl3.h" />
<CustomBuild Include="imgui\backends\imgui_impl_opengl3_loader.h" />
<CustomBuild Include="imgui\backends\imgui_impl_osx.h" />
<CustomBuild Include="imgui\backends\imgui_impl_osx.mm" />
<CustomBuild Include="imgui\backends\imgui_impl_sdl2.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_sdl2.h" />
<CustomBuild Include="imgui\backends\imgui_impl_sdl3.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_sdl3.h" />
<CustomBuild Include="imgui\backends\imgui_impl_sdlgpu3.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_sdlgpu3.h" />
<CustomBuild Include="imgui\backends\imgui_impl_sdlgpu3_shaders.h" />
<CustomBuild Include="imgui\backends\imgui_impl_sdlrenderer2.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_sdlrenderer2.h" />
<CustomBuild Include="imgui\backends\imgui_impl_sdlrenderer3.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_sdlrenderer3.h" />
<CustomBuild Include="imgui\backends\imgui_impl_vulkan.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_vulkan.h" />
<CustomBuild Include="imgui\backends\imgui_impl_wgpu.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_wgpu.h" />
<CustomBuild Include="imgui\backends\imgui_impl_win32.cpp" />
<CustomBuild Include="imgui\backends\imgui_impl_win32.h" />
<CustomBuild Include="imgui\examples\example_allegro5\imconfig_allegro5.h" />
<CustomBuild Include="imgui\examples\example_allegro5\main.cpp" />
<CustomBuild Include="imgui\examples\example_android_opengl3\main.cpp" />
<CustomBuild Include="imgui\examples\example_apple_metal\main.mm" />
<CustomBuild Include="imgui\examples\example_apple_opengl2\main.mm" />
<CustomBuild Include="imgui\examples\example_glfw_metal\main.mm" />
<CustomBuild Include="imgui\examples\example_glfw_opengl2\main.cpp" />
<CustomBuild Include="imgui\examples\example_glfw_opengl3\main.cpp" />
<CustomBuild Include="imgui\examples\example_glfw_vulkan\main.cpp" />
<CustomBuild Include="imgui\examples\example_glfw_wgpu\main.cpp" />
<CustomBuild Include="imgui\examples\example_glut_opengl2\main.cpp" />
<CustomBuild Include="imgui\examples\example_null\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl2_directx11\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl2_metal\main.mm" />
<CustomBuild Include="imgui\examples\example_sdl2_opengl2\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl2_opengl3\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl2_sdlrenderer2\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl2_vulkan\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl2_wgpu\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl3_directx11\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl3_metal\main.mm" />
<CustomBuild Include="imgui\examples\example_sdl3_opengl3\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl3_sdlgpu3\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl3_sdlrenderer3\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl3_vulkan\main.cpp" />
<CustomBuild Include="imgui\examples\example_sdl3_wgpu\main.cpp" />
<CustomBuild Include="imgui\examples\example_win32_directx10\main.cpp" />
<CustomBuild Include="imgui\examples\example_win32_directx11\main.cpp" />
<CustomBuild Include="imgui\examples\example_win32_directx12\main.cpp" />
<CustomBuild Include="imgui\examples\example_win32_directx9\main.cpp" />
<CustomBuild Include="imgui\examples\example_win32_opengl3\main.cpp" />
<CustomBuild Include="imgui\examples\example_win32_vulkan\main.cpp" />
<CustomBuild Include="imgui\examples\libs\emscripten\emscripten_mainloop_stub.h" />
<CustomBuild Include="imgui\examples\libs\glfw\include\GLFW\glfw3.h" />
<CustomBuild Include="imgui\examples\libs\glfw\include\GLFW\glfw3native.h" />
<CustomBuild Include="imgui\examples\libs\usynergy\uSynergy.c" />
<CustomBuild Include="imgui\examples\libs\usynergy\uSynergy.h" />
<CustomBuild Include="imgui\imconfig.h" />
<CustomBuild Include="imgui\imgui.cpp" />
<CustomBuild Include="imgui\imgui.h" />
<CustomBuild Include="imgui\imgui_demo.cpp" />
<CustomBuild Include="imgui\imgui_draw.cpp" />
<CustomBuild Include="imgui\imgui_internal.h" />
<CustomBuild Include="imgui\imgui_tables.cpp" />
<CustomBuild Include="imgui\imgui_widgets.cpp" />
<CustomBuild Include="imgui\imstb_rectpack.h" />
<CustomBuild Include="imgui\imstb_textedit.h" />
<CustomBuild Include="imgui\imstb_truetype.h" />
<CustomBuild Include="imgui\misc\cpp\imgui_stdlib.cpp" />
<CustomBuild Include="imgui\misc\cpp\imgui_stdlib.h" />
<CustomBuild Include="imgui\misc\debuggers\imgui.natvis" />
<CustomBuild Include="imgui\misc\fonts\binary_to_compressed_c.cpp" />
<CustomBuild Include="imgui\misc\freetype\imgui_freetype.cpp" />
<CustomBuild Include="imgui\misc\freetype\imgui_freetype.h" />
<CustomBuild Include="imgui\misc\single_file\imgui_single_file.h" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{c16ffe36-6c94-4f93-bc2a-7f5284b7d434}</ProjectGuid>
<Keyword>MakeFileProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;imgui;imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;imgui;imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;imgui;imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;imgui;imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;imgui;imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;imgui;imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<Import Condition="'$(ConfigurationType)' == 'Makefile' and Exists('$(VCTargetsPath)\Platforms\$(Platform)\SCE.Makefile.$(Platform).targets')" Project="$(VCTargetsPath)\Platforms\$(Platform)\SCE.Makefile.$(Platform).targets" />
<Import Condition="'$(ConfigurationType)' == 'Makefile' and '$(AndroidAPILevel)' != '' and Exists('$(VCTargetsPath)\Application Type\$(ApplicationType)\$(ApplicationTypeRevision)\Android.Common.targets')" Project="$(VCTargetsPath)\Application Type\$(ApplicationType)\$(ApplicationTypeRevision)\Android.Common.targets" />
</Project>

518
External/ImGui.vcxproj.filters vendored Normal file
View File

@@ -0,0 +1,518 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<CustomBuild Include="imgui\.editorconfig">
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_allegro5.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_allegro5.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_android.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_android.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_dx10.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_dx10.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_dx11.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_dx11.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_dx12.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_dx12.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_dx9.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_dx9.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_glfw.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_glfw.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_glut.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_glut.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_metal.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_metal.mm">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_null.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_null.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_opengl2.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_opengl2.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_opengl3.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_opengl3.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_opengl3_loader.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_osx.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_osx.mm">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdl2.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdl2.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdl3.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdl3.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdlgpu3.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdlgpu3.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdlgpu3_shaders.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdlrenderer2.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdlrenderer2.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdlrenderer3.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_sdlrenderer3.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_vulkan.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_vulkan.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_wgpu.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_wgpu.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_win32.cpp">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\backends\imgui_impl_win32.h">
<Filter>backends</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_allegro5\imconfig_allegro5.h">
<Filter>examples\example_allegro5</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_allegro5\main.cpp">
<Filter>examples\example_allegro5</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_android_opengl3\main.cpp">
<Filter>examples\example_android_opengl3</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_apple_metal\main.mm">
<Filter>examples\example_apple_metal</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_apple_opengl2\main.mm">
<Filter>examples\example_apple_opengl2</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_glfw_metal\main.mm">
<Filter>examples\example_glfw_metal</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_glfw_opengl2\main.cpp">
<Filter>examples\example_glfw_opengl2</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_glfw_opengl3\main.cpp">
<Filter>examples\example_glfw_opengl3</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_glfw_vulkan\main.cpp">
<Filter>examples\example_glfw_vulkan</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_glfw_wgpu\main.cpp">
<Filter>examples\example_glfw_wgpu</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_glut_opengl2\main.cpp">
<Filter>examples\example_glut_opengl2</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_null\main.cpp">
<Filter>examples\example_null</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl2_directx11\main.cpp">
<Filter>examples\example_sdl2_directx11</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl2_metal\main.mm">
<Filter>examples\example_sdl2_metal</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl2_opengl2\main.cpp">
<Filter>examples\example_sdl2_opengl2</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl2_opengl3\main.cpp">
<Filter>examples\example_sdl2_opengl3</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl2_sdlrenderer2\main.cpp">
<Filter>examples\example_sdl2_sdlrenderer2</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl2_vulkan\main.cpp">
<Filter>examples\example_sdl2_vulkan</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl2_wgpu\main.cpp">
<Filter>examples\example_sdl2_wgpu</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl3_directx11\main.cpp">
<Filter>examples\example_sdl3_directx11</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl3_metal\main.mm">
<Filter>examples\example_sdl3_metal</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl3_opengl3\main.cpp">
<Filter>examples\example_sdl3_opengl3</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl3_sdlgpu3\main.cpp">
<Filter>examples\example_sdl3_sdlgpu3</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl3_sdlrenderer3\main.cpp">
<Filter>examples\example_sdl3_sdlrenderer3</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl3_vulkan\main.cpp">
<Filter>examples\example_sdl3_vulkan</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_sdl3_wgpu\main.cpp">
<Filter>examples\example_sdl3_wgpu</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_win32_directx10\main.cpp">
<Filter>examples\example_win32_directx10</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_win32_directx11\main.cpp">
<Filter>examples\example_win32_directx11</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_win32_directx12\main.cpp">
<Filter>examples\example_win32_directx12</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_win32_directx9\main.cpp">
<Filter>examples\example_win32_directx9</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_win32_opengl3\main.cpp">
<Filter>examples\example_win32_opengl3</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\example_win32_vulkan\main.cpp">
<Filter>examples\example_win32_vulkan</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\libs\emscripten\emscripten_mainloop_stub.h">
<Filter>examples\libs\emscripten</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\libs\glfw\include\GLFW\glfw3.h">
<Filter>examples\libs\glfw\include\GLFW</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\libs\glfw\include\GLFW\glfw3native.h">
<Filter>examples\libs\glfw\include\GLFW</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\libs\usynergy\uSynergy.c">
<Filter>examples\libs\usynergy</Filter>
</CustomBuild>
<CustomBuild Include="imgui\examples\libs\usynergy\uSynergy.h">
<Filter>examples\libs\usynergy</Filter>
</CustomBuild>
<CustomBuild Include="imgui\imconfig.h">
</CustomBuild>
<CustomBuild Include="imgui\imgui.cpp">
</CustomBuild>
<CustomBuild Include="imgui\imgui.h">
</CustomBuild>
<CustomBuild Include="imgui\imgui_demo.cpp">
</CustomBuild>
<CustomBuild Include="imgui\imgui_draw.cpp">
</CustomBuild>
<CustomBuild Include="imgui\imgui_internal.h">
</CustomBuild>
<CustomBuild Include="imgui\imgui_tables.cpp">
</CustomBuild>
<CustomBuild Include="imgui\imgui_widgets.cpp">
</CustomBuild>
<CustomBuild Include="imgui\imstb_rectpack.h">
</CustomBuild>
<CustomBuild Include="imgui\imstb_textedit.h">
</CustomBuild>
<CustomBuild Include="imgui\imstb_truetype.h">
</CustomBuild>
<CustomBuild Include="imgui\misc\cpp\imgui_stdlib.cpp">
<Filter>misc\cpp</Filter>
</CustomBuild>
<CustomBuild Include="imgui\misc\cpp\imgui_stdlib.h">
<Filter>misc\cpp</Filter>
</CustomBuild>
<CustomBuild Include="imgui\misc\debuggers\imgui.natvis">
<Filter>misc\debuggers</Filter>
</CustomBuild>
<CustomBuild Include="imgui\misc\fonts\binary_to_compressed_c.cpp">
<Filter>misc\fonts</Filter>
</CustomBuild>
<CustomBuild Include="imgui\misc\freetype\imgui_freetype.cpp">
<Filter>misc\freetype</Filter>
</CustomBuild>
<CustomBuild Include="imgui\misc\freetype\imgui_freetype.h">
<Filter>misc\freetype</Filter>
</CustomBuild>
<CustomBuild Include="imgui\misc\single_file\imgui_single_file.h">
<Filter>misc\single_file</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<Filter Include="backends">
<UniqueIdentifier>{76e0cd46-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_allegro5">
<UniqueIdentifier>{afb95218-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples">
<UniqueIdentifier>{1f18bf0c-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_android_opengl3">
<UniqueIdentifier>{e530954e-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_apple_metal">
<UniqueIdentifier>{16c31149-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_apple_opengl2">
<UniqueIdentifier>{e40593b1-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_glfw_metal">
<UniqueIdentifier>{3f752825-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_glfw_opengl2">
<UniqueIdentifier>{c215e32a-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_glfw_opengl3">
<UniqueIdentifier>{615ff294-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_glfw_vulkan">
<UniqueIdentifier>{61582fc8-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_glfw_wgpu">
<UniqueIdentifier>{a31b119a-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_glut_opengl2">
<UniqueIdentifier>{01ccd54d-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_null">
<UniqueIdentifier>{f4c8b947-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl2_directx11">
<UniqueIdentifier>{f2d77d32-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl2_metal">
<UniqueIdentifier>{776017f1-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl2_opengl2">
<UniqueIdentifier>{4d812b44-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl2_opengl3">
<UniqueIdentifier>{7be81d1f-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl2_sdlrenderer2">
<UniqueIdentifier>{e190514e-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl2_vulkan">
<UniqueIdentifier>{a2cc40a8-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl2_wgpu">
<UniqueIdentifier>{8777abc2-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl3_directx11">
<UniqueIdentifier>{b9c33cde-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl3_metal">
<UniqueIdentifier>{4dc8b8c8-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl3_opengl3">
<UniqueIdentifier>{3b7dda38-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl3_sdlgpu3">
<UniqueIdentifier>{2505aa94-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl3_sdlrenderer3">
<UniqueIdentifier>{da535992-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl3_vulkan">
<UniqueIdentifier>{bc5700b1-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_sdl3_wgpu">
<UniqueIdentifier>{b3511882-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_win32_directx10">
<UniqueIdentifier>{ffdcc484-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_win32_directx11">
<UniqueIdentifier>{1ec285ef-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_win32_directx12">
<UniqueIdentifier>{9c32029b-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_win32_directx9">
<UniqueIdentifier>{c1caea97-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_win32_opengl3">
<UniqueIdentifier>{b1ac1dca-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\example_win32_vulkan">
<UniqueIdentifier>{81f39c9e-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\libs\emscripten">
<UniqueIdentifier>{deff277e-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\libs">
<UniqueIdentifier>{4df04038-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\libs\glfw\include\GLFW">
<UniqueIdentifier>{f6903215-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\libs\glfw\include">
<UniqueIdentifier>{114c63d2-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\libs\glfw">
<UniqueIdentifier>{012e170c-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="examples\libs\usynergy">
<UniqueIdentifier>{269d74cc-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="misc\cpp">
<UniqueIdentifier>{405959db-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="misc">
<UniqueIdentifier>{0496d0b7-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="misc\debuggers">
<UniqueIdentifier>{68d63fa2-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="misc\fonts">
<UniqueIdentifier>{ae5b8b78-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="misc\freetype">
<UniqueIdentifier>{c72c0104-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="misc\single_file">
<UniqueIdentifier>{2ce20248-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

78
External/Imgui.bff vendored Normal file
View File

@@ -0,0 +1,78 @@
// ImGui - DLL
//------------------------------------------------------------------------------
{
.ProjectName = 'ImGui'
.ProjectPath = 'External/imgui'
// Library
//--------------------------------------------------------------------------
ForEach( .BuildConfig in .BuildConfigs )
{
Using( .BuildConfig )
.OutputBase + '\$Platform$-$BuildConfigName$'
// ObjectList (no Unity for external code)
//--------------------------------------------------------------------------
ObjectList( '$ProjectName$-Objs-$Platform$-$BuildConfigName$' )
{
// Core ImGui files
.CompilerInputFiles = {
'$ProjectPath$/imgui.cpp',
'$ProjectPath$/imgui_demo.cpp',
'$ProjectPath$/imgui_draw.cpp',
'$ProjectPath$/imgui_tables.cpp',
'$ProjectPath$/imgui_widgets.cpp',
// Backends
'$ProjectPath$/backends/imgui_impl_win32.cpp',
'$ProjectPath$/backends/imgui_impl_dx12.cpp'
}
// Extra Compiler Options
.CompilerOptions + ' "-I$ProjectPath$"'
+ ' "-I$ProjectPath$/backends"'
.CompilerOptions + ' -DIMGUI_API=__declspec(dllexport)'
+ ' /wd4365' // signed/unsigned mismatch
+ ' /wd5219' // implicit conversion to float
+ ' -WX-' // disable warnings as errors for external code
// Output
.CompilerOutputPath = '$OutputBase$/$ProjectName$/'
}
// --- DLL BUILD ---
DLL( '$ProjectName$-Lib-$Platform$-$BuildConfigName$' )
{
.Libraries = { '$ProjectName$-Objs-$Platform$-$BuildConfigName$' }
.LinkerOutput = '$BinPath$/$Platform$-$BuildConfigName$/$ProjectName$.dll'
#if __WINDOWS__
.LinkerOptions + ' /DLL'
.LinkerOptions + .CommonWinLibs
.CRTLibs = .CRTLibs_Dynamic
If ( .BuildConfigName == 'Debug' )
{
^CRTLibs = .CRTLibs_DynamicDebug
}
.LinkerOptions + .CRTLibs
#endif
}
Alias( '$ProjectName$-$Platform$-$BuildConfigName$' ) { .Targets = '$ProjectName$-Lib-$Platform$-$BuildConfigName$' }
^'Targets_$Platform$_$BuildConfigName$' + { '$ProjectName$-$Platform$-$BuildConfigName$' }
#if __WINDOWS__
.ProjectConfig = [ Using( .'Project_$Platform$_$BuildConfigName$' ) .Target = '$ProjectName$-$Platform$-$BuildConfigName$' ]
^ProjectConfigs + .ProjectConfig
#endif
}
VCXProject( '$ProjectName$' )
{
.ProjectOutput = 'External/$ProjectName$.vcxproj'
.ProjectBasePath = '$ProjectPath$/'
.ProjectInputPaths = .ProjectBasePath
.ProjectConfigs = .ProjectConfigs
}
}

View File

@@ -9,7 +9,7 @@
#include <type_traits>
// Add any new fields into the concept below
#define DECLARE_ENTITY() \
#define DECLARE_ENTITY() \
Entity* Base; \
static const Juliet::Class* Kind;
@@ -18,8 +18,6 @@
constexpr Juliet::Class entityKind##entity(#entity, sizeof(#entity) / sizeof(char)); \
const Juliet::Class* entity::Kind = &entityKind##entity;
namespace Game
{
using DerivedType = void*;
@@ -49,9 +47,9 @@ namespace Game
requires EntityConcept<EntityType>
EntityType* MakeEntity(EntityManager& manager, float x, float y)
{
auto* arena = Juliet::GetGameArena();
EntityType* result = Juliet::ArenaPushType<EntityType>(arena);
Entity* base = result->Base = Juliet::ArenaPushType<Entity>(arena);
auto* arena = Juliet::GetGameArena();
EntityType* result = Juliet::ArenaPushType<EntityType>(arena, ConstString("EntityType"));
Entity* base = result->Base = Juliet::ArenaPushType<Entity>(arena, ConstString("Entity"));
base->X = x;
base->Y = y;
base->Derived = result;

View File

@@ -49,6 +49,30 @@
<Configuration>x64Clang-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Debug|x64">
<Configuration>x64-Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Profile|x64">
<Configuration>x64-Profile</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Release|x64">
<Configuration>x64-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Debug|x64">
<Configuration>x64Clang-Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Profile|x64">
<Configuration>x64Clang-Profile</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Release|x64">
<Configuration>x64Clang-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="Entity\Entity.h" />
@@ -136,6 +160,42 @@
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -175,12 +235,90 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -190,7 +328,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -200,7 +338,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -209,8 +347,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -220,7 +358,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -230,7 +368,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -239,7 +377,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Game;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
@@ -269,7 +407,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Game;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
@@ -356,6 +494,36 @@
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@@ -40,7 +40,7 @@ extern "C" JULIET_API void GameInit(GameInitParams* /*params*/)
int Score;
};
auto* gameState = ArenaPushType<GameState>(GetGameArena());
auto* gameState = ArenaPushType<GameState>(GetGameArena(), ConstString("GameState"));
gameState->TotalTime = 0.0f;
gameState->Score = 0;

View File

@@ -1,10 +1,17 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22823.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImGui", "External\ImGui.vcxproj", "{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "Game\Game.vcxproj", "{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JulietApp", "JulietApp\JulietApp.vcxproj", "{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}"
ProjectSection(ProjectDependencies) = postProject
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434} = {AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434} = {C16FFE36-6C94-4F93-BC2A-7F5284B7D434}
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434} = {B1D040D0-6C94-4F93-BC2A-7F5284B7D434}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Juliet", "Juliet\Juliet.vcxproj", "{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}"
EndProject
@@ -13,41 +20,79 @@ Global
Debug|x64 = Debug|x64
Debug|x64 = Debug|x64
Debug|x64 = Debug|x64
Debug|x64 = Debug|x64
Profile|x64 = Profile|x64
Profile|x64 = Profile|x64
Profile|x64 = Profile|x64
Profile|x64 = Profile|x64
Release|x64 = Release|x64
Release|x64 = Release|x64
Release|x64 = Release|x64
Release|x64 = Release|x64
Debug|x64Clang = Debug|x64Clang
Debug|x64Clang = Debug|x64Clang
Debug|x64Clang = Debug|x64Clang
Debug|x64Clang = Debug|x64Clang
Profile|x64Clang = Profile|x64Clang
Profile|x64Clang = Profile|x64Clang
Profile|x64Clang = Profile|x64Clang
Profile|x64Clang = Profile|x64Clang
Release|x64Clang = Release|x64Clang
Release|x64Clang = Release|x64Clang
Release|x64Clang = Release|x64Clang
Release|x64Clang = Release|x64Clang
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{C16FFE36-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{B1D040D0-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.Build.0 = x64-Debug|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.Build.0 = x64-Debug|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
@@ -60,6 +105,10 @@ Global
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.Build.0 = x64-Profile|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.Build.0 = x64-Profile|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.Build.0 = x64-Profile|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.Build.0 = x64-Release|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.Build.0 = x64-Release|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
@@ -72,6 +121,10 @@ Global
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.Build.0 = x64Clang-Debug|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.Build.0 = x64Clang-Debug|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.Build.0 = x64Clang-Debug|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.Build.0 = x64Clang-Profile|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.Build.0 = x64Clang-Profile|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
@@ -84,21 +137,29 @@ Global
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.Build.0 = x64Clang-Release|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.Build.0 = x64Clang-Release|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{1DEE51CA-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.Build.0 = x64Clang-Release|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64.ActiveCfg = x64-Debug|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64.ActiveCfg = x64-Profile|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Release|x64.ActiveCfg = x64-Release|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Debug|x64Clang.ActiveCfg = x64Clang-Debug|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Profile|x64Clang.ActiveCfg = x64Clang-Profile|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64
{AB9C7E88-6C94-4F93-BC2A-7F5284B7D434}.Release|x64Clang.ActiveCfg = x64Clang-Release|x64

View File

@@ -5,6 +5,9 @@
.ProjectPath = 'Juliet'
.JulietIncludePath = ' "-IJuliet/include"'
+ ' "-IJuliet/src"'
+ ' "-IExternal/imgui"'
+ ' "-IExternal/imgui/backends"'
// Library
//--------------------------------------------------------------------------
@@ -44,12 +47,19 @@
// --- DLL BUILD ---
DLL( '$ProjectName$-Lib-$Platform$-$BuildConfigName$' )
{
.Libraries = { '$ProjectName$-Objs-$Platform$-$BuildConfigName$' }
.Libraries = { '$ProjectName$-Objs-$Platform$-$BuildConfigName$',
'ImGui-Lib-$Platform$-$BuildConfigName$' }
.LinkerOutput = '$BinPath$/$Platform$-$BuildConfigName$/$ProjectName$.dll' // Output .dll to Bin
#if __WINDOWS__
.LinkerOptions + ' /DLL'
.LinkerOptions + .CommonWinLibs
+ ' imm32.lib'
+ ' shell32.lib'
+ ' dwmapi.lib'
+ ' d3dcompiler.lib'
.CRTLibs = .CRTLibs_Dynamic
If ( .BuildConfigName == 'Debug' )

View File

@@ -25,6 +25,30 @@
<Configuration>x64Clang-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Debug|x64">
<Configuration>x64-Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Profile|x64">
<Configuration>x64-Profile</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Release|x64">
<Configuration>x64-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Debug|x64">
<Configuration>x64Clang-Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Profile|x64">
<Configuration>x64Clang-Profile</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Release|x64">
<Configuration>x64Clang-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="include\Core\Application\ApplicationManager.h" />
@@ -49,6 +73,8 @@
<CustomBuild Include="include\Core\HAL\Keyboard\ScanCode.h" />
<CustomBuild Include="include\Core\HAL\Mouse\Mouse.h" />
<CustomBuild Include="include\Core\HotReload\HotReload.h" />
<CustomBuild Include="include\Core\ImGui\ImGuiService.h" />
<CustomBuild Include="include\Core\ImGui\ImGuiTests.h" />
<CustomBuild Include="include\Core\JulietInit.h" />
<CustomBuild Include="include\Core\Logging\LogManager.h" />
<CustomBuild Include="include\Core\Logging\LogTypes.h" />
@@ -69,6 +95,7 @@
<CustomBuild Include="include\Core\Thread\Mutex.h" />
<CustomBuild Include="include\Core\Thread\Thread.h" />
<CustomBuild Include="include\Engine\Class.h" />
<CustomBuild Include="include\Engine\Debug\MemoryDebugger.h" />
<CustomBuild Include="include\Engine\Engine.h" />
<CustomBuild Include="include\Graphics\Camera.h" />
<CustomBuild Include="include\Graphics\Colors.h" />
@@ -77,6 +104,7 @@
<CustomBuild Include="include\Graphics\GraphicsBuffer.h" />
<CustomBuild Include="include\Graphics\GraphicsConfig.h" />
<CustomBuild Include="include\Graphics\GraphicsPipeline.h" />
<CustomBuild Include="include\Graphics\ImGuiRenderer.h" />
<CustomBuild Include="include\Graphics\RenderPass.h" />
<CustomBuild Include="include\Graphics\Shader.h" />
<CustomBuild Include="include\Graphics\Texture.h" />
@@ -115,6 +143,8 @@
<CustomBuild Include="src\Core\HAL\Win32.h" />
<CustomBuild Include="src\Core\HotReload\HotReload.cpp" />
<CustomBuild Include="src\Core\HotReload\Win32\Win32HotReload.cpp" />
<CustomBuild Include="src\Core\ImGui\ImGuiService.cpp" />
<CustomBuild Include="src\Core\ImGui\ImGuiTests.cpp" />
<CustomBuild Include="src\Core\Juliet.cpp" />
<CustomBuild Include="src\Core\Logging\LogManager.cpp" />
<CustomBuild Include="src\Core\Math\Math_Private.h" />
@@ -130,6 +160,7 @@
<CustomBuild Include="src\Core\Networking\TcpListener.cpp" />
<CustomBuild Include="src\Core\Networking\TcpSocket.cpp" />
<CustomBuild Include="src\Core\Networking\Win32\Win32SocketPlatformImpl.cpp" />
<CustomBuild Include="src\Engine\Debug\MemoryDebugger.cpp" />
<CustomBuild Include="src\Engine\Engine.cpp" />
<CustomBuild Include="src\Graphics\D3D12\AgilitySDK\d3d12.h" />
<CustomBuild Include="src\Graphics\D3D12\AgilitySDK\d3d12compatibility.h" />
@@ -181,6 +212,7 @@
<CustomBuild Include="src\Graphics\DebugDisplayRenderer.cpp" />
<CustomBuild Include="src\Graphics\Graphics.cpp" />
<CustomBuild Include="src\Graphics\GraphicsDevice.h" />
<CustomBuild Include="src\Graphics\ImGuiRenderer.cpp" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
@@ -225,6 +257,42 @@
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -246,12 +314,90 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;include;src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;include;src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -261,7 +407,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;include;src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;include;src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -271,7 +417,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;include;src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;include;src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -280,8 +426,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;include;src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;include;src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -291,7 +437,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;include;src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;include;src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -301,7 +447,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;include;src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;include;src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -337,6 +483,36 @@
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@@ -67,6 +67,12 @@
<CustomBuild Include="include\Core\HotReload\HotReload.h">
<Filter>include\Core\HotReload</Filter>
</CustomBuild>
<CustomBuild Include="include\Core\ImGui\ImGuiService.h">
<Filter>include\Core\ImGui</Filter>
</CustomBuild>
<CustomBuild Include="include\Core\ImGui\ImGuiTests.h">
<Filter>include\Core\ImGui</Filter>
</CustomBuild>
<CustomBuild Include="include\Core\JulietInit.h">
<Filter>include\Core</Filter>
</CustomBuild>
@@ -127,6 +133,9 @@
<CustomBuild Include="include\Engine\Class.h">
<Filter>include\Engine</Filter>
</CustomBuild>
<CustomBuild Include="include\Engine\Debug\MemoryDebugger.h">
<Filter>include\Engine\Debug</Filter>
</CustomBuild>
<CustomBuild Include="include\Engine\Engine.h">
<Filter>include\Engine</Filter>
</CustomBuild>
@@ -151,6 +160,9 @@
<CustomBuild Include="include\Graphics\GraphicsPipeline.h">
<Filter>include\Graphics</Filter>
</CustomBuild>
<CustomBuild Include="include\Graphics\ImGuiRenderer.h">
<Filter>include\Graphics</Filter>
</CustomBuild>
<CustomBuild Include="include\Graphics\RenderPass.h">
<Filter>include\Graphics</Filter>
</CustomBuild>
@@ -264,6 +276,12 @@
<CustomBuild Include="src\Core\HotReload\Win32\Win32HotReload.cpp">
<Filter>src\Core\HotReload\Win32</Filter>
</CustomBuild>
<CustomBuild Include="src\Core\ImGui\ImGuiService.cpp">
<Filter>src\Core\ImGui</Filter>
</CustomBuild>
<CustomBuild Include="src\Core\ImGui\ImGuiTests.cpp">
<Filter>src\Core\ImGui</Filter>
</CustomBuild>
<CustomBuild Include="src\Core\Juliet.cpp">
<Filter>src\Core</Filter>
</CustomBuild>
@@ -309,6 +327,9 @@
<CustomBuild Include="src\Core\Networking\Win32\Win32SocketPlatformImpl.cpp">
<Filter>src\Core\Networking\Win32</Filter>
</CustomBuild>
<CustomBuild Include="src\Engine\Debug\MemoryDebugger.cpp">
<Filter>src\Engine\Debug</Filter>
</CustomBuild>
<CustomBuild Include="src\Engine\Engine.cpp">
<Filter>src\Engine</Filter>
</CustomBuild>
@@ -462,6 +483,9 @@
<CustomBuild Include="src\Graphics\GraphicsDevice.h">
<Filter>src\Graphics</Filter>
</CustomBuild>
<CustomBuild Include="src\Graphics\ImGuiRenderer.cpp">
<Filter>src\Graphics</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<Filter Include="include\Core\Application">
@@ -533,6 +557,11 @@
<UniqueIdentifier>{fe4e9898-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="include\Core\ImGui">
<UniqueIdentifier>{f0573de7-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="include\Core\Logging">
<UniqueIdentifier>{02138187-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
@@ -563,6 +592,11 @@
<UniqueIdentifier>{d881a52c-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="include\Engine\Debug">
<UniqueIdentifier>{c6a2048a-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="include\Graphics">
<UniqueIdentifier>{20496e7b-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
@@ -648,6 +682,11 @@
<UniqueIdentifier>{849dd795-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="src\Core\ImGui">
<UniqueIdentifier>{04960ca3-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="src\Core\Logging">
<UniqueIdentifier>{574d127d-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
@@ -673,6 +712,11 @@
<UniqueIdentifier>{43aa9349-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="src\Engine\Debug">
<UniqueIdentifier>{8e9855ac-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Filter Include="src\Engine">
<UniqueIdentifier>{602a4b6b-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>

View File

@@ -2,6 +2,12 @@
namespace Juliet
{
struct RenderPass;
struct CommandList;
struct Texture;
struct ColorTargetInfo;
struct DepthStencilTargetInfo;
class IApplication
{
public:
@@ -10,5 +16,16 @@ namespace Juliet
virtual void Shutdown() = 0;
virtual void Update() = 0;
virtual bool IsRunning() = 0;
// Accessors for Engine Systems
virtual struct Window* GetPlatformWindow() = 0;
virtual struct GraphicsDevice* GetGraphicsDevice() = 0;
// Render Lifecycle (Engine-Managed Render Loop)
virtual void OnPreRender(CommandList* cmd) = 0;
virtual void OnRender(RenderPass* pass, CommandList* cmd) = 0;
virtual ColorTargetInfo GetColorTargetInfo(Texture* swapchainTexture) = 0;
virtual DepthStencilTargetInfo* GetDepthTargetInfo() = 0;
virtual struct Camera GetDebugCamera() = 0;
};
} // namespace Juliet

View File

@@ -41,3 +41,6 @@ constexpr int8 int8Max = MaxValueOf<int8>();
constexpr int16 int16Max = MaxValueOf<int16>();
constexpr int32 int32Max = MaxValueOf<int32>();
constexpr int64 int64Max = MaxValueOf<int64>();
#define Kilobytes(value) value * 1024
#define Megabytes(value) Kilobytes(value) * 1024

View File

@@ -0,0 +1,27 @@
#pragma once
#include <Core/Common/CoreTypes.h>
#include <Core/Common/NonNullPtr.h>
struct ImGuiContext;
namespace Juliet
{
struct Window;
struct GraphicsDevice;
namespace ImGuiService
{
JULIET_API void Initialize(NonNullPtr<Window> window);
JULIET_API void Shutdown();
JULIET_API void NewFrame();
JULIET_API void Render();
JULIET_API bool IsInitialized();
JULIET_API ImGuiContext* GetContext();
// Run internal unit tests
JULIET_API void RunTests();
} // namespace ImGuiService
} // namespace Juliet

View File

@@ -0,0 +1,12 @@
#pragma once
#include <Core/Common/NonNullPtr.h>
#include <Core/HAL/Display/Window.h>
#include <Graphics/GraphicsDevice.h>
#include <Juliet.h>
namespace Juliet::UnitTest
{
void TestImGui();
}

View File

@@ -1,25 +1,75 @@
#pragma once
#include <Juliet.h>
#include <Core/Common/CoreTypes.h>
#include <Core/Common/CoreUtils.h>
#include <Core/Common/String.h>
#include <Core/Memory/Utils.h>
#include <Juliet.h>
namespace Juliet
{
struct MemoryArena
// --- Paged Memory Architecture ---
struct ArenaAllocation
{
uint8* Data;
size_t Size;
size_t Offset;
size_t Offset;
size_t Size;
String Tag;
ArenaAllocation* Next;
};
JULIET_API void MemoryArenaCreate(MemoryArena* arena, void* backingMemory, size_t size);
JULIET_API void* ArenaPush(MemoryArena* arena, size_t size, size_t alignment = 16);
JULIET_API void* ArenaRealloc(MemoryArena* arena, void* oldPtr, size_t oldSize, size_t newSize, size_t alignment = 16);
JULIET_API void ArenaReset(MemoryArena* arena);
JULIET_API size_t ArenaGetMarker(MemoryArena* arena);
JULIET_API void ArenaResetToMarker(MemoryArena* arena, size_t marker);
struct MemoryBlock
{
static constexpr uint32 kMagic = 0xAA55AA55;
uint32 Magic;
MemoryBlock* Next; // Next block in the chain (Arena) or FreeList (Pool)
size_t TotalSize; // Total size of this block (including header)
size_t Used; // Offset relative to the start of Data
#if JULIET_DEBUG
ArenaAllocation* FirstAllocation = nullptr;
uint64 Pad; // Ensure 16-byte alignment (Size 40 -> 48)
#endif
// Data follows immediately.
// We use a helper to access it to avoid C++ flexible array warning issues if strict
uint8* GetData() { return reinterpret_cast<uint8*>(this + 1); }
const uint8* GetData() const { return reinterpret_cast<const uint8*>(this + 1); }
};
struct MemoryPool
{
void* BaseAddress = nullptr;
size_t TotalSize = 0;
MemoryBlock* FreeList = nullptr;
[[nodiscard]] MemoryBlock* AllocateBlock(size_t minCapacity);
void FreeBlock(MemoryBlock* block);
};
struct MemoryArena
{
MemoryPool* BackingPool;
MemoryBlock* CurrentBlock;
MemoryBlock* FirstBlock;
// Marker behavior is now tricky with pages.
// Simple Marker = { Block*, Offset }
};
struct ArenaMarker
{
MemoryBlock* Block;
size_t Offset;
};
JULIET_API void MemoryArenaCreate(MemoryArena* arena, MemoryPool* pool);
JULIET_API void* ArenaPush(MemoryArena* arena, size_t size, size_t alignment, String tag);
JULIET_API void* ArenaRealloc(MemoryArena* arena, void* oldPtr, size_t oldSize, size_t newSize, size_t alignment, String tag);
JULIET_API bool ArenaPop(MemoryArena* arena, void* ptr, size_t size);
JULIET_API void ArenaReset(MemoryArena* arena);
JULIET_API ArenaMarker ArenaGetMarker(MemoryArena* arena);
JULIET_API void ArenaResetToMarker(MemoryArena* arena, ArenaMarker marker);
// --- Global Arenas & Management ---
@@ -34,14 +84,15 @@ namespace Juliet
// Internal engine function to initialize memory arenas.
void MemoryArenasInit();
// Internal engine function to shutdown memory arenas.
void MemoryArenasShutdown();
template <typename T>
inline T* ArenaPushType(MemoryArena* arena)
inline T* ArenaPushType(MemoryArena* arena, String tag)
{
T* result = static_cast<T*>(ArenaPush(arena, sizeof(T), alignof(T)));
T* result = static_cast<T*>(ArenaPush(arena, sizeof(T), alignof(T), tag));
if (result)
{
MemSet(result, 0, sizeof(T));
@@ -50,9 +101,10 @@ namespace Juliet
}
template <typename T>
inline T* ArenaPushArray(MemoryArena* arena, size_t count)
inline T* ArenaPushArray(MemoryArena* arena, size_t count, String tag)
{
T* result = static_cast<T*>(ArenaPush(arena, sizeof(T) * count, alignof(T)));
T* result = static_cast<T*>(ArenaPush(arena, sizeof(T) * count, alignof(T), tag));
if (result)
{
MemSet(result, 0, sizeof(T) * count);
@@ -61,8 +113,9 @@ namespace Juliet
}
template <typename T>
inline T* ArenaRealloc(MemoryArena* arena, T* oldPtr, size_t oldCount, size_t newCount)
inline T* ArenaRealloc(MemoryArena* arena, T* oldPtr, size_t oldCount, size_t newCount, String tag)
{
return static_cast<T*>(Juliet::ArenaRealloc(arena, static_cast<void*>(oldPtr), sizeof(T) * oldCount, sizeof(T) * newCount, alignof(T)));
return static_cast<T*>(Juliet::ArenaRealloc(arena, static_cast<void*>(oldPtr), sizeof(T) * oldCount,
sizeof(T) * newCount, alignof(T), tag));
}
} // namespace Juliet

View File

@@ -0,0 +1,9 @@
#pragma once
#include <Core/Memory/MemoryArena.h>
#include <Juliet.h>
namespace Juliet::Debug
{
JULIET_API void DebugDrawMemoryArena();
} // namespace Juliet::Debug

View File

@@ -60,6 +60,12 @@ namespace Juliet
Count
};
enum class IndexFormat : uint8
{
UInt16,
UInt32
};
enum struct SwapChainComposition : uint8
{
SDR,
@@ -128,6 +134,14 @@ namespace Juliet
extern JULIET_API void BindGraphicsPipeline(NonNullPtr<RenderPass> renderPass, NonNullPtr<GraphicsPipeline> graphicsPipeline);
extern JULIET_API void DrawPrimitives(NonNullPtr<RenderPass> renderPass, uint32 numVertices, uint32 numInstances,
uint32 firstVertex, uint32 firstInstance);
extern JULIET_API void DrawIndexedPrimitives(NonNullPtr<RenderPass> renderPass, uint32 numIndices,
uint32 numInstances, uint32 firstIndex, uint32 vertexOffset,
uint32 firstInstance);
extern JULIET_API void SetIndexBuffer(NonNullPtr<CommandList> commandList, NonNullPtr<GraphicsBuffer> buffer, IndexFormat format);
extern JULIET_API void SetPushConstants(NonNullPtr<CommandList> commandList, ShaderStage stage,
uint32 rootParameterIndex, uint32 numConstants, const void* constants);
@@ -157,8 +171,13 @@ namespace Juliet
extern JULIET_API void CopyBuffer(NonNullPtr<CommandList> commandList, NonNullPtr<GraphicsBuffer> dst,
NonNullPtr<GraphicsTransferBuffer> src, size_t size, size_t dstOffset = 0,
size_t srcOffset = 0);
extern JULIET_API void CopyBufferToTexture(NonNullPtr<CommandList> commandList, NonNullPtr<Texture> dst,
NonNullPtr<GraphicsTransferBuffer> src);
extern JULIET_API void TransitionBufferToReadable(NonNullPtr<CommandList> commandList, NonNullPtr<GraphicsBuffer> buffer);
extern JULIET_API uint32 GetDescriptorIndex(NonNullPtr<GraphicsDevice> device, NonNullPtr<GraphicsBuffer> buffer);
extern JULIET_API uint32 GetDescriptorIndex(NonNullPtr<GraphicsDevice> device, NonNullPtr<Texture> texture);
extern JULIET_API void DestroyGraphicsBuffer(NonNullPtr<GraphicsDevice> device, NonNullPtr<GraphicsBuffer> buffer);
extern JULIET_API void DestroyGraphicsTransferBuffer(NonNullPtr<GraphicsDevice> device, NonNullPtr<GraphicsTransferBuffer> buffer);
} // namespace Juliet

View File

@@ -8,6 +8,7 @@ namespace Juliet
IndexBuffer = 1 << 0,
ConstantBuffer = 1 << 1,
StructuredBuffer = 1 << 2,
VertexBuffer = 1 << 3,
};
enum class TransferBufferUsage : uint8

View File

@@ -0,0 +1,12 @@
#pragma once
#include <Graphics/Graphics.h>
#include <Juliet.h>
namespace Juliet
{
extern bool ImGuiRenderer_Initialize(GraphicsDevice* device);
extern void ImGuiRenderer_Shutdown(GraphicsDevice* device);
extern void ImGuiRenderer_NewFrame();
extern JULIET_API void ImGuiRenderer_Render(CommandList* cmdList, RenderPass* renderPass);
} // namespace Juliet

View File

@@ -24,4 +24,12 @@
#else
#define JULIET_DEBUG 0
#endif
// Manual override to disable ImGui
// #define JULIET_DISABLE_IMGUI
#if defined(JULIET_DISABLE_IMGUI) && defined(JULIET_ENABLE_IMGUI)
#undef JULIET_ENABLE_IMGUI
#endif
// clang-format on

View File

@@ -2,8 +2,8 @@
#include <Core/HAL/Display/Display_Private.h>
#include <Core/HAL/Display/DisplayDevice.h>
#include <Core/Memory/Allocator.h>
#include <Core/Memory/MemoryArena.h>
#include <Core/Memory/EngineArena.h>
#include <Core/Memory/MemoryArena.h>
#include <format>
namespace Juliet
@@ -17,7 +17,7 @@ namespace Juliet
{
// TODO : IfDef new factories that are not compatible
constexpr DisplayDeviceFactory* Factories[] = { &Win32DisplayDeviceFactory, nullptr };
} // namespace
} // namespace Internal::Display
void InitializeDisplaySystem()
{
@@ -74,8 +74,8 @@ namespace Juliet
{
Assert(g_CurrentDisplayDevice->CreatePlatformWindow);
MemoryArena* arena = GetEngineArena();
auto window = ArenaPushType<Window>(arena);
MemoryArena* arena = GetEngineArena();
auto window = ArenaPushType<Window>(arena, ConstString("Window"));
if (!window)
{
return nullptr;
@@ -84,7 +84,7 @@ namespace Juliet
window->Height = height;
auto titleLen = StringLength(title);
auto buffer = ArenaPushArray<char>(arena, titleLen);
auto buffer = ArenaPushArray<char>(arena, titleLen, ConstString("Window Title Array"));
MemCopy(buffer, title, titleLen);
window->Title.Data = buffer;
@@ -93,7 +93,7 @@ namespace Juliet
g_CurrentDisplayDevice->MainWindow = window;
if (!g_CurrentDisplayDevice->CreatePlatformWindow(g_CurrentDisplayDevice, window))
{
// Note: We don't "free" from arena easily, but since this is catastrophic
// Note: We don't "free" from arena easily, but since this is catastrophic
// and persistent, we just leak the small amount of arena space or handle it if we had a marker.
return nullptr;
}

View File

@@ -18,8 +18,8 @@ namespace Juliet::Win32
DisplayDevice* CreateDevice()
{
auto device = ArenaPushType<DisplayDevice>(GetEngineArena());
auto device = ArenaPushType<DisplayDevice>(GetEngineArena(), ConstString("DisplayDevice"));
if (!device)
{
return nullptr;

View File

@@ -14,7 +14,7 @@ namespace Juliet::Win32
bool SetupWindowState(NonNullPtr<DisplayDevice> /*self*/, NonNullPtr<Window> window, HWND handle)
{
auto state = ArenaPushType<Window32State>(GetEngineArena());
auto state = ArenaPushType<Window32State>(GetEngineArena(), ConstString("Window32State"));
window->State = state;
state->Handle = handle;

View File

@@ -22,8 +22,9 @@ namespace Juliet
// First allocate all the full path.
// TODO: Add path composition into filesystem + string format + string builder
const size_t dllFullPathLength = basePathLength + StringLength(dllName) + 1; // Need +1 because snprintf needs 0 terminated strings
code.DLLFullPath.Data = ArenaPushArray<char>(GetEngineArena(), dllFullPathLength);
const size_t dllFullPathLength =
basePathLength + StringLength(dllName) + 1; // Need +1 because snprintf needs 0 terminated strings
code.DLLFullPath.Data = ArenaPushArray<char>(GetEngineArena(), dllFullPathLength, ConstString("DLLFullPath"));
int writtenSize = snprintf(CStr(code.DLLFullPath), dllFullPathLength, "%s%s", CStr(basePath), CStr(dllName));
if (writtenSize < static_cast<int>(dllFullPathLength) - 1)
{
@@ -34,8 +35,9 @@ namespace Juliet
code.DLLFullPath.Size = static_cast<size_t>(writtenSize);
// Lock filename path
const size_t lockPathLength = basePathLength + StringLength(lockFilename) + 1; // Need +1 because snprintf needs 0 terminated strings
code.LockFullPath.Data = ArenaPushArray<char>(GetEngineArena(), lockPathLength);
const size_t lockPathLength =
basePathLength + StringLength(lockFilename) + 1; // Need +1 because snprintf needs 0 terminated strings
code.LockFullPath.Data = ArenaPushArray<char>(GetEngineArena(), lockPathLength, ConstString("LockFullPath"));
writtenSize = snprintf(CStr(code.LockFullPath), lockPathLength, "%s%s", CStr(basePath), CStr(lockFilename));
if (writtenSize < static_cast<int>(lockPathLength) - 1)
{

View File

@@ -54,10 +54,10 @@ namespace Juliet
const size_t tempDllMaxBufferSize =
basePathLength + StringLength(code.TransientDLLName) + /* _ */ 1 + kTempDLLBufferSizeForID + 1 /* \0 */;
// Allocate from Scratch Arena (transient)
auto tempDllPath = ArenaPushArray<char>(GetScratchArena(), tempDllMaxBufferSize);
auto tempDllPath = ArenaPushArray<char>(GetScratchArena(), tempDllMaxBufferSize, ConstString("tempDllPath"));
for (uint32 attempt = 0; attempt < kMaxAttempts; ++attempt)
{
// int to char
@@ -79,7 +79,8 @@ namespace Juliet
return;
}
if (static_cast<size_t>(writtenSize) + 1 < basePathLength + static_cast<size_t>(idLength) + code.TransientDLLName.Size)
if (static_cast<size_t>(writtenSize) + 1 <
basePathLength + static_cast<size_t>(idLength) + code.TransientDLLName.Size)
{
// Scratch memory, no free needed
Log(LogLevel::Error, LogCategory::Core, "Cannot create temp full path");

View File

@@ -0,0 +1,123 @@
#include <Core/HAL/Display/Win32/Win32Window.h>
#include <Core/HAL/Display/Window.h>
#include <Core/ImGui/ImGuiService.h>
#include <Core/ImGui/ImGuiTests.h>
#include <Core/Logging/LogManager.h>
#include <Core/Memory/MemoryArena.h>
#include <backends/imgui_impl_win32.h>
#include <imgui.h>
#include <Core/Memory/EngineArena.h>
#include <cstdio>
// Forward declare implementation functions from backends
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
namespace Juliet::ImGuiService
{
namespace
{
ImGuiContext* g_ImGuiContext = nullptr;
bool g_Initialized = false;
// Dedicated Paged Arena for ImGui
// Sharing the same underlying Engine Pool for blocks, but separate Arena chain.
MemoryArena g_ImGuiArena;
void* ImGuiAllocWrapper(size_t size, void* /*user_data*/)
{
// Store size in header to allow Pop
// Align total size to 16 to avoid padding issues with ArenaPop LIFO check
size_t actualSize = size + 16;
actualSize = (actualSize + 15) & ~static_cast<size_t>(15);
// We do save the size when we push so we can pop exactly the size.
if (void* ptr = ArenaPush(&g_ImGuiArena, actualSize, 16, ConstString("ImGui")))
{
// Write size at start
*static_cast<size_t*>(ptr) = actualSize;
return static_cast<uint8*>(ptr) + 16;
}
return nullptr;
}
void ImGuiFreeWrapper(void* ptr, void* /*user_data*/)
{
Assert(ptr);
uint8* originalPtr = static_cast<uint8*>(ptr) - 16;
size_t actualSize = *reinterpret_cast<size_t*>(originalPtr);
// Attempt LIFO Pop
ArenaPop(&g_ImGuiArena, originalPtr, actualSize);
}
} // namespace
void Initialize(NonNullPtr<Window> window)
{
Assert(!g_Initialized);
// Initialize ImGui Arena using Engine Pool
MemoryArenaCreate(&g_ImGuiArena, GetEngineArena()->BackingPool);
// Setup Allocator
ImGui::SetAllocatorFunctions(ImGuiAllocWrapper, ImGuiFreeWrapper, nullptr);
IMGUI_CHECKVERSION();
g_ImGuiContext = ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
// io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
ImGui::StyleColorsDark();
// Platform Init
auto* win32State = static_cast<Win32::Window32State*>(window->State);
ImGui_ImplWin32_Init(win32State->Handle);
g_Initialized = true;
}
void Shutdown()
{
Assert(g_Initialized);
ImGui_ImplWin32_Shutdown();
ImGui::DestroyContext(g_ImGuiContext);
g_ImGuiContext = nullptr;
g_Initialized = false;
}
void NewFrame()
{
Assert(g_Initialized);
ImGui_ImplWin32_NewFrame();
ImGui::NewFrame();
}
void Render()
{
Assert(g_Initialized);
ImGui::Render();
}
bool IsInitialized()
{
return g_Initialized;
}
ImGuiContext* GetContext()
{
return g_ImGuiContext;
}
void RunTests()
{
printf("ImGuiService: Running Unit Tests...\n");
Juliet::UnitTest::TestImGui();
}
} // namespace Juliet::ImGuiService

View File

@@ -0,0 +1,72 @@
#include <Core/HAL/Display/Display.h>
#include <Core/ImGui/ImGuiService.h>
#include <Core/Memory/MemoryArena.h>
#include <cstdio>
#include <Graphics/Graphics.h>
#include <imgui.h>
#include <Juliet.h>
namespace Juliet::UnitTest
{
void TestImGui()
{
ImGuiContext* ctx = ImGuiService::GetContext();
if (ImGui::GetCurrentContext() != ctx)
{
printf("WARN: Context Mismatch! Service=%p, Current=%p. Fixing...\n", (void*)ctx, (void*)ImGui::GetCurrentContext());
ImGui::SetCurrentContext(ctx);
}
Assert(ImGui::GetCurrentContext() == ctx);
(void)ctx;
printf("TestImGui: Context Verified.\n");
ImGuiIO& io = ImGui::GetIO();
Assert(io.BackendPlatformName != nullptr);
printf("TestImGui: IO Verified. Backend: %s\n", io.BackendPlatformName);
Assert(ImGui::GetVersion() != nullptr);
printf("TestImGui: Version Verified: %s\n", ImGui::GetVersion());
Assert(io.Fonts != nullptr);
printf("TestImGui: Fonts Verified.\n");
bool built = io.Fonts->IsBuilt();
Assert(built);
printf("TestImGui: Fonts Built Status: %d\n", built);
unsigned char* pixels;
int width, height;
io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
Assert(pixels != nullptr);
Assert(width > 0 && height > 0);
(void)pixels;
(void)width;
(void)height;
printf("TestImGui: Font Atlas Verified.\n");
// 6. Verify Style
ImGuiStyle& style = ImGui::GetStyle();
Assert(style.Alpha > 0.0f);
(void)style;
printf("TestImGui: Style Verified.\n");
// 7. Test New Frame
Assert(ImGuiService::IsInitialized());
// Simulate a frame
if (io.DisplaySize.x <= 0.0f || io.DisplaySize.y <= 0.0f)
{
io.DisplaySize = ImVec2(1920, 1080);
}
io.DeltaTime = 1.0f / 60.0f;
printf("TestImGui: About to DrawList check.\n");
// 8. Check Draw List Access
ImDrawList* drawList = ImGui::GetForegroundDrawList();
Assert(drawList != nullptr);
(void)drawList;
printf("ImGui tests passed (Exhaustive).\n");
}
} // namespace Juliet::UnitTest

View File

@@ -1,149 +1,392 @@
#include <Core/Logging/LogManager.h>
#include <Core/Memory/Allocator.h>
#include <Core/Memory/MemoryArena.h>
#include <Core/Memory/Utils.h>
#include <algorithm> // For std::max
#include <cstring>
namespace Juliet
{
void MemoryArenaCreate(MemoryArena* arena, void* backingMemory, size_t size)
namespace UnitTest
{
Assert(arena);
Assert(backingMemory);
arena->Data = static_cast<uint8*>(backingMemory);
arena->Size = size;
arena->Offset = 0;
extern void TestMemoryArena();
}
void* ArenaPush(MemoryArena* arena, size_t size, size_t alignment)
// --- MemoryPool Implementation ---
#if JULIET_DEBUG
static void FreeDebugAllocations(MemoryBlock* blk)
{
Assert(arena);
// Alignment must be power of 2
Assert((alignment & (alignment - 1)) == 0);
size_t currentPtr = reinterpret_cast<size_t>(arena->Data + arena->Offset);
size_t offset = (currentPtr + (alignment - 1)) & ~(alignment - 1);
size_t newOffset = offset - reinterpret_cast<size_t>(arena->Data) + size;
if (newOffset > arena->Size)
if (!blk) return;
ArenaAllocation* curr = blk->FirstAllocation;
while (curr)
{
Assert(false, "Memory Arena overflow");
return nullptr;
ArenaAllocation* next = curr->Next;
SafeFree(curr);
curr = next;
}
void* result = arena->Data + (offset - reinterpret_cast<size_t>(arena->Data));
arena->Offset = newOffset;
return result;
blk->FirstAllocation = nullptr;
}
#endif
void* ArenaRealloc(MemoryArena* arena, void* oldPtr, size_t oldSize, size_t newSize, size_t alignment)
// Simple First-Fit Allocator
MemoryBlock* MemoryPool::AllocateBlock(size_t minCapacity)
{
Assert(arena);
// Alignment must be power of 2
Assert((alignment & (alignment - 1)) == 0);
// Require space for Header + Data
size_t totalUnalignedSize = sizeof(MemoryBlock) + minCapacity;
size_t requiredSize = (totalUnalignedSize + 15) & ~static_cast<size_t>(15);
if (oldPtr == nullptr)
MemoryBlock** prevPtr = &FreeList;
MemoryBlock* curr = FreeList;
while (curr)
{
return ArenaPush(arena, newSize, alignment);
}
if (newSize == 0)
{
return nullptr;
}
// Check if the old allocation is at the top of the stack
// We need to verify if (oldPtr + oldSize) == (Data + Offset)
// Note: usage of reinterpret_cast is to be careful with pointer arithmetic on void*
uint8* oldPtrBytes = static_cast<uint8*>(oldPtr);
uint8* arenaEnd = arena->Data + arena->Offset;
if (oldPtrBytes + oldSize == arenaEnd)
{
// It is the last allocation! We can reuse the space.
// We just need to check if we can expand it (if growing)
// Re-calculate the offset start for this block (to ensure nothing weird with padding)
// Ideally oldPtr was aligned.
// Current Offset corresponds to oldPtrBytes + oldSize.
// We want to move Offset to oldPtrBytes + newSize.
size_t oldPtrOffset = static_cast<size_t>(oldPtrBytes - arena->Data);
size_t newOffset = oldPtrOffset + newSize;
if (newOffset > arena->Size)
if (curr->TotalSize >= requiredSize)
{
// Cannot expand in place, not enough space.
// Fallthrough to Alloc + Copy
// Match
// Check if we can split this block?
if (curr->TotalSize >= requiredSize + sizeof(MemoryBlock) + 16)
{
// Split
size_t remainingSize = curr->TotalSize - requiredSize;
MemoryBlock* nextBlock = reinterpret_cast<MemoryBlock*>((uint8*)curr + requiredSize);
nextBlock->Magic = MemoryBlock::kMagic;
nextBlock->TotalSize = remainingSize;
nextBlock->Used = 0;
nextBlock->Next = curr->Next;
// Update FreeList to point to the new remaining block instead of curr
*prevPtr = nextBlock;
// Update curr to be the allocated chunk
curr->TotalSize = requiredSize;
}
else
{
// Take the whole block
*prevPtr = curr->Next;
}
curr->Next = nullptr;
curr->Used = 0;
curr->Magic = MemoryBlock::kMagic;
#if JULIET_DEBUG
curr->FirstAllocation = nullptr;
#endif
#if JULIET_DEBUG
if (curr->TotalSize > sizeof(MemoryBlock))
{
MemSet(curr->GetData(), 0xCD, curr->TotalSize - sizeof(MemoryBlock));
}
#endif
return curr;
}
else
prevPtr = &curr->Next;
curr = curr->Next;
}
// Out of Memory in Pool
Assert(false, "MemoryPool exhausted!");
return nullptr;
}
void MemoryPool::FreeBlock(MemoryBlock* block)
{
if (!block)
{
return;
}
Assert(block->Magic == MemoryBlock::kMagic);
// Poison Header and Data in Debug
#if JULIET_DEBUG
FreeDebugAllocations(block);
// 0xDD = Dead Data
MemSet(block->GetData(), 0xDD, block->TotalSize - sizeof(MemoryBlock));
block->Magic = 0xDEADBEEF;
#endif
// Insert at Head of FreeList (Simplest, no coalescing yet)
block->Next = FreeList;
FreeList = block;
}
// --- MemoryArena Implementation ---
void MemoryArenaCreate(MemoryArena* arena, MemoryPool* pool)
{
Assert(arena);
Assert(pool);
arena->BackingPool = pool;
arena->CurrentBlock = nullptr;
arena->FirstBlock = nullptr;
}
// Overload for backward compatibility / tests if needed, but we should switch to using Pools.
// NOTE: The previous signature was (Arena*, void* backing, size_t).
// We are changing the API.
void* ArenaPush(MemoryArena* arena, size_t size, size_t alignment, [[maybe_unused]] String tag)
{
Assert(arena);
Assert(arena->BackingPool);
// Default Block Size (e.g., 64KB or 1MB? Let's use 16KB for granular tests,
// or larger for prod. Let's make it dynamic or standard constant.
constexpr size_t kDefaultBlockSize = 64 * 1024; // 64KB pages
// Alignment check
Assert((alignment & (alignment - 1)) == 0);
if (!arena->CurrentBlock)
{
// Initial Allocation
size_t allocSize = std::max(size, kDefaultBlockSize);
arena->CurrentBlock = arena->BackingPool->AllocateBlock(allocSize);
arena->FirstBlock = arena->CurrentBlock;
}
// Try allocation in CurrentBlock
MemoryBlock* blk = arena->CurrentBlock;
size_t currentAddr = reinterpret_cast<size_t>(blk->GetData()) + blk->Used;
size_t alignmentOffset = 0;
size_t mask = alignment - 1;
if (currentAddr & mask)
{
alignmentOffset = alignment - (currentAddr & mask);
}
if (blk->Used + alignmentOffset + size > blk->TotalSize - sizeof(MemoryBlock))
{
// Overflow! Request new block.
// Strict minimum: what we need now.
// Better: Max(Default, size) to avoid repeating large allocs for tiny overflow?
size_t allocSize = std::max(size, kDefaultBlockSize);
MemoryBlock* newBlock = arena->BackingPool->AllocateBlock(allocSize);
// Link
blk->Next = newBlock;
arena->CurrentBlock = newBlock;
blk = newBlock;
// Recalc for new block (Used should be 0)
currentAddr = reinterpret_cast<size_t>(blk->GetData());
alignmentOffset = 0;
// newBlock check
if (currentAddr & mask)
{
// In-place Resize success
arena->Offset = newOffset;
return oldPtr;
alignmentOffset = alignment - (currentAddr & mask);
}
}
// Fallback: Alloc + Copy
void* newPtr = ArenaPush(arena, newSize, alignment);
if (newPtr)
// Commit
blk->Used += alignmentOffset;
void* ptr = blk->GetData() + blk->Used;
#if JULIET_DEBUG
ArenaAllocation* node = (ArenaAllocation*)Malloc(sizeof(ArenaAllocation));
node->Offset = blk->Used;
node->Size = size;
node->Tag = tag;
node->Next = nullptr;
if (!blk->FirstAllocation) blk->FirstAllocation = node;
else
{
size_t copySize = oldSize < newSize ? oldSize : newSize;
std::memcpy(newPtr, oldPtr, copySize);
ArenaAllocation* t = blk->FirstAllocation;
while(t->Next) t = t->Next;
t->Next = node;
}
#endif
blk->Used += size;
return ptr;
}
void* ArenaRealloc(MemoryArena* arena, void* oldPtr, size_t oldSize, size_t newSize, size_t alignment, String tag)
{
Assert(arena);
Assert(oldPtr);
Assert(newSize != 0);
// Optimized Case: Expanding the LAST allocation in the Current Block
MemoryBlock* blk = arena->CurrentBlock;
uint8* oldBytes = static_cast<uint8*>(oldPtr);
// Is oldPtr inside current block?
if (oldBytes >= blk->GetData() && oldBytes < blk->GetData() + blk->TotalSize - sizeof(MemoryBlock))
{
// Is it the last one?
if (oldBytes + oldSize == blk->GetData() + blk->Used)
{
// Can we expand?
if (blk->Used + (newSize - oldSize) <= blk->TotalSize - sizeof(MemoryBlock))
{
// Yes, expand in place
blk->Used += (newSize - oldSize);
#if JULIET_DEBUG
{
ArenaAllocation* t = blk->FirstAllocation;
while (t && t->Next) t = t->Next;
if (t) t->Size += (newSize - oldSize);
}
#endif
return oldPtr;
}
}
}
// Fallback: Copy
void* newPtr = ArenaPush(arena, newSize, alignment, tag);
MemCopy(newPtr, oldPtr, std::min(oldSize, newSize));
return newPtr;
}
bool ArenaPop(MemoryArena* arena, void* ptr, size_t size)
{
Assert(arena);
Assert(ptr);
Assert(size);
MemoryBlock* blk = arena->CurrentBlock;
Assert(blk);
uint8* ptrBytes = static_cast<uint8*>(ptr);
uint8* currentTop = blk->GetData() + blk->Used;
// Check if this pointer is exactly at the top of the stack (LIFO)
if (ptrBytes + size == currentTop)
{
// Yes, we can just rewind the Used pointer
blk->Used -= size;
#if JULIET_DEBUG
{
ArenaAllocation* t = blk->FirstAllocation;
ArenaAllocation* prev = nullptr;
while (t && t->Next) { prev = t; t = t->Next; }
if (t) {
SafeFree(t);
if (prev) prev->Next = nullptr;
else blk->FirstAllocation = nullptr;
}
}
#endif
return true;
}
return false;
}
void ArenaReset(MemoryArena* arena)
{
Assert(arena);
arena->Offset = 0;
Assert(arena->FirstBlock);
// Keep FirstBlock, Free the rest.
MemoryBlock* curr = arena->FirstBlock->Next;
while (curr)
{
MemoryBlock* next = curr->Next;
arena->BackingPool->FreeBlock(curr);
curr = next;
}
arena->FirstBlock->Next = nullptr;
arena->FirstBlock->Used = 0;
arena->CurrentBlock = arena->FirstBlock;
#if JULIET_DEBUG
// Poison First Block
FreeDebugAllocations(arena->FirstBlock);
MemSet(arena->FirstBlock->GetData(), 0xCD, arena->FirstBlock->TotalSize - sizeof(MemoryBlock));
#endif
}
size_t ArenaGetMarker(MemoryArena* arena)
ArenaMarker ArenaGetMarker(MemoryArena* arena)
{
Assert(arena);
return arena->Offset;
return { arena->CurrentBlock, arena->CurrentBlock ? arena->CurrentBlock->Used : 0 };
}
void ArenaResetToMarker(MemoryArena* arena, size_t marker)
void ArenaResetToMarker(MemoryArena* arena, ArenaMarker marker)
{
Assert(arena);
Assert(marker <= arena->Offset);
arena->Offset = marker;
if (!marker.Block)
{
// If marker block is null, it might mean "start" or "empty".
// But if the arena has blocks, this is suspicious.
// If the arena was empty when marker was taken, this is valid.
ArenaReset(arena);
return;
}
// Free blocks *after* the marker block
MemoryBlock* curr = marker.Block->Next;
while (curr)
{
MemoryBlock* next = curr->Next;
arena->BackingPool->FreeBlock(curr);
curr = next;
}
marker.Block->Next = nullptr;
marker.Block->Used = marker.Offset;
arena->CurrentBlock = marker.Block;
}
// --- Global Arenas & Management ---
// --- Global Arenas ---
namespace
{
MemoryPool g_ScratchMemory;
MemoryPool g_EngineMemory;
MemoryPool g_GameMemory;
MemoryArena g_ScratchArena;
MemoryArena g_EngineArena;
MemoryArena g_GameArena;
void* g_ScratchBacking = nullptr;
void* g_EngineBacking = nullptr;
void* g_GameBacking = nullptr;
// Backing Buffers
void* g_ScratchBuffer = nullptr;
void* g_EngineBuffer = nullptr;
void* g_GameBuffer = nullptr;
constexpr size_t kScratchSize = 64 * 1024 * 1024; // 64MB
constexpr size_t kEngineSize = 256 * 1024 * 1024; // 256MB
constexpr size_t kGameSize = 512 * 1024 * 1024; // 512MB
constexpr size_t kScratchSize = Megabytes(64);
constexpr size_t kEngineSize = Megabytes(256);
constexpr size_t kGameSize = Megabytes(512);
void InitPool(MemoryPool* pool, void* buffer, size_t size)
{
pool->BaseAddress = buffer;
pool->TotalSize = size;
// Create one giant initial block
Assert(size > sizeof(MemoryBlock));
MemoryBlock* block = static_cast<MemoryBlock*>(buffer);
block->Magic = MemoryBlock::kMagic;
block->Next = nullptr;
block->TotalSize = size;
block->Used = 0;
pool->FreeList = block;
}
} // namespace
MemoryArena* GetScratchArena()
{
return &g_ScratchArena;
}
MemoryArena* GetEngineArena()
{
return &g_EngineArena;
}
MemoryArena* GetGameArena()
{
return &g_GameArena;
@@ -156,23 +399,30 @@ namespace Juliet
void MemoryArenasInit()
{
// TODO: Use the VirtualAlloc API for this on windows
g_ScratchBacking = Malloc(kScratchSize);
MemSet(g_ScratchBacking, 0, kScratchSize);
g_EngineBacking = Malloc(kEngineSize);
MemSet(g_EngineBacking, 0, kEngineSize);
g_GameBacking = Malloc(kGameSize);
MemSet(g_GameBacking, 0, kGameSize);
g_ScratchBuffer = Malloc(kScratchSize);
g_EngineBuffer = Malloc(kEngineSize);
g_GameBuffer = Malloc(kGameSize);
MemoryArenaCreate(&g_ScratchArena, g_ScratchBacking, kScratchSize);
MemoryArenaCreate(&g_EngineArena, g_EngineBacking, kEngineSize);
MemoryArenaCreate(&g_GameArena, g_GameBacking, kGameSize);
InitPool(&g_ScratchMemory, g_ScratchBuffer, kScratchSize);
InitPool(&g_EngineMemory, g_EngineBuffer, kEngineSize);
InitPool(&g_GameMemory, g_GameBuffer, kGameSize);
MemoryArenaCreate(&g_ScratchArena, &g_ScratchMemory);
MemoryArenaCreate(&g_EngineArena, &g_EngineMemory);
MemoryArenaCreate(&g_GameArena, &g_GameMemory);
#if JULIET_DEBUG
UnitTest::TestMemoryArena();
#endif
}
void MemoryArenasShutdown()
{
SafeFree(g_ScratchBacking);
SafeFree(g_EngineBacking);
SafeFree(g_GameBacking);
// Technically we should free blocks?
// But since we own the giant buffers, we can just free them.
SafeFree(g_ScratchBuffer);
SafeFree(g_EngineBuffer);
SafeFree(g_GameBuffer);
}
} // namespace Juliet

View File

@@ -1,67 +1,76 @@
#include <cstdio>
#include <Core/Common/CoreTypes.h>
#include <Core/Common/CoreUtils.h>
#include <Core/Memory/Allocator.h>
#include <Core/Memory/MemoryArena.h>
#if JULIET_DEBUG
namespace Juliet::UnitTest
{
// Need access to internal Pool functions? They are in the header now!
// MemoryPool is declared in header.
void TestMemoryArena()
{
// 1. Core Arena Functionality
uint8 buffer[1024];
MemoryArena arena;
MemoryArenaCreate(&arena, buffer, 1024);
printf("Running Paged Memory Arena Tests...\n");
Assert(arena.Offset == 0);
Assert(arena.Size == 1024);
// Setup Pool and Arena for Pop Tests
size_t testPoolSize = Megabytes(1);
void* testBacking = Calloc(1, testPoolSize);
MemoryPool pool;
pool.BaseAddress = testBacking;
pool.TotalSize = testPoolSize;
pool.FreeList = nullptr;
void* p1 = ArenaPush(&arena, 100);
Assert(p1 != nullptr);
Assert(arena.Offset >= 100);
size_t marker = ArenaGetMarker(&arena);
void* p2 = ArenaPush(&arena, 200);
Assert(p2 != nullptr);
Assert(arena.Offset >= marker + 200);
ArenaResetToMarker(&arena, marker);
Assert(arena.Offset == marker);
ArenaReset(&arena);
Assert(arena.Offset == 0);
// 2. Alignment Test
void* p3 = ArenaPush(&arena, 1, 1);
[[maybe_unused]] size_t addr = reinterpret_cast<size_t>(p3);
void* p4 = ArenaPush(&arena, 1, 16);
size_t addr2 = reinterpret_cast<size_t>(p4);
Assert((addr2 % 16) == 0);
// 3. Template Helpers
struct TestData
// Initialize FreeList (Simulate pool)
size_t blockSize = Kilobytes(128);
size_t numBlocks = testPoolSize / blockSize;
uint8* ptr = static_cast<uint8*>(testBacking);
for (size_t i = 0; i < numBlocks; ++i)
{
int a;
float b;
};
TestData* data = ArenaPushType<TestData>(&arena);
Assert(data != nullptr);
data->a = 10;
data->b = 20.0f;
MemoryBlock* blk = reinterpret_cast<MemoryBlock*>(ptr + i * blockSize);
blk->Magic = MemoryBlock::kMagic;
blk->TotalSize = blockSize;
blk->Used = 0;
blk->Next = pool.FreeList;
pool.FreeList = blk;
}
TestData* dataArray = ArenaPushArray<TestData>(&arena, 10);
Assert(dataArray != nullptr);
MemoryArena arena;
MemoryArenaCreate(&arena, &pool);
// 4. Scratch Arena
MemoryArena* scratch = GetScratchArena();
Assert(scratch != nullptr);
void* sp = ArenaPush(scratch, 100);
Assert(sp != nullptr);
ScratchArenaReset();
Assert(scratch->Offset == 0);
// 5. Arena Pop
// Align sizes to 16 to avoid padding issues during Pop
void* pop1 = ArenaPush(&arena, 5008, 16, ConstString("Pop1"));
printf("All MemoryArena tests passed.\n");
void* pop2 = ArenaPush(&arena, 208, 16, ConstString("Pop2"));
// Pop Middle (Should Fail)
bool res1 = ArenaPop(&arena, pop1, 5008);
Assert(res1 == false);
// Pop Top (Should Success)
bool res2 = ArenaPop(&arena, pop2, 208); // 200->208
Assert(res2 == true);
// Verify Used space is back to pop1 end
Assert(arena.CurrentBlock->Used == ArenaGetMarker(&arena).Offset); // This usage of GetMarker is valid if marker was implicit?
// Actually we didn't take a marker.
// We can verify by allocating pop3. It should overwrite pop2 location.
void* pop3 = ArenaPush(&arena, 16, 16, ConstString("Pop3"));
Assert(pop3 == pop2);
// Cleanup popped items from stack logic for reset...
// Pop pop3
ArenaPop(&arena, pop3, 16);
// Pop pop1
ArenaPop(&arena, pop1, 5008);
Assert(arena.CurrentBlock->Used == 0); // Should be effectively 0
printf("[Success] Arena Pop\n");
// Cleanup
SafeFree(testBacking);
printf("All Paged MemoryArena tests passed.\n");
}
} // namespace Juliet::UnitTest
#endif

View File

@@ -0,0 +1,431 @@
#include <Core/Common/String.h>
#include <Core/Memory/EngineArena.h>
#include <Engine/Debug/MemoryDebugger.h>
#include <imgui.h>
#include <algorithm>
namespace Juliet::Debug
{
namespace
{
struct ArenaDebugState
{
float Zoom = 1.0f;
ArenaAllocation* SelectedAlloc = nullptr;
bool ScrollVisualToSelected = false;
bool ScrollListToSelected = false;
};
ArenaDebugState& GetState(const String& name)
{
// Simple static map-like storage using standard map would be better but we minimize deps.
// Just use a few static vars since we have known 3 arenas.
static ArenaDebugState s_GameState;
static ArenaDebugState s_EngineState;
static ArenaDebugState s_ScratchState;
if (StringCompare(name, ConstString("Game Arena")) == 0)
{
return s_GameState;
}
if (StringCompare(name, ConstString("Engine Arena")) == 0)
{
return s_EngineState;
}
return s_ScratchState;
}
#if JULIET_DEBUG
// Generate a stable color from a string tag
uint32 GetColorForTag(const String& tag)
{
uint32 hash = 0;
size_t len = tag.Size;
const char* s = tag.Data;
// Simple FNV-1a style hash
for (size_t i = 0; i < len; ++i)
{
hash = hash * 65599 + (uint8)s[i];
}
// Use hash to pick a Hue
float h = static_cast<float>(hash % 360) / 360.0f;
return ImColor::HSV(h, 0.7f, 0.8f);
}
#endif
void DrawMemoryArena(String name, const MemoryArena& arena, [[maybe_unused]] ArenaAllocation* currentHighlight,
[[maybe_unused]] ArenaAllocation*& outNewHighlight)
{
ArenaDebugState& state = GetState(name);
if (ImGui::CollapsingHeader(CStr(name), ImGuiTreeNodeFlags_DefaultOpen))
{
ImGui::PushID(CStr(name));
// Calculate Stats
size_t totalCapacity = 0;
size_t totalUsed = 0;
size_t blockCount = 0;
MemoryBlock* curr = arena.FirstBlock;
while (curr)
{
totalCapacity += curr->TotalSize;
totalUsed += curr->Used;
blockCount++;
curr = curr->Next;
}
ImGui::Text("Used: %zu / %zu bytes (%zu blocks)", totalUsed, totalCapacity, blockCount);
// Zoom Control
ImGui::SliderFloat("Zoom", &state.Zoom, 0.1f, 1000.0f, "%.2f");
#if JULIET_DEBUG
// --- Visual View (Scrollable + Zoom) ---
ImGui::Separator();
ImGui::Text("Visual Map");
// Calculate Dynamic Height
// Height = blockCount * (blockHeight + spacing) + padding
// Constrain between minHeight and maxHeight
float blockHeight = 24.0f;
float blockSpacing = 4.0f;
// Add extra padding to avoid vertical scrollbar triggering due to varying style padding
float requiredVisHeight = (float)blockCount * (blockHeight + blockSpacing) + 30.0f;
if (requiredVisHeight > 300.0f) requiredVisHeight = 300.0f;
if (requiredVisHeight < 50.0f) requiredVisHeight = 50.0f;
// Use ImGuiWindowFlags_NoScrollbar if we fit?
// No, we want horizontal scrollbar. If we provide just enough height, vertical shouldn't show.
if (ImGui::BeginChild("VisualMap", ImVec2(0, requiredVisHeight), true,
ImGuiWindowFlags_HorizontalScrollbar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar))
{
ImGui::SetScrollY(0.0f); // Lock Vertical Scroll to separate Zoom from Scroll
ImDrawList* dl = ImGui::GetWindowDrawList();
float availWidth = ImGui::GetContentRegionAvail().x;
ImVec2 startPos = ImGui::GetCursorScreenPos();
// Reserve space for the virtual width FIRST to satisfy layout
// Also reserve explicit height > window height to ensure Child captures MouseWheel (stops bubbling)
float virtualWidth = availWidth * state.Zoom;
if (virtualWidth < availWidth) virtualWidth = availWidth;
ImGui::Dummy(ImVec2(virtualWidth, requiredVisHeight + 1.0f));
bool isMapHovered = ImGui::IsWindowHovered();
// Interaction Logic
// 1. Zoom with Pivot
if (isMapHovered)
{
float wheel = ImGui::GetIO().MouseWheel;
if (wheel != 0.0f)
{
// Pivot Logic
float mouseXScreen = ImGui::GetMousePos().x;
float activeScrollX = ImGui::GetScrollX();
// Viewport Left
float viewportLeft = ImGui::GetWindowPos().x;
float mouseRelViewport = mouseXScreen - viewportLeft;
// Current Ratio
float virtualWidthOld = std::max(availWidth * state.Zoom, availWidth);
float mouseContentPos = activeScrollX + mouseRelViewport;
float ratio = mouseContentPos / virtualWidthOld;
// Apply Zoom
state.Zoom += wheel * 0.2f * state.Zoom;
if (state.Zoom < 0.1f) state.Zoom = 0.1f;
if (state.Zoom > 1000.0f) state.Zoom = 1000.0f;
// New Ratio
float virtualWidthNew = std::max(availWidth * state.Zoom, availWidth);
// flNewScroll + MouseRel = Ratio * NewWidth
float desiredScrollX = (ratio * virtualWidthNew) - mouseRelViewport;
ImGui::SetScrollX(desiredScrollX);
}
}
// 2. Pan (Left, Right, or Middle Mouse)
if (isMapHovered && (ImGui::IsMouseDragging(ImGuiMouseButton_Left) || ImGui::IsMouseDragging(ImGuiMouseButton_Right) ||
ImGui::IsMouseDragging(ImGuiMouseButton_Middle)))
{
ImGui::SetScrollX(ImGui::GetScrollX() - ImGui::GetIO().MouseDelta.x);
}
// 3. Jump to Selected (Sync from List)
if (state.ScrollVisualToSelected && state.SelectedAlloc)
{
MemoryBlock* searchBlk = arena.FirstBlock;
while (searchBlk)
{
ArenaAllocation* search = searchBlk->FirstAllocation;
bool found = false;
while (search)
{
if (search == state.SelectedAlloc)
{
found = true;
break;
}
search = search->Next;
}
if (found)
{
float virtualWidthLocal = std::max(availWidth * state.Zoom, availWidth);
size_t dataSize = searchBlk->TotalSize - sizeof(MemoryBlock);
if (dataSize > 0)
{
double scale = (double)virtualWidthLocal / (double)dataSize;
float xStart = (float)((double)state.SelectedAlloc->Offset * scale);
// Scroll to center xStart
float centerOffset = availWidth * 0.5f;
ImGui::SetScrollX(xStart - centerOffset);
}
state.ScrollVisualToSelected = false; // Consumed
break;
}
searchBlk = searchBlk->Next;
}
}
MemoryBlock* blk = arena.FirstBlock;
ImVec2 pos = startPos;
int bIdx = 0;
while (blk)
{
// Draw Block Frame
ImVec2 rectMin = pos;
auto rectMax = ImVec2(pos.x + virtualWidth, pos.y + blockHeight);
// Border Color
ImU32 borderColor = (uint32)ImColor::HSV(((float)bIdx * 0.1f), 0.0f, 0.7f);
dl->AddRect(rectMin, rectMax, borderColor);
size_t dataSize = blk->TotalSize - sizeof(MemoryBlock);
if (dataSize > 0)
{
double scale = (double)virtualWidth / (double)dataSize;
ArenaAllocation* alloc = blk->FirstAllocation;
while (alloc)
{
float xStart = pos.x + (float)((double)alloc->Offset * scale);
float width = (float)((double)alloc->Size * scale);
width = std::max(width, 1.0f);
auto aMin = ImVec2(xStart, pos.y + 1);
auto aMax = ImVec2(xStart + width, pos.y + blockHeight - 1);
// Clip visually to block bounds (simplistic)
if (aMin.x < rectMin.x) aMin.x = rectMin.x;
if (aMax.x > rectMax.x) aMax.x = rectMax.x;
ImU32 color = GetColorForTag(alloc->Tag);
bool isSelected = (state.SelectedAlloc == alloc);
bool isHovered = (currentHighlight == alloc);
if (isSelected || isHovered)
{
// Highlight
dl->AddRectFilled(aMin, aMax, IM_COL32_WHITE);
dl->AddRect(aMin, aMax, IM_COL32_BLACK);
}
else
{
dl->AddRectFilled(aMin, aMax, color);
}
// Draw Text if zoomed enough and fits
if (width > 20.0f) // Threshold width to attempt drawing text
{
// Need to check actual text size
ImVec2 textSize = ImGui::CalcTextSize(alloc->Tag.Data, alloc->Tag.Data + alloc->Tag.Size);
if (width >= textSize.x + 4.0f)
{
// Center text
float textX = aMin.x + (width - textSize.x) * 0.5f;
float textY = aMin.y + (blockHeight - 2.0f - textSize.y) * 0.5f;
// Contrast color
ImU32 textColor = IM_COL32_BLACK;
dl->AddText(ImVec2(textX, textY), textColor, alloc->Tag.Data,
alloc->Tag.Data + alloc->Tag.Size);
}
}
if (ImGui::IsMouseHoveringRect(aMin, aMax) && ImGui::IsWindowHovered())
{
outNewHighlight = alloc;
if (ImGui::IsMouseClicked(ImGuiMouseButton_Left))
{
state.SelectedAlloc = alloc;
state.ScrollListToSelected = true; // Sync to list
state.ScrollVisualToSelected = false;
}
ImGui::BeginTooltip();
ImGui::Text("Tag: %.*s", (int)alloc->Tag.Size, alloc->Tag.Data);
ImGui::Text("Size: %zu bytes", alloc->Size);
ImGui::Text("Offset: %zu", alloc->Offset);
uint8* dataPtr = blk->GetData() + alloc->Offset;
ImGui::Text("Data: ");
for (int i = 0; i < 16 && i < (int)alloc->Size; ++i)
{
ImGui::SameLine();
ImGui::Text("%02X", dataPtr[i]);
}
ImGui::EndTooltip();
}
alloc = alloc->Next;
}
}
pos.y += blockHeight + 4;
blk = blk->Next;
bIdx++;
}
// Final spacing
ImGui::Dummy(ImVec2(0, pos.y - startPos.y));
}
ImGui::EndChild();
// --- Tree View (Scrollable) ---
ImGui::Separator();
if (ImGui::TreeNode("Allocations List"))
{
// Calculate item count for Dynamic Height
int totalAllocCount = 0;
MemoryBlock* countBlk = arena.FirstBlock;
while (countBlk)
{
// Add 1 for Block Node
totalAllocCount++;
// If Block Node is Open? We don't know if we don't query it.
// But actually we are inside a Child window inside the TreeNode.
// We want the Child Window to be sized appropriately.
// Simplification: Just count ALL allocations to assume "expanded" state or just use a max cap.
// User wants "Grow until 25 elements".
// This implies if we have 5 items, height is small. If 100, height is capped at 25.
// We'll just count total allocations + blocks as a rough estimate of potential height.
ArenaAllocation* countAlloc = countBlk->FirstAllocation;
while (countAlloc)
{
totalAllocCount++;
countAlloc = countAlloc->Next;
}
countBlk = countBlk->Next;
}
float lineHeight = ImGui::GetTextLineHeightWithSpacing();
float currentNeededHeight = (float)totalAllocCount * lineHeight;
float maxHeight = lineHeight * 25.0f;
float listHeight = currentNeededHeight;
if (listHeight > maxHeight) listHeight = maxHeight;
if (listHeight < lineHeight) listHeight = lineHeight; // Min 1 line
if (ImGui::BeginChild("AllocList", ImVec2(0, listHeight), true))
{
MemoryBlock* blk = arena.FirstBlock;
int blkIdx = 0;
while (blk)
{
if (ImGui::TreeNode((void*)blk, "Block %d (%zu bytes)", blkIdx, blk->TotalSize))
{
ArenaAllocation* alloc = blk->FirstAllocation;
while (alloc)
{
bool isSelected = (state.SelectedAlloc == alloc);
bool isHovered = (currentHighlight == alloc);
ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen;
if (isSelected || isHovered)
{
flags |= ImGuiTreeNodeFlags_Selected;
}
if (isSelected && state.ScrollListToSelected)
{
ImGui::SetScrollHereY();
state.ScrollListToSelected = false; // Consumed
}
// Color Square
ImU32 color = GetColorForTag(alloc->Tag);
ImGui::ColorButton("##color", ImColor(color),
ImGuiColorEditFlags_NoTooltip | ImGuiColorEditFlags_NoDragDrop,
ImVec2(12, 12));
ImGui::SameLine();
// Use implicit string length from String struct
ImGui::TreeNodeEx(alloc, flags, "[%zu] %.*s (%zu bytes)", alloc->Offset,
(int)alloc->Tag.Size, alloc->Tag.Data, alloc->Size);
if (ImGui::IsItemClicked())
{
state.SelectedAlloc = alloc;
state.ScrollVisualToSelected = true; // Sync to visual
state.ScrollListToSelected = false;
}
if (ImGui::IsItemHovered())
{
outNewHighlight = alloc;
}
alloc = alloc->Next;
}
ImGui::TreePop();
}
blk = blk->Next;
blkIdx++;
}
}
ImGui::EndChild();
ImGui::TreePop();
}
#else
ImGui::TextColored(ImVec4(1, 0, 0, 1), "Compile with JULIET_DEBUG for Memory Visualization");
#endif
ImGui::PopID();
}
}
} // namespace
void DebugDrawMemoryArena()
{
#if JULIET_DEBUG
// Cross-frame hover state
static ArenaAllocation* s_ConfirmedHovered = nullptr;
ArenaAllocation* frameHovered = nullptr;
#else
ArenaAllocation* s_ConfirmedHovered = nullptr;
ArenaAllocation* frameHovered = nullptr;
#endif
if (ImGui::Begin("Memory Debugger"))
{
DrawMemoryArena(ConstString("Game Arena"), *GetGameArena(), s_ConfirmedHovered, frameHovered);
DrawMemoryArena(ConstString("Engine Arena"), *GetEngineArena(), s_ConfirmedHovered, frameHovered);
}
ImGui::End();
#if JULIET_DEBUG
s_ConfirmedHovered = frameHovered;
#endif
}
} // namespace Juliet::Debug

View File

@@ -1,15 +1,130 @@
#include <Core/Logging/LogManager.h>
#include <Engine/Engine.h>
#include <Core/Common/CoreUtils.h>
#include <Core/JulietInit.h>
#include <Core/Logging/LogManager.h>
#include <Core/Memory/MemoryArena.h>
#include <Engine/Engine.h>
#include <Graphics/DebugDisplay.h>
#include <Graphics/Graphics.h>
#include <Graphics/RenderPass.h>
#include <time.h>
#ifdef JULIET_ENABLE_IMGUI
#include <Core/ImGui/ImGuiService.h>
#include <Graphics/ImGuiRenderer.h>
#include <imgui.h>
#endif
namespace Juliet
{
namespace
{
Engine EngineInstance;
}
// Initialize systems that depend on graphics/window (after App::Init)
void InitializeDependentSystems()
{
GraphicsDevice* device = EngineInstance.Application->GetGraphicsDevice();
// DebugDisplay system
if (device)
{
DebugDisplay_Initialize(device);
}
#ifdef JULIET_ENABLE_IMGUI
if (NonNullPtr window = EngineInstance.Application->GetPlatformWindow())
{
ImGuiService::Initialize(window);
ImGui::SetCurrentContext(ImGuiService::GetContext());
if (device)
{
ImGuiRenderer_Initialize(device);
// Run Unit Tests automatically
ImGuiService::RunTests();
}
}
#endif
}
// Shutdown systems that were initialized in InitializeDependentSystems
void ShutdownDependentSystems()
{
GraphicsDevice* device = EngineInstance.Application->GetGraphicsDevice();
#ifdef JULIET_ENABLE_IMGUI
if (device)
{
ImGuiRenderer_Shutdown(device);
}
ImGuiService::Shutdown();
#endif
// DebugDisplay system
if (device)
{
DebugDisplay_Shutdown(device);
}
}
// Render one frame
void RenderFrame()
{
GraphicsDevice* device = EngineInstance.Application->GetGraphicsDevice();
Window* window = EngineInstance.Application->GetPlatformWindow();
if (!device || !window)
{
return;
}
CommandList* cmdList = AcquireCommandList(device, QueueType::Graphics);
if (!cmdList)
{
return;
}
Texture* swapChainTexture = nullptr;
if (!WaitAndAcquireSwapChainTexture(cmdList, window, &swapChainTexture))
{
// Swapchain might need resize, submit empty and try again next frame
SubmitCommandLists(cmdList);
return;
}
if (swapChainTexture)
{
// Pre-render phase (buffer uploads, etc.)
EngineInstance.Application->OnPreRender(cmdList);
// Prepare debug display data (before render pass)
DebugDisplay_Prepare(cmdList);
// Get render targets from application
ColorTargetInfo colorInfo = EngineInstance.Application->GetColorTargetInfo(swapChainTexture);
DepthStencilTargetInfo* depthInfo = EngineInstance.Application->GetDepthTargetInfo();
RenderPass* pass = BeginRenderPass(cmdList, colorInfo, depthInfo);
// Application rendering
EngineInstance.Application->OnRender(pass, cmdList);
// Debug display flush (inside render pass)
Camera debugCamera = EngineInstance.Application->GetDebugCamera();
DebugDisplay_Flush(cmdList, pass, debugCamera);
#ifdef JULIET_ENABLE_IMGUI
// ImGui rendering (always last before EndRenderPass)
ImGuiRenderer_Render(cmdList, pass);
#endif
EndRenderPass(pass);
}
SubmitCommandLists(cmdList);
}
} // namespace
void InitializeEngine(JulietInit_Flags flags)
{
@@ -27,10 +142,16 @@ namespace Juliet
{
EngineInstance.Application = &app;
EngineInstance.Application->Init();
// Systems depending on Window/GraphicsDevice
InitializeDependentSystems();
}
void UnloadApplication()
{
// Shutdown dependent systems before app shutdown
ShutdownDependentSystems();
EngineInstance.Application->Shutdown();
EngineInstance.Application = nullptr;
}
@@ -39,7 +160,18 @@ namespace Juliet
{
while (EngineInstance.Application->IsRunning())
{
#ifdef JULIET_ENABLE_IMGUI
ImGuiRenderer_NewFrame();
#endif
// Logic tick
EngineInstance.Application->Update();
// Render tick
RenderFrame();
// Reset scratch arena at end of frame
ScratchArenaReset();
}
}
} // namespace Juliet

View File

@@ -1,7 +1,6 @@
#include <Core/Memory/Allocator.h>
#include <Graphics/D3D12/D3D12CommandList.h>
#include <Graphics/D3D12/D3D12CommandList.h>
#include <Graphics/D3D12/D3D12Buffer.h>
#include <Graphics/D3D12/D3D12CommandList.h>
#include <Graphics/D3D12/D3D12GraphicsDevice.h>
#include <Graphics/D3D12/D3D12Synchronization.h>
#include <Graphics/D3D12/D3D12Utils.h>
@@ -28,7 +27,8 @@ namespace Juliet::D3D12
bool CreateAllocator(NonNullPtr<D3D12Driver> driver, NonNullPtr<D3D12CommandListBaseData> baseData,
D3D12_COMMAND_QUEUE_DESC queueDesc)
{
HRESULT result = driver->D3D12Device->CreateCommandAllocator(queueDesc.Type, IID_ID3D12CommandAllocator, reinterpret_cast<void**>(&baseData->Allocator));
HRESULT result = driver->D3D12Device->CreateCommandAllocator(queueDesc.Type, IID_ID3D12CommandAllocator,
reinterpret_cast<void**>(&baseData->Allocator));
if (FAILED(result))
{
AssertHR(result, "Cannot create ID3D12CommandAllocator");
@@ -56,8 +56,8 @@ namespace Juliet::D3D12
ID3D12GraphicsCommandList6* d3d12GraphicsCommandList = nullptr;
HRESULT result =
driver->D3D12Device->CreateCommandList1(queueDesc.NodeMask, queueDesc.Type,
D3D12_COMMAND_LIST_FLAG_NONE, IID_ID3D12GraphicsCommandList6,
reinterpret_cast<void**>(&d3d12GraphicsCommandList));
D3D12_COMMAND_LIST_FLAG_NONE, IID_ID3D12GraphicsCommandList6,
reinterpret_cast<void**>(&d3d12GraphicsCommandList));
if (FAILED(result))
{
Assert(false, "Error not implemented: cannot create ID3D12GraphicsCommandList6 (graphics or "
@@ -77,8 +77,8 @@ namespace Juliet::D3D12
ID3D12GraphicsCommandList6* d3d12GraphicsCommandList = nullptr;
HRESULT result =
driver->D3D12Device->CreateCommandList1(queueDesc.NodeMask, queueDesc.Type,
D3D12_COMMAND_LIST_FLAG_NONE, IID_ID3D12GraphicsCommandList6,
reinterpret_cast<void**>(&d3d12GraphicsCommandList));
D3D12_COMMAND_LIST_FLAG_NONE, IID_ID3D12GraphicsCommandList6,
reinterpret_cast<void**>(&d3d12GraphicsCommandList));
if (FAILED(result))
{
Assert(false, "Error not implemented: cannot create ID3D12GraphicsCommandList6 (graphics or "
@@ -96,8 +96,10 @@ namespace Juliet::D3D12
{
CreateAllocator(driver, &commandList->CopyCommandList, queueDesc);
ID3D12GraphicsCommandList* d3d12CopyCommandList = nullptr;
HRESULT result = driver->D3D12Device->CreateCommandList1(queueDesc.NodeMask, queueDesc.Type,
D3D12_COMMAND_LIST_FLAG_NONE, IID_ID3D12GraphicsCommandList, reinterpret_cast<void**>(&d3d12CopyCommandList));
HRESULT result =
driver->D3D12Device->CreateCommandList1(queueDesc.NodeMask, queueDesc.Type,
D3D12_COMMAND_LIST_FLAG_NONE, IID_ID3D12GraphicsCommandList,
reinterpret_cast<void**>(&d3d12CopyCommandList));
if (FAILED(result))
{
@@ -392,8 +394,8 @@ namespace Juliet::D3D12
{
auto d3d12CommandList = reinterpret_cast<D3D12CommandList*>(commandList.Get());
// For now we assume Graphics Root Signature. Compute support would need a check or separate function.
d3d12CommandList->GraphicsCommandList.CommandList->SetGraphicsRoot32BitConstants(
rootParameterIndex, numConstants, constants, 0);
d3d12CommandList->GraphicsCommandList.CommandList->SetGraphicsRoot32BitConstants(rootParameterIndex,
numConstants, constants, 0);
}
namespace Internal
@@ -409,7 +411,7 @@ namespace Juliet::D3D12
samplerHeap = AcquireSamplerHeapFromPool(commandList->Driver);
commandList->CRB_SRV_UAV_Heap = viewHeap;
commandList->RTV_Heap = samplerHeap;
commandList->Sampler_Heap = samplerHeap;
heaps[0] = viewHeap->Handle;
heaps[1] = samplerHeap->Handle;
@@ -445,19 +447,16 @@ namespace Juliet::D3D12
return false;
}
result = commandList->GraphicsCommandList.CommandList->Reset(
commandList->GraphicsCommandList.Allocator, nullptr);
result = commandList->GraphicsCommandList.CommandList->Reset(commandList->GraphicsCommandList.Allocator, nullptr);
if (FAILED(result))
{
LogError(driver->D3D12Device, "Could not reset command list", result);
return false;
}
// Return heap descriptor to pool
// CRB_SRV_UAV_Heap is global bindless, do not return it.
ReturnSamplerHeapToPool(driver, commandList->RTV_Heap);
ReturnSamplerHeapToPool(driver, commandList->Sampler_Heap);
commandList->Sampler_Heap = nullptr;
commandList->CRB_SRV_UAV_Heap = nullptr;
commandList->RTV_Heap = nullptr;
// Clean up resource tracking
for (uint32 idx = 0; idx < commandList->UsedTextureCount; ++idx)

View File

@@ -39,10 +39,11 @@ namespace Juliet::D3D12
struct D3D12CommandList
{
CommandListHeader Common;
uint64 ID;
CommandListHeader Common;
D3D12Driver* Driver;
D3D12Driver* Driver;
D3D12PresentData* PresentDatas;
uint32 PresentDataCapacity;
@@ -77,7 +78,7 @@ namespace Juliet::D3D12
// D3D12UniformBuffer *fragmentUniformBuffers[GPUDriver::kMaxUniformBuffersPerStage];
Internal::D3D12DescriptorHeap* CRB_SRV_UAV_Heap;
Internal::D3D12DescriptorHeap* RTV_Heap;
Internal::D3D12DescriptorHeap* Sampler_Heap;
// Resource Tracking
D3D12Texture** UsedTextures;
@@ -96,8 +97,9 @@ namespace Juliet::D3D12
extern void SetBlendConstants(NonNullPtr<CommandList> commandList, FColor blendConstants);
extern void SetBlendConstants(NonNullPtr<CommandList> commandList, FColor blendConstants);
extern void SetStencilReference(NonNullPtr<CommandList> commandList, uint8 reference);
extern void SetIndexBuffer(NonNullPtr<CommandList> commandList, NonNullPtr<GraphicsBuffer> buffer, IndexFormat format);
extern void SetPushConstants(NonNullPtr<CommandList> commandList, ShaderStage stage, uint32 rootParameterIndex, uint32 numConstants, const void* constants);
extern void SetIndexBuffer(NonNullPtr<CommandList> commandList, NonNullPtr<GraphicsBuffer> buffer, IndexFormat format);
extern void SetPushConstants(NonNullPtr<CommandList> commandList, ShaderStage stage, uint32 rootParameterIndex,
uint32 numConstants, const void* constants);
namespace Internal
{

View File

@@ -1,3 +1,5 @@
#include <Core/Logging/LogManager.h>
#include <Core/Logging/LogTypes.h>
#include <Core/Memory/Allocator.h>
#include <Core/Memory/EngineArena.h>
#include <Graphics/D3D12/D3D12DescriptorHeap.h>
@@ -8,9 +10,7 @@ namespace Juliet::D3D12::Internal
{
D3D12DescriptorHeap* CreateDescriptorHeap(NonNullPtr<D3D12Driver> driver, D3D12_DESCRIPTOR_HEAP_TYPE type, uint32 count, bool isStaging)
{
ID3D12DescriptorHeap* handle;
auto heap = static_cast<D3D12DescriptorHeap*>(Calloc(1, sizeof(D3D12DescriptorHeap)));
auto heap = ArenaPushType<D3D12DescriptorHeap>(GetEngineArena(), ConstString("D3D12DescriptorHeap"));
if (!heap)
{
return nullptr;
@@ -19,7 +19,8 @@ namespace Juliet::D3D12::Internal
heap->CurrentDescriptorIndex = 0;
heap->FreeIndicesCapacity = 16;
heap->FreeIndicesCount = 0;
heap->FreeIndices = static_cast<uint32*>(Calloc(heap->FreeIndicesCapacity, sizeof(uint32)));
heap->FreeIndices = ArenaPushArray<uint32>(GetEngineArena(), heap->FreeIndicesCapacity,
ConstString("D3D12DescriptorHeap/FreeIndices"));
D3D12_DESCRIPTOR_HEAP_DESC heapDesc;
heapDesc.NumDescriptors = count;
@@ -27,8 +28,9 @@ namespace Juliet::D3D12::Internal
heapDesc.Flags = isStaging ? D3D12_DESCRIPTOR_HEAP_FLAG_NONE : D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
heapDesc.NodeMask = 0;
HRESULT result =
driver->D3D12Device->CreateDescriptorHeap(&heapDesc, IID_ID3D12DescriptorHeap, (void**)&handle);
ID3D12DescriptorHeap* handle;
HRESULT result =
driver->D3D12Device->CreateDescriptorHeap(&heapDesc, IID_ID3D12DescriptorHeap, reinterpret_cast<void**>(&handle));
if (FAILED(result))
{
LogError(driver->D3D12Device, "Failed to create descriptor heap!", result);
@@ -36,11 +38,11 @@ namespace Juliet::D3D12::Internal
return nullptr;
}
heap->Handle = handle;
heap->HeapType = type;
heap->MaxDescriptors = count;
heap->Staging = isStaging;
heap->DescriptorSize = driver->D3D12Device->GetDescriptorHandleIncrementSize(type);
heap->Handle = handle;
heap->HeapType = type;
heap->MaxDescriptors = count;
heap->Staging = isStaging;
heap->DescriptorSize = driver->D3D12Device->GetDescriptorHandleIncrementSize(type);
heap->DescriptorHeapCPUStart = handle->GetCPUDescriptorHandleForHeapStart();
if (!isStaging)
{
@@ -101,8 +103,10 @@ namespace Juliet::D3D12::Internal
if (heap->FreeIndicesCount >= heap->FreeIndicesCapacity)
{
size_t oldCapacity = heap->FreeIndicesCapacity;
heap->FreeIndicesCapacity *= 2;
heap->FreeIndices = static_cast<uint32*>(Realloc(heap->FreeIndices, heap->FreeIndicesCapacity * sizeof(uint32)));
heap->FreeIndices = ArenaRealloc<uint32>(GetEngineArena(), heap->FreeIndices, oldCapacity,
heap->FreeIndicesCapacity, ConstString("FreeIndices"));
}
heap->FreeIndices[heap->FreeIndicesCount] = descriptor.Index;
@@ -111,62 +115,20 @@ namespace Juliet::D3D12::Internal
D3D12DescriptorHeap* AcquireSamplerHeapFromPool(NonNullPtr<D3D12Driver> d3d12Driver, DescriptorHeapCreator creator)
{
D3D12DescriptorHeapPool* pool = &d3d12Driver->SamplerHeapPool;
uint32 count = GPUDriver::kSampler_HeapDescriptorCount;
D3D12DescriptorHeap* result;
D3D12DescriptorHeapPool* pool = &d3d12Driver->SamplerHeapPool;
if (pool->Count > 0)
{
result = pool->Heaps[pool->Count - 1];
pool->Count -= 1;
return pool->Heaps[pool->Count];
}
// Pool is exhausted (all heaps are in use). We need to create a new one.
// The pool array might be full of "Used" heaps, or it might have empty slots (nullptr) if we expanded before.
// We look for a free slot to store the new heap.
size_t freeSlotIndex = SIZE_MAX;
// Scan for nullptr in the entire array.
// Optimization: active heaps are likely at the beginning, but since Count=0, "Used" heaps are 0..Capacity?
// Actually, if Count=0, ALL slots 0..Capacity-1 are effectively "Used" (unless some are nullptr).
for (size_t i = 0; i < pool->Capacity; ++i)
else
{
if (pool->Heaps[i] == nullptr)
{
freeSlotIndex = i;
break;
}
result = creator(d3d12Driver, D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, GPUDriver::kSampler_HeapDescriptorCount, false);
}
if (freeSlotIndex == SIZE_MAX)
{
// No free slot, expand
size_t oldCapacity = pool->Capacity;
pool->Capacity = pool->Capacity == 0 ? 1 : pool->Capacity * 2;
// Using ArenaRealloc (Template):
pool->Heaps = ArenaRealloc<D3D12DescriptorHeap*>(GetEngineArena(), pool->Heaps, oldCapacity, pool->Capacity);
// Initialize new slots to nullptr
for (size_t i = oldCapacity; i < pool->Capacity; ++i)
{
pool->Heaps[i] = nullptr;
}
freeSlotIndex = oldCapacity;
}
// Create the new heap at the free slot
pool->Heaps[freeSlotIndex] = creator(d3d12Driver, D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, count, false);
// Now we have a new heap at freeSlotIndex. Ideally we want to return it.
// But to maintain the "Stack" invariant (Available are at 0..Count-1),
// and "Used" are at "Count..Capacity-1".
// Currently Count=0. So "Used" is 0..Capacity-1.
// freeSlotIndex is inside "Used" range.
// We can just return it. It is already in the "Used" partition.
// However, we want to ensure it doesn't get lost or overwritten.
// Since we didn't increment Count, it stays in "Used".
return pool->Heaps[freeSlotIndex];
return result;
}
void ReturnSamplerHeapToPool(NonNullPtr<D3D12Driver> d3d12Driver, D3D12DescriptorHeap* heap)
@@ -176,40 +138,18 @@ namespace Juliet::D3D12::Internal
return;
}
Assert(heap->HeapType == D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER);
D3D12DescriptorHeapPool* pool = &d3d12Driver->SamplerHeapPool;
heap->CurrentDescriptorIndex = 0;
// The heap is currently in the "Used" partition (index >= Count).
// We want to move it to the "Available" partition (index < Count).
// Strategy: Swap heap with the element at pool->Heaps[pool->Count], then increment Count.
// First, find the heap index.
size_t heapIndex = SIZE_MAX;
for (size_t i = pool->Count; i < pool->Capacity; ++i)
if (pool->Count >= pool->Capacity)
{
if (pool->Heaps[i] == heap)
{
heapIndex = i;
break;
}
size_t oldCapacity = pool->Capacity;
pool->Capacity *= 2;
pool->Heaps = ArenaRealloc(GetEngineArena(), pool->Heaps, oldCapacity, pool->Capacity, ConstString("Heaps"));
}
if (heapIndex != SIZE_MAX)
{
D3D12DescriptorHeap* temp = pool->Heaps[pool->Count];
pool->Heaps[pool->Count] = pool->Heaps[heapIndex];
pool->Heaps[heapIndex] = temp;
pool->Count += 1;
}
else
{
// Should not happen if the logic is correct.
// Maybe it was not in the pool? (e.g. error scenario).
// In that case, we should probably add it?
// But per constraints, we assume it was allocated via pool.
Assert(false, "Returning a heap that was not found in the pool!");
}
pool->Heaps[pool->Count] = heap;
pool->Count += 1;
}
} // namespace Juliet::D3D12::Internal

View File

@@ -21,7 +21,7 @@ namespace Juliet::D3D12::Internal
uint32 MaxDescriptors;
uint32 DescriptorSize;
uint32 CurrentDescriptorIndex; // only used by GPU heaps
uint32* FreeIndices;
uint32 FreeIndicesCapacity;
uint32 FreeIndicesCount;

View File

@@ -742,13 +742,7 @@ namespace Juliet::D3D12
#endif
GraphicsDevice* CreateGraphicsDevice(bool enableDebug)
{
#if JULIET_DEBUG
// Unit Tests for D3D12 Logic
UnitTest::TestDescriptorHeapPool();
#endif
auto driver = static_cast<D3D12Driver*>(Calloc(1, sizeof(D3D12Driver)));
#if JULIET_DEBUG
@@ -1035,7 +1029,8 @@ namespace Juliet::D3D12
{
heapPool.Capacity = 4;
heapPool.Count = 4;
heapPool.Heaps = ArenaPushArray<Internal::D3D12DescriptorHeap*>(GetEngineArena(), heapPool.Capacity);
heapPool.Heaps = ArenaPushArray<Internal::D3D12DescriptorHeap*>(GetEngineArena(), heapPool.Capacity,
ConstString("DescriptorHeap"));
for (uint32 i = 0; i < heapPool.Capacity; ++i)
{

View File

@@ -1,144 +1,13 @@
#include <Graphics/D3D12/D3D12InternalTests.h>
#include <Core/Memory/Allocator.h>
#include <Graphics/D3D12/D3D12DescriptorHeap.h>
#include <Graphics/D3D12/D3D12GraphicsDevice.h>
#include <Graphics/D3D12/D3D12InternalTests.h>
#if JULIET_DEBUG
namespace Juliet::D3D12::UnitTest
{
using namespace Juliet::D3D12;
using namespace Juliet::D3D12::Internal;
static D3D12DescriptorHeap* MockCreateDescriptorHeap(NonNullPtr<D3D12Driver>, D3D12_DESCRIPTOR_HEAP_TYPE type, uint32, bool)
{
D3D12DescriptorHeap* heap = static_cast<D3D12DescriptorHeap*>(Calloc(1, sizeof(D3D12DescriptorHeap)));
if (heap)
{
heap->HeapType = type;
heap->MaxDescriptors = 128;
// Mock other fields as needed to pass verification
}
return heap;
}
void TestDescriptorHeapPool()
{
D3D12Driver driver = {};
ZeroStruct(driver);
// Ensure pool is empty
driver.SamplerHeapPool.Count = 0;
driver.SamplerHeapPool.Capacity = 0;
driver.SamplerHeapPool.Heaps = nullptr;
NonNullPtr<D3D12Driver> driverPtr(&driver);
// 1. Acquire from empty -> Should create new
D3D12DescriptorHeap* heap1 = AcquireSamplerHeapFromPool(driverPtr, MockCreateDescriptorHeap);
Assert(heap1 != nullptr);
Assert(driver.SamplerHeapPool.Count == 0); // Used heaps are above Count
Assert(driver.SamplerHeapPool.Capacity >= 1);
Assert(driver.SamplerHeapPool.Heaps[0] == heap1);
// 2. Return -> Should become available
ReturnSamplerHeapToPool(driverPtr, heap1);
Assert(driver.SamplerHeapPool.Count == 1); // One available
Assert(driver.SamplerHeapPool.Heaps[0] == heap1); // Available is at index 0
// 3. Acquire again -> Should reuse
D3D12DescriptorHeap* heap2 = AcquireSamplerHeapFromPool(driverPtr, MockCreateDescriptorHeap);
Assert(heap2 == heap1); // Reused
Assert(driver.SamplerHeapPool.Count == 0); // No available left
// 4. Acquire another -> Should Expand and Create
D3D12DescriptorHeap* heap3 = AcquireSamplerHeapFromPool(driverPtr, MockCreateDescriptorHeap);
Assert(heap3 != nullptr);
Assert(heap3 != heap1);
Assert(driver.SamplerHeapPool.Count == 0);
Assert(driver.SamplerHeapPool.Capacity >= 2);
// Cleanup
(void)heap1; (void)heap2; (void)heap3;
Free(heap1);
Free(heap3);
// 5. Test Multiple Allocations (8 heaps)
// Reset pool for clean test or continue? Let's reset to be sure of state,
// effectively leaking previous pool array but that's fine for mock test.
// Actually, let's just continue using the pool, it has Capacity >= 2.
// Return everything first to have clean slate if possible, but we already freed heap1 and heap3 mentally/physically.
// The pool thinks heap3 is "Used" (outside Count).
// We freed it physically, but pool has a dangling pointer in Heaps[1].
// This is dangerous if we reuse it.
// So we MUST correct the pool state or reset it.
// Let's reset the pool state for the 8-loop test.
driver.SamplerHeapPool.Count = 0;
driver.SamplerHeapPool.Capacity = 0;
driver.SamplerHeapPool.Heaps = nullptr; // Leaks previous array
const int kNumHeaps = 32;
D3D12DescriptorHeap* heaps[kNumHeaps];
// 5.1 Acquire 8
for (int i = 0; i < kNumHeaps; ++i)
{
heaps[i] = AcquireSamplerHeapFromPool(driverPtr, MockCreateDescriptorHeap);
Assert(heaps[i] != nullptr);
// Verify uniqueness
for (int j = 0; j < i; ++j)
{
Assert(heaps[i] != heaps[j]);
}
}
Assert(driver.SamplerHeapPool.Capacity >= kNumHeaps);
Assert(driver.SamplerHeapPool.Count == 0);
// 5.2 Release 8
for (int i = 0; i < kNumHeaps; ++i)
{
ReturnSamplerHeapToPool(driverPtr, heaps[i]);
}
Assert(driver.SamplerHeapPool.Count == kNumHeaps);
// 5.3 Acquire 8 Again (Should Reuse)
D3D12DescriptorHeap* heapsAgain[kNumHeaps];
for (int i = 0; i < kNumHeaps; ++i)
{
heapsAgain[i] = AcquireSamplerHeapFromPool(driverPtr, MockCreateDescriptorHeap);
// Verify it matches one of the original heaps (order might reverse due to stack-like behavior)
bool found = false;
for (int j = 0; j < kNumHeaps; ++j)
{
if (heapsAgain[i] == heaps[j])
{
found = true;
break;
}
}
Assert(found);
// Verify uniqueness in the new set
for (int j = 0; j < i; ++j)
{
Assert(heapsAgain[i] != heapsAgain[j]);
}
}
Assert(driver.SamplerHeapPool.Count == 0);
// Capacity should not have increased if we reused
Assert(driver.SamplerHeapPool.Capacity == kNumHeaps); // Or >= 8
// Cleanup
for (int i = 0; i < kNumHeaps; ++i)
{
Free(heaps[i]);
}
// Note: heap2 is heap1.
// Pool array in driver leaked for test scope, acceptable.
printf("DescriptorHeapPool tests passed.\n");
}
}
} // namespace Juliet::D3D12::UnitTest
#endif

View File

@@ -4,6 +4,5 @@
#if JULIET_DEBUG
namespace Juliet::D3D12::UnitTest
{
void TestDescriptorHeapPool();
}
#endif

View File

@@ -45,15 +45,15 @@ namespace Juliet::D3D12
bool hasDSV = false;
if (depthStencilTargetInfo && depthStencilTargetInfo->TargetTexture)
{
auto* container = reinterpret_cast<D3D12TextureContainer*>(depthStencilTargetInfo->TargetTexture);
uint32 width = container->Header.CreateInfo.Width;
uint32 height = container->Header.CreateInfo.Height;
auto* container = reinterpret_cast<D3D12TextureContainer*>(depthStencilTargetInfo->TargetTexture);
uint32 width = container->Header.CreateInfo.Width;
uint32 height = container->Header.CreateInfo.Height;
frameBufferWidth = Min(width, frameBufferWidth);
frameBufferHeight = Min(height, frameBufferHeight);
D3D12TextureSubresource* subresource = Internal::PrepareTextureSubresourceForWrite(
d3d12CommandList, container, 0, 0, false, D3D12_RESOURCE_STATE_DEPTH_WRITE);
D3D12TextureSubresource* subresource =
Internal::PrepareTextureSubresourceForWrite(d3d12CommandList, container, 0, 0, false, D3D12_RESOURCE_STATE_DEPTH_WRITE);
DSV = subresource->DSVHandle.CpuHandle;
hasDSV = true;
@@ -67,9 +67,10 @@ namespace Juliet::D3D12
// TODO: Check if texture has stencil
// if (HasStencil(container->Header.CreateInfo.Format)) clearFlags |= D3D12_CLEAR_FLAG_STENCIL;
d3d12CommandList->GraphicsCommandList.CommandList->ClearDepthStencilView(DSV,
clearFlags, depthStencilTargetInfo->ClearDepth,
depthStencilTargetInfo->ClearStencil, 0, nullptr);
d3d12CommandList->GraphicsCommandList.CommandList->ClearDepthStencilView(DSV, clearFlags,
depthStencilTargetInfo->ClearDepth,
depthStencilTargetInfo->ClearStencil,
0, nullptr);
}
}
@@ -93,8 +94,7 @@ namespace Juliet::D3D12
clearColor[2] = colorTargetInfos[idx].ClearColor.B;
clearColor[3] = colorTargetInfos[idx].ClearColor.A;
d3d12CommandList->GraphicsCommandList.CommandList->ClearRenderTargetView(rtv,
clearColor, 0, nullptr);
d3d12CommandList->GraphicsCommandList.CommandList->ClearRenderTargetView(rtv, clearColor, 0, nullptr);
}
RTVs[idx] = rtv;
@@ -119,8 +119,8 @@ namespace Juliet::D3D12
}
}
d3d12CommandList->GraphicsCommandList.CommandList->OMSetRenderTargets(
colorTargetInfoCount, RTVs, false, hasDSV ? &DSV : nullptr);
d3d12CommandList->GraphicsCommandList.CommandList->OMSetRenderTargets(colorTargetInfoCount, RTVs, false,
hasDSV ? &DSV : nullptr);
// Set defaults graphics states
GraphicsViewPort defaultViewport;
@@ -191,8 +191,7 @@ namespace Juliet::D3D12
// Reset Depth Stencil state
if (d3d12CommandList->DepthStencilSubresource)
{
Internal::TextureSubresourceTransitionToDefaultUsage(d3d12CommandList,
d3d12CommandList->DepthStencilSubresource,
Internal::TextureSubresourceTransitionToDefaultUsage(d3d12CommandList, d3d12CommandList->DepthStencilSubresource,
D3D12_RESOURCE_STATE_DEPTH_WRITE);
d3d12CommandList->DepthStencilSubresource = nullptr;
}
@@ -232,14 +231,16 @@ namespace Juliet::D3D12
d3d12CommandList->CurrentGraphicsPipeline = pipeline;
// Set the Descriptor heap
Internal::SetDescriptorHeaps(d3d12CommandList);
if (d3d12CommandList->CRB_SRV_UAV_Heap == nullptr)
{
Internal::SetDescriptorHeaps(d3d12CommandList);
}
// Set the pipeline state
d3d12CommandList->GraphicsCommandList.CommandList->SetPipelineState(pipeline->PipelineState);
d3d12CommandList->GraphicsCommandList.CommandList->SetGraphicsRootSignature(
pipeline->RootSignature->Handle);
d3d12CommandList->GraphicsCommandList.CommandList->SetGraphicsRootSignature(pipeline->RootSignature->Handle);
d3d12CommandList->GraphicsCommandList.CommandList->IASetPrimitiveTopology(
JulietToD3D12_PrimitiveType[ToUnderlying(pipeline->PrimitiveType)]);
JulietToD3D12_PrimitiveType[ToUnderlying(pipeline->PrimitiveType)]);
// Mark that bindings are needed
d3d12CommandList->NeedVertexSamplerBind = true;
@@ -280,7 +281,6 @@ namespace Juliet::D3D12
// TODO : Last missing piece
// D3D12_INTERNAL_BindGraphicsResources(d3d12CommandBuffer);
d3d12CommandList->GraphicsCommandList.CommandList->DrawInstanced(numVertices,
numInstances, firstVertex, firstInstance);
d3d12CommandList->GraphicsCommandList.CommandList->DrawInstanced(numVertices, numInstances, firstVertex, firstInstance);
}
} // namespace Juliet::D3D12

View File

@@ -41,8 +41,7 @@ namespace Juliet::D3D12
SwapChainComposition composition, NonNullPtr<D3D12TextureContainer> textureContainer, uint8 index)
{
ID3D12Resource* swapChainTexture = nullptr;
HRESULT result =
swapChain->GetBuffer(index, IID_ID3D12Resource, reinterpret_cast<void**>(&swapChainTexture));
HRESULT result = swapChain->GetBuffer(index, IID_ID3D12Resource, reinterpret_cast<void**>(&swapChainTexture));
if (FAILED(result))
{
LogError(driver->D3D12Device, "Cannot get buffer from SwapChain", result);
@@ -77,7 +76,7 @@ namespace Juliet::D3D12
texture->Subresources[0].Depth = 1;
texture->Subresources[0].Level = 0;
D3D12_RESOURCE_DESC textureDesc = swapChainTexture->GetDesc();
D3D12_RESOURCE_DESC textureDesc = swapChainTexture->GetDesc();
textureContainer->Header.CreateInfo.Width = static_cast<uint32>(textureDesc.Width);
textureContainer->Header.CreateInfo.Height = static_cast<uint32>(textureDesc.Height);
textureContainer->Header.CreateInfo.LayerCount = 1;
@@ -115,7 +114,7 @@ namespace Juliet::D3D12
rtvDesc.Texture2D.PlaneSlice = 0;
driver->D3D12Device->CreateRenderTargetView(swapChainTexture, &rtvDesc,
texture->Subresources[0].RTVHandles[0].CpuHandle);
texture->Subresources[0].RTVHandles[0].CpuHandle);
swapChainTexture->Release();
@@ -160,16 +159,17 @@ namespace Juliet::D3D12
windowData->InFlightFences[windowData->WindowFrameCounter] = nullptr;
}
uint32 swapchainIndex = windowData->SwapChain->GetCurrentBackBufferIndex();
HRESULT result =
windowData->SwapChain->GetBuffer(swapchainIndex, IID_ID3D12Resource, reinterpret_cast<void**>(&windowData->SwapChainTextureContainers[swapchainIndex].ActiveTexture->Resource));
uint32 swapchainIndex = windowData->SwapChain->GetCurrentBackBufferIndex();
HRESULT result = windowData->SwapChain->GetBuffer(
swapchainIndex, IID_ID3D12Resource,
reinterpret_cast<void**>(&windowData->SwapChainTextureContainers[swapchainIndex].ActiveTexture->Resource));
if (FAILED(result))
{
LogError(driver->D3D12Device, "Could not acquire swapchain", result);
return false;
}
// When the swap chain texture is acquired its time to present
// When the swap chain texture is acquired it's time to present
if (d3d12CommandList->PresentDataCount == d3d12CommandList->PresentDataCapacity)
{
d3d12CommandList->PresentDataCapacity += 1;
@@ -290,9 +290,9 @@ namespace Juliet::D3D12
swapChainFullscreenDesc.Windowed = true;
IDXGISwapChain1* swapChain = nullptr;
HRESULT result =
driver->DXGIFactory->CreateSwapChainForHwnd(static_cast<IUnknown*>(driver->GraphicsQueue),
windowHandle, &swapChainDesc, &swapChainFullscreenDesc, nullptr, &swapChain);
HRESULT result = driver->DXGIFactory->CreateSwapChainForHwnd(static_cast<IUnknown*>(driver->GraphicsQueue),
windowHandle, &swapChainDesc,
&swapChainFullscreenDesc, nullptr, &swapChain);
if (FAILED(result))
{
LogError(driver->D3D12Device, "Failed to create SwapChain", result);

View File

@@ -9,7 +9,7 @@ namespace Juliet
{
namespace
{
constexpr uint32 kMaxDebugVertices = 65536;
constexpr uint32 kMaxDebugVertices = 16384; // 16K vertices = ~450KB per buffer
struct DebugVertex
{
@@ -25,18 +25,14 @@ namespace Juliet
GraphicsPipeline* DepthTestedPipeline;
GraphicsPipeline* OverlayPipeline;
// Vertex data
DebugVertex* DepthTestedVertices;
// Vertex data (CPU side - single array with two regions)
DebugVertex* Vertices; // Single allocation for all vertices
uint32 DepthTestedVertexCount;
DebugVertex* OverlayVertices;
uint32 OverlayVertexCount;
// GPU buffers
GraphicsBuffer* DepthTestedBuffer;
GraphicsBuffer* OverlayBuffer;
GraphicsTransferBuffer* DepthTestedTransfer;
GraphicsTransferBuffer* OverlayTransfer;
// GPU buffers (consolidated - single buffer pair)
GraphicsBuffer* VertexBuffer;
GraphicsTransferBuffer* TransferBuffer;
bool Initialized;
};
@@ -126,14 +122,14 @@ namespace Juliet
createInfo.TargetInfo.ColorTargetDescriptions = &colorDesc;
createInfo.TargetInfo.NumColorTargets = 1;
// Now that we support depth-stencil targets in the backend, we can enable them.
createInfo.TargetInfo.HasDepthStencilTarget = true;
createInfo.TargetInfo.DepthStencilFormat = TextureFormat::D32_FLOAT;
createInfo.TargetInfo.HasDepthStencilTarget = true;
createInfo.TargetInfo.DepthStencilFormat = TextureFormat::D32_FLOAT;
if (enableDepthTest)
{
createInfo.DepthStencilState.EnableDepthTest = true;
createInfo.DepthStencilState.EnableDepthTest = true;
createInfo.DepthStencilState.EnableDepthWrite = true;
createInfo.DepthStencilState.CompareOperation = CompareOperation::Less;
}
@@ -163,26 +159,23 @@ namespace Juliet
g_DebugState.Device = device;
// Allocate CPU vertex arrays
g_DebugState.DepthTestedVertices = static_cast<DebugVertex*>(Malloc(kMaxDebugVertices * sizeof(DebugVertex)));
g_DebugState.OverlayVertices = static_cast<DebugVertex*>(Malloc(kMaxDebugVertices * sizeof(DebugVertex)));
// Allocate single CPU vertex array (depth-tested in first half, overlay in second half)
g_DebugState.Vertices = static_cast<DebugVertex*>(Malloc(kMaxDebugVertices * sizeof(DebugVertex)));
g_DebugState.DepthTestedVertexCount = 0;
g_DebugState.OverlayVertexCount = 0;
// Create GPU buffers
// Create single GPU buffer pair (consolidated)
BufferCreateInfo bufferCI = {};
bufferCI.Size = kMaxDebugVertices * sizeof(DebugVertex);
bufferCI.Usage = BufferUsage::StructuredBuffer;
g_DebugState.DepthTestedBuffer = CreateGraphicsBuffer(device, bufferCI);
g_DebugState.OverlayBuffer = CreateGraphicsBuffer(device, bufferCI);
g_DebugState.VertexBuffer = CreateGraphicsBuffer(device, bufferCI);
TransferBufferCreateInfo transferCI = {};
transferCI.Size = kMaxDebugVertices * sizeof(DebugVertex);
transferCI.Usage = TransferBufferUsage::Upload;
g_DebugState.DepthTestedTransfer = CreateGraphicsTransferBuffer(device, transferCI);
g_DebugState.OverlayTransfer = CreateGraphicsTransferBuffer(device, transferCI);
g_DebugState.TransferBuffer = CreateGraphicsTransferBuffer(device, transferCI);
g_DebugState.Initialized = true;
}
@@ -203,38 +196,33 @@ namespace Juliet
DestroyGraphicsPipeline(device, g_DebugState.OverlayPipeline);
}
if (g_DebugState.DepthTestedBuffer)
if (g_DebugState.VertexBuffer)
{
DestroyGraphicsBuffer(device, g_DebugState.DepthTestedBuffer);
DestroyGraphicsBuffer(device, g_DebugState.VertexBuffer);
}
if (g_DebugState.OverlayBuffer)
if (g_DebugState.TransferBuffer)
{
DestroyGraphicsBuffer(device, g_DebugState.OverlayBuffer);
}
if (g_DebugState.DepthTestedTransfer)
{
DestroyGraphicsTransferBuffer(device, g_DebugState.DepthTestedTransfer);
}
if (g_DebugState.OverlayTransfer)
{
DestroyGraphicsTransferBuffer(device, g_DebugState.OverlayTransfer);
DestroyGraphicsTransferBuffer(device, g_DebugState.TransferBuffer);
}
SafeFree(g_DebugState.DepthTestedVertices);
SafeFree(g_DebugState.OverlayVertices);
SafeFree(g_DebugState.Vertices);
g_DebugState = {};
}
void DebugDisplay_DrawLine(const Vector3& start, const Vector3& end, const FColor& color, bool overlay)
{
// Depth-tested vertices at beginning, overlay vertices at end (growing backward)
if (overlay)
{
AddLine(g_DebugState.OverlayVertices, g_DebugState.OverlayVertexCount, start, end, color);
// Overlay vertices grow from end of buffer backward
uint32 halfMax = kMaxDebugVertices / 2;
AddLine(g_DebugState.Vertices + halfMax, g_DebugState.OverlayVertexCount, start, end, color);
}
else
{
AddLine(g_DebugState.DepthTestedVertices, g_DebugState.DepthTestedVertexCount, start, end, color);
// Depth-tested vertices grow from start of buffer forward
AddLine(g_DebugState.Vertices, g_DebugState.DepthTestedVertexCount, start, end, color);
}
}
@@ -242,11 +230,12 @@ namespace Juliet
{
if (overlay)
{
AddSphereWireframe(g_DebugState.OverlayVertices, g_DebugState.OverlayVertexCount, center, radius, color);
uint32 halfMax = kMaxDebugVertices / 2;
AddSphereWireframe(g_DebugState.Vertices + halfMax, g_DebugState.OverlayVertexCount, center, radius, color);
}
else
{
AddSphereWireframe(g_DebugState.DepthTestedVertices, g_DebugState.DepthTestedVertexCount, center, radius, color);
AddSphereWireframe(g_DebugState.Vertices, g_DebugState.DepthTestedVertexCount, center, radius, color);
}
}
@@ -257,42 +246,40 @@ namespace Juliet
return;
}
// Render depth-tested primitives
if (g_DebugState.DepthTestedVertexCount > 0 && g_DebugState.DepthTestedBuffer)
uint32 totalVertices = g_DebugState.DepthTestedVertexCount + g_DebugState.OverlayVertexCount;
if (totalVertices == 0 || !g_DebugState.VertexBuffer)
{
// Upload vertex data
void* ptr = MapGraphicsTransferBuffer(g_DebugState.Device, g_DebugState.DepthTestedTransfer);
if (ptr)
{
MemCopy(ptr, g_DebugState.DepthTestedVertices, g_DebugState.DepthTestedVertexCount * sizeof(DebugVertex));
UnmapGraphicsTransferBuffer(g_DebugState.Device, g_DebugState.DepthTestedTransfer);
CopyBuffer(cmdList, g_DebugState.DepthTestedBuffer, g_DebugState.DepthTestedTransfer,
g_DebugState.DepthTestedVertexCount * sizeof(DebugVertex));
TransitionBufferToReadable(cmdList, g_DebugState.DepthTestedBuffer);
}
return;
}
// Render overlay primitives
if (g_DebugState.OverlayVertexCount > 0 && g_DebugState.OverlayBuffer)
// Upload all vertex data in one copy (depth-tested at start, overlay at kMaxDebugVertices/2)
void* ptr = MapGraphicsTransferBuffer(g_DebugState.Device, g_DebugState.TransferBuffer);
if (ptr)
{
// Upload vertex data
void* ptr = MapGraphicsTransferBuffer(g_DebugState.Device, g_DebugState.OverlayTransfer);
if (ptr)
// Copy depth-tested vertices (at start)
if (g_DebugState.DepthTestedVertexCount > 0)
{
MemCopy(ptr, g_DebugState.OverlayVertices, g_DebugState.OverlayVertexCount * sizeof(DebugVertex));
UnmapGraphicsTransferBuffer(g_DebugState.Device, g_DebugState.OverlayTransfer);
CopyBuffer(cmdList, g_DebugState.OverlayBuffer, g_DebugState.OverlayTransfer,
g_DebugState.OverlayVertexCount * sizeof(DebugVertex));
TransitionBufferToReadable(cmdList, g_DebugState.OverlayBuffer);
MemCopy(ptr, g_DebugState.Vertices, g_DebugState.DepthTestedVertexCount * sizeof(DebugVertex));
}
// Copy overlay vertices (at kMaxDebugVertices/2 offset)
if (g_DebugState.OverlayVertexCount > 0)
{
uint32 halfMax = kMaxDebugVertices / 2;
auto* overlayDest = static_cast<uint8*>(ptr) + halfMax * sizeof(DebugVertex);
auto* overlaySrc = g_DebugState.Vertices + halfMax;
MemCopy(overlayDest, overlaySrc, g_DebugState.OverlayVertexCount * sizeof(DebugVertex));
}
UnmapGraphicsTransferBuffer(g_DebugState.Device, g_DebugState.TransferBuffer);
// Single buffer copy (full buffer to ensure both regions are uploaded)
size_t copySize = kMaxDebugVertices * sizeof(DebugVertex);
CopyBuffer(cmdList, g_DebugState.VertexBuffer, g_DebugState.TransferBuffer, copySize);
TransitionBufferToReadable(cmdList, g_DebugState.VertexBuffer);
}
}
void DebugDisplay_Flush(CommandList* cmdList, RenderPass* renderPass, const Camera& camera)
{
if (!g_DebugState.Initialized)
{
return;
@@ -303,42 +290,50 @@ namespace Juliet
{
// Use B8G8R8A8_UNORM which matches the SDR swapchain
g_DebugState.DepthTestedPipeline = CreateDebugPipeline(g_DebugState.Device, TextureFormat::B8G8R8A8_UNORM, true);
g_DebugState.OverlayPipeline = CreateDebugPipeline(g_DebugState.Device, TextureFormat::B8G8R8A8_UNORM, false);
g_DebugState.OverlayPipeline = CreateDebugPipeline(g_DebugState.Device, TextureFormat::B8G8R8A8_UNORM, false);
}
// Render depth-tested primitives
if (g_DebugState.DepthTestedVertexCount > 0 && g_DebugState.DepthTestedPipeline && g_DebugState.DepthTestedBuffer)
uint32 bufferIndex = GetDescriptorIndex(g_DebugState.Device, g_DebugState.VertexBuffer);
// Render depth-tested primitives (vertices at offset 0 in buffer)
if (g_DebugState.DepthTestedVertexCount > 0 && g_DebugState.DepthTestedPipeline && g_DebugState.VertexBuffer)
{
BindGraphicsPipeline(renderPass, g_DebugState.DepthTestedPipeline);
// Pack VP matrix + buffer index into push constants
struct {
struct
{
Matrix vp;
uint32 bufferIndex;
uint32 padding[3];
uint32 vertexOffset; // Offset in vertices (not bytes)
uint32 padding[2];
} pushData;
pushData.vp = Camera_GetViewProjectionMatrix(camera);
pushData.bufferIndex = GetDescriptorIndex(g_DebugState.Device, g_DebugState.DepthTestedBuffer);
pushData.vp = Camera_GetViewProjectionMatrix(camera);
pushData.bufferIndex = bufferIndex;
pushData.vertexOffset = 0; // Depth-tested vertices start at 0
SetPushConstants(cmdList, ShaderStage::Vertex, 0, sizeof(pushData) / sizeof(uint32), &pushData);
DrawPrimitives(renderPass, g_DebugState.DepthTestedVertexCount, 1, 0, 0);
}
// Render overlay primitives
if (g_DebugState.OverlayVertexCount > 0 && g_DebugState.OverlayPipeline && g_DebugState.OverlayBuffer)
// Render overlay primitives (vertices at offset kMaxDebugVertices/2 in buffer)
if (g_DebugState.OverlayVertexCount > 0 && g_DebugState.OverlayPipeline && g_DebugState.VertexBuffer)
{
BindGraphicsPipeline(renderPass, g_DebugState.OverlayPipeline);
// Pack VP matrix + buffer index into push constants
struct {
struct
{
Matrix vp;
uint32 bufferIndex;
uint32 padding[3];
uint32 vertexOffset; // Offset in vertices (not bytes)
uint32 padding[2];
} pushData;
pushData.vp = Camera_GetViewProjectionMatrix(camera);
pushData.bufferIndex = GetDescriptorIndex(g_DebugState.Device, g_DebugState.OverlayBuffer);
pushData.vp = Camera_GetViewProjectionMatrix(camera);
pushData.bufferIndex = bufferIndex;
pushData.vertexOffset = kMaxDebugVertices / 2; // Overlay vertices start at half
SetPushConstants(cmdList, ShaderStage::Vertex, 0, sizeof(pushData) / sizeof(uint32), &pushData);
DrawPrimitives(renderPass, g_DebugState.OverlayVertexCount, 1, 0, 0);
}

View File

@@ -0,0 +1,442 @@
#include <Juliet.h>
#ifdef JULIET_ENABLE_IMGUI
#include <Graphics/ImGuiRenderer.h>
#include <Core/Logging/LogManager.h>
#include <Core/Logging/LogTypes.h>
#include <Core/Memory/MemoryArena.h>
#include <Graphics/GraphicsPipeline.h>
#include <backends/imgui_impl_win32.h>
#include <imgui.h>
namespace Juliet
{
namespace
{
constexpr uint32 kMaxFramesInFlight = 2;
struct FrameResources
{
GraphicsBuffer* VertexBuffer = nullptr;
GraphicsBuffer* IndexBuffer = nullptr;
GraphicsTransferBuffer* VertexUpload = nullptr;
GraphicsTransferBuffer* IndexUpload = nullptr;
uint32 VertexBufferSize = 0; // In bytes
uint32 IndexBufferSize = 0; // In bytes
};
struct ImGuiRendererState
{
GraphicsDevice* Device;
GraphicsPipeline* Pipeline;
// Resources
Texture* FontTexture;
Shader* VertexShader;
Shader* FragmentShader;
// Frame Data
FrameResources Frames[kMaxFramesInFlight];
uint32 FrameIndex;
bool Initialized;
};
ImGuiRendererState g_ImGuiState = {};
// Helper to resize buffers for a specific frame
void EnsureBufferSize(FrameResources& frame, uint32 requiredVertexBytes, uint32 requiredIndexBytes)
{
bool needVertexRealloc = requiredVertexBytes > frame.VertexBufferSize;
bool needIndexRealloc = requiredIndexBytes > frame.IndexBufferSize;
// If any buffer needs reallocation, wait for GPU to finish using everybody to be safe.
// Ideally we only wait for this specific frame's fence, but we don't have that granularity easily exposed
// here. Resizing is rare, so global wait is acceptable.
if (needVertexRealloc || needIndexRealloc)
{
WaitUntilGPUIsIdle(g_ImGuiState.Device);
}
if (needVertexRealloc)
{
if (frame.VertexBuffer)
{
DestroyGraphicsBuffer(g_ImGuiState.Device, frame.VertexBuffer);
}
if (frame.VertexUpload)
{
DestroyGraphicsTransferBuffer(g_ImGuiState.Device, frame.VertexUpload);
}
frame.VertexBufferSize = requiredVertexBytes + 5000 * sizeof(ImDrawVert); // Growth factor
BufferCreateInfo vci = {};
vci.Size = frame.VertexBufferSize;
vci.Usage = BufferUsage::StructuredBuffer;
frame.VertexBuffer = CreateGraphicsBuffer(g_ImGuiState.Device, vci);
TransferBufferCreateInfo tvci = {};
tvci.Size = frame.VertexBufferSize;
tvci.Usage = TransferBufferUsage::Upload;
frame.VertexUpload = CreateGraphicsTransferBuffer(g_ImGuiState.Device, tvci);
}
if (needIndexRealloc)
{
if (frame.IndexBuffer)
{
DestroyGraphicsBuffer(g_ImGuiState.Device, frame.IndexBuffer);
}
if (frame.IndexUpload)
{
DestroyGraphicsTransferBuffer(g_ImGuiState.Device, frame.IndexUpload);
}
frame.IndexBufferSize = requiredIndexBytes + 10000 * sizeof(ImDrawIdx);
BufferCreateInfo ici = {};
ici.Size = frame.IndexBufferSize;
ici.Usage = BufferUsage::IndexBuffer;
frame.IndexBuffer = CreateGraphicsBuffer(g_ImGuiState.Device, ici);
TransferBufferCreateInfo tici = {};
tici.Size = frame.IndexBufferSize;
tici.Usage = TransferBufferUsage::Upload;
frame.IndexUpload = CreateGraphicsTransferBuffer(g_ImGuiState.Device, tici);
}
}
} // namespace
bool ImGuiRenderer_Initialize(GraphicsDevice* device)
{
printf("ImGuiRenderer_Initialize: device=%p, g_ImGuiState=%p, Initialized=%d\n", (void*)device,
(void*)&g_ImGuiState, g_ImGuiState.Initialized);
if (g_ImGuiState.Initialized)
{
return true;
}
g_ImGuiState.Device = device;
// Load Shaders
String entryPoint = WrapString("main");
ShaderCreateInfo shaderCI = {};
shaderCI.EntryPoint = entryPoint;
String vertPath = WrapString("../../Assets/compiled/ImGui.vert.dxil");
shaderCI.Stage = ShaderStage::Vertex;
g_ImGuiState.VertexShader = CreateShader(device, vertPath, shaderCI);
String fragPath = WrapString("../../Assets/compiled/ImGui.frag.dxil");
shaderCI.Stage = ShaderStage::Fragment;
g_ImGuiState.FragmentShader = CreateShader(device, fragPath, shaderCI);
if (!g_ImGuiState.VertexShader || !g_ImGuiState.FragmentShader)
{
LogError(LogCategory::Graphics, "Failed to load ImGui shaders");
return false;
}
// Build Font Texture
ImGuiIO& io = ImGui::GetIO();
unsigned char* pixels;
int width, height;
io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
TextureCreateInfo texCI = {};
texCI.Type = TextureType::Texture_2D;
texCI.Width = (uint32)width;
texCI.Height = (uint32)height;
texCI.Format = TextureFormat::R8G8B8A8_UNORM;
texCI.Flags = TextureUsageFlag::Sampler;
texCI.LayerCount = 1;
texCI.MipLevelCount = 1;
texCI.SampleCount = TextureSampleCount::One;
g_ImGuiState.FontTexture = CreateTexture(device, texCI);
io.Fonts->SetTexID((ImTextureID)g_ImGuiState.FontTexture);
// Upload data
uint32 rowPitch = (uint32)width * 4u;
uint32 alignedRowPitch = (rowPitch + 255u) & ~255u;
uint32 textureSize = alignedRowPitch * static_cast<uint32>(height);
TransferBufferCreateInfo tbci = {};
tbci.Size = textureSize;
tbci.Usage = TransferBufferUsage::Upload;
GraphicsTransferBuffer* tb = CreateGraphicsTransferBuffer(device, tbci);
if (!tb)
{
Log(LogLevel::Error, LogCategory::Graphics, "ImGuiRenderer: Failed to create font upload buffer");
return false;
}
auto dst = (uint8*)MapGraphicsTransferBuffer(device, tb);
for (uint32 y = 0; y < static_cast<uint32>(height); ++y)
{
MemCopy(dst + y * alignedRowPitch, pixels + y * rowPitch, rowPitch);
}
UnmapGraphicsTransferBuffer(device, tb);
CommandList* cmd = AcquireCommandList(device);
CopyBufferToTexture(cmd, g_ImGuiState.FontTexture, tb);
SubmitCommandLists(cmd);
WaitUntilGPUIsIdle(device);
DestroyGraphicsTransferBuffer(device, tb);
// Init Frame Data
g_ImGuiState.FrameIndex = 0;
for (uint32 i = 0; i < kMaxFramesInFlight; ++i)
{
g_ImGuiState.Frames[i] = {};
}
g_ImGuiState.Initialized = true;
return true;
}
void ImGuiRenderer_Shutdown(GraphicsDevice* device)
{
if (!g_ImGuiState.Initialized)
{
return;
}
WaitUntilGPUIsIdle(device);
if (g_ImGuiState.Pipeline)
{
DestroyGraphicsPipeline(device, g_ImGuiState.Pipeline);
}
if (g_ImGuiState.VertexShader)
{
DestroyShader(device, g_ImGuiState.VertexShader);
}
if (g_ImGuiState.FragmentShader)
{
DestroyShader(device, g_ImGuiState.FragmentShader);
}
if (g_ImGuiState.FontTexture)
{
DestroyTexture(device, g_ImGuiState.FontTexture);
}
for (uint32 i = 0; i < kMaxFramesInFlight; ++i)
{
FrameResources& frame = g_ImGuiState.Frames[i];
if (frame.VertexBuffer)
{
DestroyGraphicsBuffer(device, frame.VertexBuffer);
}
if (frame.IndexBuffer)
{
DestroyGraphicsBuffer(device, frame.IndexBuffer);
}
if (frame.VertexUpload)
{
DestroyGraphicsTransferBuffer(device, frame.VertexUpload);
}
if (frame.IndexUpload)
{
DestroyGraphicsTransferBuffer(device, frame.IndexUpload);
}
frame = {};
}
g_ImGuiState = {};
}
void ImGuiRenderer_NewFrame()
{
ImGui_ImplWin32_NewFrame(); // Assumes Win32 initialized elsewhere
ImGui::NewFrame();
}
void ImGuiRenderer_Render(CommandList* cmdList, RenderPass* renderPass)
{
if (!g_ImGuiState.Initialized)
{
return;
}
ImGui::Render();
ImDrawData* drawData = ImGui::GetDrawData();
if (!drawData || drawData->CmdListsCount == 0)
{
return;
}
// Lazy create pipeline
if (!g_ImGuiState.Pipeline)
{
// Assume B8G8R8A8_UNORM for SwapChain
GraphicsPipelineCreateInfo pci = {};
pci.VertexShader = g_ImGuiState.VertexShader;
pci.FragmentShader = g_ImGuiState.FragmentShader;
pci.PrimitiveType = PrimitiveType::TriangleList;
pci.RasterizerState.FillMode = FillMode::Solid;
pci.RasterizerState.CullMode = CullMode::None;
ColorTargetDescription colorDesc = {};
colorDesc.Format = TextureFormat::B8G8R8A8_UNORM; // Match SwapChain
// Blend State
colorDesc.BlendState.EnableBlend = true;
colorDesc.BlendState.SourceColorBlendFactor = BlendFactor::Src_Alpha;
colorDesc.BlendState.DestinationColorBlendFactor = BlendFactor::One_Minus_Src_Alpha;
colorDesc.BlendState.ColorBlendOperation = BlendOperation::Add;
colorDesc.BlendState.SourceAlphaBlendFactor = BlendFactor::One;
colorDesc.BlendState.DestinationAlphaBlendFactor = BlendFactor::One_Minus_Src_Alpha;
colorDesc.BlendState.AlphaBlendOperation = BlendOperation::Add;
colorDesc.BlendState.EnableColorWriteMask = true;
colorDesc.BlendState.ColorWriteMask =
ColorComponentFlags::R | ColorComponentFlags::G | ColorComponentFlags::B | ColorComponentFlags::A;
pci.TargetInfo.ColorTargetDescriptions = &colorDesc;
pci.TargetInfo.NumColorTargets = 1;
g_ImGuiState.Pipeline = CreateGraphicsPipeline(g_ImGuiState.Device, pci);
}
// Cycle Frame
g_ImGuiState.FrameIndex = (g_ImGuiState.FrameIndex + 1) % kMaxFramesInFlight;
FrameResources& currentFrame = g_ImGuiState.Frames[g_ImGuiState.FrameIndex];
// Upload Buffers
uint32 totalVtx = (uint32)drawData->TotalVtxCount;
uint32 totalIdx = (uint32)drawData->TotalIdxCount;
EnsureBufferSize(currentFrame, totalVtx * sizeof(ImDrawVert), totalIdx * sizeof(ImDrawIdx));
auto vtxDst = (ImDrawVert*)MapGraphicsTransferBuffer(g_ImGuiState.Device, currentFrame.VertexUpload);
auto idxDst = (ImDrawIdx*)MapGraphicsTransferBuffer(g_ImGuiState.Device, currentFrame.IndexUpload);
for (int n = 0; n < drawData->CmdListsCount; n++)
{
const ImDrawList* cmd_list = drawData->CmdLists[n];
MemCopy(vtxDst, cmd_list->VtxBuffer.Data, static_cast<size_t>(cmd_list->VtxBuffer.Size) * sizeof(ImDrawVert));
MemCopy(idxDst, cmd_list->IdxBuffer.Data, static_cast<size_t>(cmd_list->IdxBuffer.Size) * sizeof(ImDrawIdx));
vtxDst += cmd_list->VtxBuffer.Size;
idxDst += cmd_list->IdxBuffer.Size;
}
UnmapGraphicsTransferBuffer(g_ImGuiState.Device, currentFrame.VertexUpload);
UnmapGraphicsTransferBuffer(g_ImGuiState.Device, currentFrame.IndexUpload);
// Copy both vertex and index buffers to GPU
CopyBuffer(cmdList, currentFrame.VertexBuffer, currentFrame.VertexUpload, totalVtx * sizeof(ImDrawVert));
CopyBuffer(cmdList, currentFrame.IndexBuffer, currentFrame.IndexUpload, totalIdx * sizeof(ImDrawIdx));
// Transition vertex buffer to SRV state (this barrier waits for copy to complete)
TransitionBufferToReadable(cmdList, currentFrame.VertexBuffer);
// SetIndexBuffer transitions from COPY_DEST to INDEX_BUFFER (barrier waits for copy to complete)
SetIndexBuffer(cmdList, currentFrame.IndexBuffer, IndexFormat::UInt16);
// Render
BindGraphicsPipeline(renderPass, g_ImGuiState.Pipeline);
// Setup Viewport / Scale
float L = drawData->DisplayPos.x;
float R = drawData->DisplayPos.x + drawData->DisplaySize.x;
float T = drawData->DisplayPos.y;
float B = drawData->DisplayPos.y + drawData->DisplaySize.y;
float scale[2];
scale[0] = 2.0f / (R - L);
scale[1] = -2.0f / (B - T);
float translate[2];
translate[0] = -1.0f - L * scale[0];
translate[1] = 1.0f - T * scale[1];
// Global State (Display Size, etc)
uint32 globalVtxOffset = 0;
uint32 globalIdxOffset = 0;
ImVec2 clip_off = drawData->DisplayPos;
ImVec2 clip_scale = drawData->FramebufferScale;
for (int n = 0; n < drawData->CmdListsCount; n++)
{
const ImDrawList* cmd_list = drawData->CmdLists[n];
for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
{
const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
if (pcmd->UserCallback != nullptr)
{
// pcmd->UserCallback(cmd_list, pcmd);
}
else
{
// Project scissor/clipping rectangles into framebuffer space
ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x,
(pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x,
(pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
// Skip draw commands with zero-sized scissor rectangles
if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
{
continue;
}
// Set scissor rect (clipping rectangle)
Rectangle scissorRect = {};
scissorRect.X = static_cast<int32>(clip_min.x);
scissorRect.Y = static_cast<int32>(clip_min.y);
scissorRect.Width = static_cast<int32>(clip_max.x - clip_min.x);
scissorRect.Height = static_cast<int32>(clip_max.y - clip_min.y);
SetScissorRect(renderPass, scissorRect);
// Bind Texture
uint32 textureIndex = GetDescriptorIndex(g_ImGuiState.Device, (Texture*)pcmd->GetTexID());
// Push Constants
// Layout: ViewProjection(64) + BufferIndex(4) + TextureIndex(4) + VertexOffset(4) + Padding(4) + Scale(8) + Translate(8)
struct
{
float dummyVP[16]; // Occupy VP slot
uint32 bufferIndex;
uint32 textureIndex;
uint32 vertexOffset; // Base vertex for indexed bindless drawing
uint32 padding; // Alignment padding
float scale[2];
float translate[2];
} pushData = {}; // Zero-initialize all fields
pushData.bufferIndex = GetDescriptorIndex(g_ImGuiState.Device, currentFrame.VertexBuffer);
pushData.textureIndex = textureIndex;
pushData.vertexOffset = pcmd->VtxOffset + globalVtxOffset; // Pass vertex offset for bindless
pushData.scale[0] = scale[0];
pushData.scale[1] = scale[1];
pushData.translate[0] = translate[0];
pushData.translate[1] = translate[1];
SetPushConstants(cmdList, ShaderStage::Vertex, 0, sizeof(pushData) / 4, &pushData);
// Draw - pass 0 for vertexOffset since shader handles it via push constants
DrawIndexedPrimitives(renderPass, pcmd->ElemCount, 1, pcmd->IdxOffset + globalIdxOffset, 0, 0);
}
}
globalIdxOffset += static_cast<uint32>(cmd_list->IdxBuffer.Size);
globalVtxOffset += static_cast<uint32>(cmd_list->VtxBuffer.Size);
}
}
} // namespace Juliet
#endif // JULIET_ENABLE_IMGUI

View File

@@ -5,6 +5,8 @@
.ProjectPath = 'JulietApp'
.JulietIncludePath = ' "-IJuliet/include"'
+ ' "-IJuliet/src"'
+ ' "-IExternal/imgui"'
.ProjectDefPath = '$_WORKING_DIR_$/$ProjectName$/$ProjectName$.def'
// Library
@@ -34,7 +36,6 @@
// Extra Compiler Options
.CompilerOptions + .JulietIncludePath
#if __WINDOWS__
.CompilerOptions + ' -DJULIET_WIN32'
#endif
@@ -58,9 +59,11 @@
.Libraries = {
'JulietApp-Lib-$Platform$-$BuildConfigName$',
'Juliet-Lib-$Platform$-$BuildConfigName$',
'Game-Lib-$Platform$-$BuildConfigName$'
'Game-Lib-$Platform$-$BuildConfigName$',
'ImGui-Lib-$Platform$-$BuildConfigName$'
}
.LinkerOutput = '$BinPath$/$Platform$-$BuildConfigName$/$ProjectName$$ExeExtension$'
// TODO : Only use when using DLL and not static link

View File

@@ -73,6 +73,30 @@
<Configuration>x64Clang-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Debug|x64">
<Configuration>x64-Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Profile|x64">
<Configuration>x64-Profile</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64-Release|x64">
<Configuration>x64-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Debug|x64">
<Configuration>x64Clang-Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Profile|x64">
<Configuration>x64Clang-Profile</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="x64Clang-Release|x64">
<Configuration>x64Clang-Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="JulietApp.bff" />
@@ -194,6 +218,42 @@
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -251,12 +311,90 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -266,7 +404,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -276,7 +414,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -285,8 +423,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -296,7 +434,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -306,7 +444,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -315,7 +453,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Game;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
@@ -345,7 +483,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Game;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
@@ -375,8 +513,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -386,7 +524,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -396,7 +534,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -405,8 +543,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -416,7 +554,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -426,7 +564,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -522,6 +660,36 @@
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Debug|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Profile|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64-Release|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Profile|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
<BuildLog>
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@@ -2,24 +2,32 @@
#include <Core/Application/ApplicationManager.h>
#include <Core/Common/EnumUtils.h>
#include <Core/Common/String.h>
#include <Core/HAL/Display/Display.h>
#include <Core/HAL/Event/SystemEvent.h>
#include <Core/HAL/Filesystem/Filesystem.h>
#include <Core/JulietInit.h>
#include <Core/Logging/LogManager.h>
#include <Core/Logging/LogTypes.h>
#include <Core/Math/Matrix.h>
#include <Core/Memory/MemoryArena.h>
#include <Core/Memory/Utils.h>
#include <cstdlib>
#include <Engine/Debug/MemoryDebugger.h>
#include <Graphics/Camera.h>
#include <Graphics/DebugDisplay.h>
#include <Graphics/Graphics.h>
#include <Graphics/GraphicsConfig.h>
#include <Graphics/GraphicsPipeline.h>
#include <Graphics/RenderPass.h>
#include <Juliet.h>
#include <Core/Common/String.h>
#include <Core/Memory/Utils.h>
#include <Core/Memory/MemoryArena.h>
#include <Core/Memory/EngineArena.h>
#include <cstdlib>
#ifdef JULIET_ENABLE_IMGUI
#include <Graphics/ImGuiRenderer.h>
#include <imgui.h>
#endif
static bool ShowMemoryDebugger = false;
// TODO : Replace with message box from framework + call main and not winmain + subsystem
// TODO : Think how to do the draw pipeline.
@@ -33,6 +41,13 @@
using namespace Juliet;
extern "C" {
__declspec(dllexport) extern const unsigned int D3D12SDKVersion = 615;
}
extern "C" {
__declspec(dllexport) extern const char* D3D12SDKPath = ".\\";
}
namespace
{
using GameInit_t = void (*)(GameInitParams*);
@@ -44,6 +59,7 @@ namespace
GameShutdown_t Shutdown = nullptr;
GameUpdate_t Update = nullptr;
} Game;
const char* GameFunctionTable[] = { "GameInit", "GameShutdown", "GameUpdate" };
} // namespace
@@ -91,15 +107,15 @@ void JulietApplication::Init()
ColorTargetDescription colorTargetDescription = {};
colorTargetDescription.Format = GetSwapChainTextureFormat(GraphicsDevice, MainWindow);
GraphicsPipelineCreateInfo pipelineCI = {};
pipelineCI.VertexShader = vertexShader;
pipelineCI.FragmentShader = fragmentShader;
pipelineCI.PrimitiveType = PrimitiveType::TriangleList;
pipelineCI.TargetInfo = { .ColorTargetDescriptions = &colorTargetDescription,
.NumColorTargets = 1,
.DepthStencilFormat = TextureFormat::D32_FLOAT,
.HasDepthStencilTarget = true };
pipelineCI.RasterizerState.FillMode = FillMode::Solid;
GraphicsPipelineCreateInfo pipelineCI = {};
pipelineCI.VertexShader = vertexShader;
pipelineCI.FragmentShader = fragmentShader;
pipelineCI.PrimitiveType = PrimitiveType::TriangleList;
pipelineCI.TargetInfo = { .ColorTargetDescriptions = &colorTargetDescription,
.NumColorTargets = 1,
.DepthStencilFormat = TextureFormat::D32_FLOAT,
.HasDepthStencilTarget = true };
pipelineCI.RasterizerState.FillMode = FillMode::Solid;
pipelineCI.DepthStencilState.EnableDepthTest = true;
pipelineCI.DepthStencilState.EnableDepthWrite = true;
pipelineCI.DepthStencilState.CompareOperation = CompareOperation::Less;
@@ -128,10 +144,10 @@ void JulietApplication::Init()
Running = false;
}
// Create Buffers
// Create Buffers - Using StructuredBuffer for bindless SRV access in shader
BufferCreateInfo bufferCI = {};
bufferCI.Size = 256;
bufferCI.Usage = BufferUsage::StructuredBuffer; // Changed to StructuredBuffer As Requested
bufferCI.Usage = BufferUsage::StructuredBuffer; // SRV for ResourceDescriptorHeap access
ConstantBuffer = CreateGraphicsBuffer(GraphicsDevice, bufferCI);
TransferBufferCreateInfo transferCI = {};
@@ -139,6 +155,27 @@ void JulietApplication::Init()
transferCI.Usage = TransferBufferUsage::Upload;
TransferBuffer = CreateGraphicsTransferBuffer(GraphicsDevice, transferCI);
// Upload Static Data for Test
if (TransferBuffer && ConstantBuffer)
{
void* data = MapGraphicsTransferBuffer(GraphicsDevice, TransferBuffer);
if (data)
{
Matrix projection = PerspectiveFov(60.0f * (3.14159f / 180.0f), 1200.0f / 800.0f, 0.1f, 1000.0f);
Matrix view = LookAt({ 30.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 1.0f });
Matrix model = Matrix::Identity();
Matrix mvp = projection * view * model;
MemCopy(data, &mvp, sizeof(Matrix));
UnmapGraphicsTransferBuffer(GraphicsDevice, TransferBuffer);
CommandList* initCmd = AcquireCommandList(GraphicsDevice);
CopyBuffer(initCmd, ConstantBuffer, TransferBuffer, 256);
TransitionBufferToReadable(initCmd, ConstantBuffer);
SubmitCommandLists(initCmd);
}
}
if (vertexShader)
{
DestroyShader(GraphicsDevice, vertexShader);
@@ -165,9 +202,6 @@ void JulietApplication::Init()
params.ScratchArena = GetScratchArena();
Game.Init(&params);
}
// Initialize DebugDisplay
DebugDisplay_Initialize(GraphicsDevice);
}
}
@@ -181,12 +215,6 @@ void JulietApplication::Shutdown()
ShutdownHotReloadCode(GameCode);
}
// Shutdown DebugDisplay before graphics device
if (GraphicsDevice)
{
DebugDisplay_Shutdown(GraphicsDevice);
}
if (GraphicsPipeline)
{
DestroyGraphicsPipeline(GraphicsDevice, GraphicsPipeline);
@@ -238,12 +266,7 @@ void JulietApplication::Update()
}
}
if (evt.Type == EventType::Key_Down)
{
}
// Shader hot reload using keyboard.
// TODO: Add Input debounce in the library. (Just pressed vs pressed)
if (!reloadShadersDebounce && ((GetKeyModState() & KeyMod::Alt) != KeyMod::None) && IsKeyDown(ScanCode::R))
{
reloadShaders = true;
@@ -256,6 +279,15 @@ void JulietApplication::Update()
}
}
#ifdef JULIET_ENABLE_IMGUI
ImGui::ShowDemoWindow();
#endif
DebugDisplay_DrawLine({ 0.0f, 0.0f, 0.0f }, { 10.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f, 1.0f }, false);
DebugDisplay_DrawLine({ 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, 0.0f }, { 0.0f, 1.0f, 0.0f, 1.0f }, true);
DebugDisplay_DrawLine({ 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 1.0f, 1.0f }, true);
DebugDisplay_DrawSphere({ 0.0f, 0.0f, 0.0f }, 5.0f, { 1.0f, 1.0f, 0.0f, 1.0f }, true);
Game.Update(0.0f);
if (ShouldReloadCode(GameCode))
@@ -265,7 +297,6 @@ void JulietApplication::Update()
if (reloadShaders)
{
// We need to wait for the gpu to be idle to recreate our graphics pipelines
WaitUntilGPUIsIdle(GraphicsDevice);
#if ALLOW_SHADER_HOT_RELOAD
@@ -293,104 +324,119 @@ void JulietApplication::Update()
#endif
}
// Draw here for now
// 1) Acquire a Command Buffer
CommandList* cmdList = AcquireCommandList(GraphicsDevice, QueueType::Graphics);
if (cmdList == nullptr)
// Memory debugger toggle
static bool toggleDebounce = false;
if (IsKeyDown(Juliet::ScanCode::Home))
{
Log(LogLevel::Error, LogCategory::Tool, "Failed to acquire command list.");
Running = false;
return;
}
Texture* swapChainTexture = nullptr;
if (!WaitAndAcquireSwapChainTexture(cmdList, MainWindow, &swapChainTexture))
{
Log(LogLevel::Error, LogCategory::Tool, "Failed to acquire swapchain texture.");
Running = false;
return;
}
if (swapChainTexture)
{
ColorTargetInfo colorTargetInfo = {};
colorTargetInfo.TargetTexture = swapChainTexture;
colorTargetInfo.ClearColor = { .R = .0f, .G = .0f, .B = .0f, .A = 1.f };
colorTargetInfo.LoadOperation = LoadOperation::Clear;
colorTargetInfo.StoreOperation = StoreOperation::Store;
if (ConstantBuffer && TransferBuffer)
if (!toggleDebounce)
{
void* ptr = MapGraphicsTransferBuffer(GraphicsDevice, TransferBuffer);
if (ptr)
{
Vertex* vertices = static_cast<Vertex*>(ptr);
ShowMemoryDebugger = !ShowMemoryDebugger;
toggleDebounce = true;
}
}
else
{
toggleDebounce = false;
}
// Triangle 1
vertices[0] = { { -0.5f, -0.5f }, { 1.0f, 0.0f, 0.0f, 1.0f } }; // Red
vertices[1] = { { 0.0f, 0.5f }, { 0.0f, 1.0f, 0.0f, 1.0f } }; // Green
vertices[2] = { { 0.5f, -0.5f }, { 0.0f, 0.0f, 1.0f, 1.0f } }; // Blue
// Auto-close logic
if (AutoCloseFrameCount > 0)
{
AutoCloseFrameCount--;
if (AutoCloseFrameCount == 0)
{
Log(LogLevel::Message, LogCategory::Tool, "Auto-closing application as requested.");
Running = false;
}
}
// Triangle 2
vertices[3] = { { -0.5f, 0.5f }, { 1.0f, 1.0f, 0.0f, 1.0f } }; // Yellow
vertices[4] = { { 0.0f, 0.8f }, { 0.0f, 1.0f, 1.0f, 1.0f } }; // Cyan
vertices[5] = { { 0.5f, 0.5f }, { 1.0f, 0.0f, 1.0f, 1.0f } }; // Magenta
if (ShowMemoryDebugger)
{
Debug::DebugDrawMemoryArena();
}
}
UnmapGraphicsTransferBuffer(GraphicsDevice, TransferBuffer);
}
void JulietApplication::OnPreRender(CommandList* cmd)
{
// Buffer uploads
if (ConstantBuffer && TransferBuffer)
{
void* ptr = MapGraphicsTransferBuffer(GraphicsDevice, TransferBuffer);
if (ptr)
{
auto vertices = static_cast<Vertex*>(ptr);
CopyBuffer(cmdList, ConstantBuffer, TransferBuffer, 256);
TransitionBufferToReadable(cmdList, ConstantBuffer);
// Triangle 1
vertices[0] = { { -0.5f, -0.5f }, { 1.0f, 0.0f, 0.0f, 1.0f } }; // Red
vertices[1] = { { 0.0f, 0.5f }, { 0.0f, 1.0f, 0.0f, 1.0f } }; // Green
vertices[2] = { { 0.5f, -0.5f }, { 0.0f, 0.0f, 1.0f, 1.0f } }; // Blue
// Triangle 2
vertices[3] = { { -0.5f, 0.5f }, { 1.0f, 1.0f, 0.0f, 1.0f } }; // Yellow
vertices[4] = { { 0.0f, 0.8f }, { 0.0f, 1.0f, 1.0f, 1.0f } }; // Cyan
vertices[5] = { { 0.5f, 0.5f }, { 1.0f, 0.0f, 1.0f, 1.0f } }; // Magenta
UnmapGraphicsTransferBuffer(GraphicsDevice, TransferBuffer);
}
// Test lines and sphere - GIANT SCALE
DebugDisplay_DrawLine({ 0.0f, 0.0f, 0.0f }, { 10.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f, 1.0f }, false); // X-Axis (Red)
DebugDisplay_DrawLine({ 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, 0.0f }, { 0.0f, 1.0f, 0.0f, 1.0f }, true); // Y-Axis (Green)
DebugDisplay_DrawLine({ 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 1.0f, 1.0f }, true); // Z-Axis (Blue) - Up
DebugDisplay_DrawSphere({ 0.0f, 0.0f, 0.0f }, 5.0f, { 1.0f, 1.0f, 0.0f, 1.0f }, true); // Yellow sphere
// Prepare debug data (outside render pass)
DebugDisplay_Prepare(cmdList);
DepthStencilTargetInfo depthTargetInfo = {};
depthTargetInfo.TargetTexture = DepthBuffer;
depthTargetInfo.ClearDepth = 1.0f;
depthTargetInfo.LoadOperation = LoadOperation::Clear;
depthTargetInfo.StoreOperation = StoreOperation::Store;
RenderPass* renderPass = BeginRenderPass(cmdList, colorTargetInfo, &depthTargetInfo);
BindGraphicsPipeline(renderPass, GraphicsPipeline);
// Pass descriptor index via Push Constants AFTER finding the pipeline (RootSignature)
uint32 descriptorIndex = GetDescriptorIndex(GraphicsDevice, ConstantBuffer);
SetPushConstants(cmdList, ShaderStage::Vertex, 0, 1, &descriptorIndex);
DrawPrimitives(renderPass, 6, 1, 0, 0);
// Debug Display - render shapes (inside render pass)
static float orbitTime = 0.0f;
orbitTime += 0.016f; // Rough approximation for 60fps
float radius = 30.0f;
Camera debugCamera = {};
debugCamera.Position = { cosf(orbitTime) * radius, sinf(orbitTime) * radius, 10.0f }; // Rotate in XY plane
debugCamera.Target = { 0.0f, 0.0f, 0.0f };
debugCamera.Up = { 0.0f, 0.0f, 1.0f }; // Z-Up
debugCamera.FOV = 1.047f; // 60 degrees
debugCamera.AspectRatio = 1200.0f / 800.0f;
debugCamera.NearPlane = 0.1f;
debugCamera.FarPlane = 1000.0f;
DebugDisplay_Flush(cmdList, renderPass, debugCamera);
EndRenderPass(renderPass);
CopyBuffer(cmd, ConstantBuffer, TransferBuffer, 256);
TransitionBufferToReadable(cmd, ConstantBuffer);
}
}
// Submit Commands
SubmitCommandLists(cmdList);
void JulietApplication::OnRender(RenderPass* pass, CommandList* cmd)
{
BindGraphicsPipeline(pass, GraphicsPipeline);
// Reset Scratch Arena at the end of the frame
ScratchArenaReset();
uint32 descriptorIndex = GetDescriptorIndex(GraphicsDevice, ConstantBuffer);
struct PushData
{
float ViewProjection[16];
uint32 BufferIndex;
} pushData = {};
pushData.BufferIndex = descriptorIndex;
SetPushConstants(cmd, ShaderStage::Vertex, 0, sizeof(pushData) / 4, &pushData);
DrawPrimitives(pass, 6, 1, 0, 0);
}
ColorTargetInfo JulietApplication::GetColorTargetInfo(Texture* swapchainTexture)
{
ColorTargetInfo info = {};
info.TargetTexture = swapchainTexture;
info.ClearColor = { .R = 0.0f, .G = 0.0f, .B = 0.0f, .A = 1.0f };
info.LoadOperation = LoadOperation::Clear;
info.StoreOperation = StoreOperation::Store;
return info;
}
DepthStencilTargetInfo* JulietApplication::GetDepthTargetInfo()
{
static DepthStencilTargetInfo info = {};
info.TargetTexture = DepthBuffer;
info.ClearDepth = 1.0f;
info.LoadOperation = LoadOperation::Clear;
info.StoreOperation = StoreOperation::Store;
return &info;
}
Camera JulietApplication::GetDebugCamera()
{
static float orbitTime = 0.0f;
orbitTime += 0.016f;
float radius = 30.0f;
Camera cam = {};
cam.Position = { cosf(orbitTime) * radius, sinf(orbitTime) * radius, 10.0f };
cam.Target = { 0.0f, 0.0f, 0.0f };
cam.Up = { 0.0f, 0.0f, 1.0f };
cam.FOV = 1.047f;
cam.AspectRatio = 1200.0f / 800.0f;
cam.NearPlane = 0.1f;
cam.FarPlane = 1000.0f;
return cam;
}
bool JulietApplication::IsRunning()
@@ -419,10 +465,28 @@ int main(int /*argc*/, char** /*argv*/)
// return EXIT_FAILURE;
// }
setvbuf(stdout, nullptr, _IONBF, 0);
if (__argc > 1)
{
for (int i = 1; i < __argc; ++i)
{
if (strcmp(__argv[i], "-autoclose") == 0 && (i + 1 < __argc))
{
int frames = atoi(__argv[i + 1]);
EditorApplication.SetAutoCloseFrameCount(frames);
}
}
}
StartApplication(EditorApplication, JulietInit_Flags::Display);
// Pause here to not close the console window immediatly on stop
system("PAUSE");
// Only pause if not in auto-close mode
if (EditorApplication.GetAutoCloseFrameCount() == -1)
{
system("PAUSE");
}
return EXIT_SUCCESS;
}

View File

@@ -22,6 +22,20 @@ class JulietApplication : public Juliet::IApplication
void Update() override;
bool IsRunning() override;
Juliet::Window* GetPlatformWindow() override { return MainWindow; }
Juliet::GraphicsDevice* GetGraphicsDevice() override { return GraphicsDevice; }
// Render Lifecycle
void OnPreRender(Juliet::CommandList* cmd) override;
void OnRender(Juliet::RenderPass* pass, Juliet::CommandList* cmd) override;
Juliet::ColorTargetInfo GetColorTargetInfo(Juliet::Texture* swapchainTexture) override;
Juliet::DepthStencilTargetInfo* GetDepthTargetInfo() override;
Juliet::Camera GetDebugCamera() override;
public:
void SetAutoCloseFrameCount(int count) { AutoCloseFrameCount = count; }
int GetAutoCloseFrameCount() const { return AutoCloseFrameCount; }
private:
Juliet::Window* MainWindow = {};
Juliet::GraphicsDevice* GraphicsDevice = {};
@@ -32,6 +46,7 @@ class JulietApplication : public Juliet::IApplication
Juliet::Texture* DepthBuffer = {};
bool Running = false;
int AutoCloseFrameCount = -1;
};
JulietApplication& GetEditorApplication();

View File

@@ -51,8 +51,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
@@ -62,7 +62,7 @@
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;..\External\imgui;..\External\imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>

View File

@@ -21,7 +21,9 @@ Settings
//------------------------------------------------------------------------------
.BinPath = 'bin'
.OutputBase = 'Intermediate'
.CommonWinLibs = ' kernel32.lib user32.lib gdi32.lib dxguid.lib Ws2_32.lib dxgi.lib'
.CommonWinLibs = ' kernel32.lib user32.lib gdi32.lib dxguid.lib Ws2_32.lib dxgi.lib imm32.lib dwmapi.lib d3dcompiler.lib shell32.lib'
.ProjectConfigs = {}
//------------------------------------------------------------------------------
@@ -29,7 +31,7 @@ Settings
//------------------------------------------------------------------------------
.Debug_Config =
[
.CompilerOptions = ' -DDEBUG -DPROFILING_ENABLED'
.CompilerOptions = ' -DDEBUG -DPROFILING_ENABLED -DJULIET_ENABLE_IMGUI'
.CompilerOptionsC = .CompilerOptions
.BuildConfigName = 'Debug'
]
@@ -174,11 +176,13 @@ Settings
.Targets_x64Clang_Release = {}
// Include all projects to build
#include "External/Imgui.bff"
#include "Juliet/Juliet.bff"
#include "Game/Game.bff"
#include "JulietApp/JulietApp.Bff"
#include "JulietShaderCompiler/JulietShaderCompiler.Bff"
// Aliases : All-$Platform$-$Config$
//------------------------------------------------------------------------------
ForEach( .BuildConfig in .BuildConfigs )
@@ -253,7 +257,8 @@ ForEach( .Config in .Configs )
VSSolution( 'GenerateSolution' )
{
.SolutionOutput = 'Juliet.sln'
.SolutionProjects = { 'Juliet', 'Game', 'JulietApp' }
.SolutionProjects = { 'Juliet', 'Game', 'JulietApp', 'ImGui' }
.SolutionConfigs = .ProjectConfigs
.SolutionBuildProject = 'JulietApp'
}

3
log_direct.txt Normal file
View File

@@ -0,0 +1,3 @@
2> Exe: W:\Classified\Juliet\bin\x64Clang-Debug\JulietApp.exe
FBuild: OK: clang-Debug
Time: 0.213s

3
misc/agent_build.bat Normal file
View File

@@ -0,0 +1,3 @@
@echo off
call misc\shell.bat
fbuild %* -cache

View File

@@ -55,14 +55,8 @@ echo Config: %CONFIG%
:: --- 4. Execution ---
if exist "%APP_DIR%\%APP_EXE%" (
pushd "%APP_DIR%"
start "" "%APP_EXE%"
"%APP_EXE%" %*
popd
if "%AUTOCLOSE%"=="1" (
echo [AUTOCLOSE] Waiting 5 seconds...
timeout /t 5 /nobreak >nul
taskkill /IM "%APP_EXE%" /F >nul 2>&1
)
) else (
echo [ERROR] Executable not found at: %APP_DIR%\%APP_EXE%
echo Please build first: fbuild JulietApp-%PLATFORM%-%CONFIG%