From a5b8e411e3f830048267ef783d348336a27424d5 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sun, 13 Apr 2025 15:17:08 -0400 Subject: [PATCH] I can now apply shaders to any GUI element, but I need a shader manager that will allow for hot reloading and tracking input/output variables. --- Makefile | 2 +- combat_ui.cpp | 5 +-- constants.hpp | 4 +-- guecs.cpp | 60 ++++++++++++++++++++++++++++++------ guecs.hpp | 30 ++++++++++++++++++ raycaster.cpp | 2 +- shaders/ui_shader.frag | 22 +++++++++++++ shaders/ui_shape_shader.frag | 12 ++++++++ 8 files changed, 121 insertions(+), 16 deletions(-) create mode 100644 shaders/ui_shader.frag create mode 100644 shaders/ui_shape_shader.frag diff --git a/Makefile b/Makefile index cc2ac86..562ac6d 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ tracy_build: meson compile -j 10 -C builddir test: build - ./builddir/runtests "[combat-battle]" + ./builddir/runtests run: build test powershell "cp ./builddir/zedcaster.exe ." diff --git a/combat_ui.cpp b/combat_ui.cpp index aa5b455..0be735e 100644 --- a/combat_ui.cpp +++ b/combat_ui.cpp @@ -15,9 +15,10 @@ namespace gui { void CombatUI::make_button(std::string name, std::wstring label, Events::GUI event) { auto button = $gui.entity(name); - // $gui.set(button, {"leather_pouch-128"}); - $gui.set(button, {}); + $gui.set(button, {"leather_pouch-128"}); + // $gui.set(button, {}); $gui.set