diff options
Diffstat (limited to 'ui.cpp')
-rw-r--r-- | ui.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |