Skip to content

Fix Windows Debug builds - #225

Merged
CanReader merged 4 commits into
stagingfrom
fix/windows-debug-build
Nov 1, 2026
Merged

CanReader merged 4 commits into
stagingfrom
fix/windows-debug-build

Conversation

@CanReader

@CanReader CanReader commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

What this changes

Fixes so Debug builds compile and start on Windows with MSVC.

  • Vector<T, N>::operator[] is now constexpr. Vector2D::GetX() and GetY() are constexpr and call it, so MSVC rejected them with C3615 in every file that includes Math/Vector.hpp. GCC and Clang accept it because they only complain when the function is actually used in a constant expression.

  • DirectX11Renderer::Initialize() retries without D3D11_CREATE_DEVICE_DEBUG when device creation returns DXGI_ERROR_SDK_COMPONENT_MISSING. The debug layer comes from the Graphics Tools optional Windows feature, and without it a Debug build logged "Unable to initialize graphics!" and exited. It also logs the HRESULT now when creation fails.

  • The downstream game job now replaces SleakCraft's Engine with a symlink to this checkout. SleakCraft#90 made Engine a submodule, so the job built against an empty folder and fails on every engine PR since.

Why

The Windows Debug build didn't compile, and once it did, -r d3d11 (the default on Windows) couldn't start on a machine without Graphics Tools. DX12 already copes with a missing debug layer.

This also covers the Windows part #224 left open: DX11 and DX12 reload and the Windows file watcher now work on Windows.

How it was verified

  • Builds on Windows (MSVC 2022, Debug)
  • Started on DX11, DX12, Vulkan and OpenGL on Windows without Graphics Tools installed
  • Shader hot reload on Windows: edited flat_shader.hlsl while a world was running on DX11 and on DX12, and it reloaded both times
  • Builds on Linux. Not rebuilt there; the Vector change is one keyword and the DX11 change only compiles on Windows.

Tested locally on top of Shader-HotReload, not on top of the current staging.

Goes with CanReader/SleakCraft fix/windows-debug-build, same branch name so its CI builds against this one.

@CanReader
CanReader merged commit f922aaf into staging Nov 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant