UI rewrite 3rd attempt

This commit is contained in:
Jorijn van der Graaf 2026-05-02 21:08:20 +02:00
commit 1f5697326c
48 changed files with 2155 additions and 6190 deletions

View file

@ -63,12 +63,14 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
if (opts.Has("--timing")) cfg.defines.push_back({"CRAFTER_TIMING", ""});
std::array<fs::path, 30> ifaces = {
std::array<fs::path, 23> ifaces = {
"interfaces/Crafter.Graphics",
"interfaces/Crafter.Graphics-Animation",
"interfaces/Crafter.Graphics-ComputeShader",
"interfaces/Crafter.Graphics-DescriptorHeapVulkan",
"interfaces/Crafter.Graphics-Device",
"interfaces/Crafter.Graphics-Font",
"interfaces/Crafter.Graphics-FontAtlas",
"interfaces/Crafter.Graphics-ForwardDeclarations",
"interfaces/Crafter.Graphics-ImageVulkan",
"interfaces/Crafter.Graphics-Mesh",
@ -81,33 +83,29 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
"interfaces/Crafter.Graphics-ShaderVulkan",
"interfaces/Crafter.Graphics-Types",
"interfaces/Crafter.Graphics-UI",
"interfaces/Crafter.Graphics-UIAtlas",
"interfaces/Crafter.Graphics-UIDrawList",
"interfaces/Crafter.Graphics-UIHit",
"interfaces/Crafter.Graphics-UILayout",
"interfaces/Crafter.Graphics-UILength",
"interfaces/Crafter.Graphics-UIRenderer",
"interfaces/Crafter.Graphics-UIScene",
"interfaces/Crafter.Graphics-UITheme",
"interfaces/Crafter.Graphics-UIWidget",
"interfaces/Crafter.Graphics-UIWidgets",
"interfaces/Crafter.Graphics-UIComponents",
"interfaces/Crafter.Graphics-VulkanBuffer",
"interfaces/Crafter.Graphics-VulkanTransition",
"interfaces/Crafter.Graphics-Window",
};
std::array<fs::path, 8> impls = {
std::array<fs::path, 9> impls = {
"implementations/Crafter.Graphics-ComputeShader",
"implementations/Crafter.Graphics-Device",
"implementations/Crafter.Graphics-Font",
"implementations/Crafter.Graphics-FontAtlas",
"implementations/Crafter.Graphics-Mesh",
"implementations/Crafter.Graphics-RenderingElement3D",
"implementations/Crafter.Graphics-UIAtlas",
"implementations/Crafter.Graphics-UIRenderer",
"implementations/Crafter.Graphics-UIScene",
"implementations/Crafter.Graphics-UI",
"implementations/Crafter.Graphics-UIComponents",
"implementations/Crafter.Graphics-Window",
};
cfg.GetInterfacesAndImplementations(ifaces, impls);
cfg.shaders.emplace_back(fs::path("shaders/ui.comp.glsl"), std::string("main"), ShaderType::Compute);
cfg.shaders.emplace_back(fs::path("shaders/ui-quads.comp.glsl"), std::string("main"), ShaderType::Compute);
cfg.shaders.emplace_back(fs::path("shaders/ui-circles.comp.glsl"), std::string("main"), ShaderType::Compute);
cfg.shaders.emplace_back(fs::path("shaders/ui-images.comp.glsl"), std::string("main"), ShaderType::Compute);
cfg.shaders.emplace_back(fs::path("shaders/ui-text.comp.glsl"), std::string("main"), ShaderType::Compute);
cfg.buildFiles.emplace_back(fs::path("shaders/ui-shared.glsl"));
return cfg;
}