summaryrefslogtreecommitdiff
path: root/ui.cpp
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-12-29 23:28:00 +1100
committerquou <quou@disroot.org>2024-12-29 23:28:00 +1100
commite25b20717523e579bb6f1e0d17b635c71bad6fab (patch)
treedd7839c247b81554d0ea2f5207df0f52f0484637 /ui.cpp
parent39fc0b5af67aa2dc0763394b0727e919840f9f57 (diff)
resource names
Diffstat (limited to 'ui.cpp')
-rw-r--r--ui.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui.cpp b/ui.cpp
index f6caedd..bd7a90d 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -78,6 +78,7 @@ static Texture_Id create_atlas(Device* d, Arena* a) {
int x, y;
int size = 10 * font_w;
Buffer_Id buf = d->create_buffer(
+ "font atlas stage",
size,
Buffer_Flags::copy_src |
Buffer_Flags::cpu_readwrite
@@ -94,6 +95,7 @@ static Texture_Id create_atlas(Device* d, Arena* a) {
}
d->unmap_buffer(buf);
tex = d->create_texture(
+ "font atlas",
texture_format_r8i,
Texture_Flags::sampleable | Texture_Flags::copy_dst,
font_w,
@@ -111,7 +113,7 @@ static Sampler_Id create_clamped_point(Device* dev) {
s.mag = Filter_Mode::point;
s.address_u = Address_Mode::clamp;
s.address_v = Address_Mode::clamp;
- return dev->create_sampler(s);
+ return dev->create_sampler("clamped point", s);
}
UI* UI::create(Device* dev, Arena* a, Shader_Id sh) {
@@ -140,11 +142,13 @@ void UI::init(Device* dev, Arena* a, Texture_Id at, Shader_Id sh) {
atlas = at;
shader = sh;
mesh = device->create_buffer(
+ "UI Mesh",
mesh_size,
Buffer_Flags::vertex_buffer |
Buffer_Flags::cpu_readwrite
);
config_buf = device->create_buffer(
+ "UI Cbuffer",
sizeof(UI_CBuffer),
Buffer_Flags::constant_buffer |
Buffer_Flags::cpu_readwrite