summaryrefslogtreecommitdiff
path: root/c2.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 /c2.cpp
parent39fc0b5af67aa2dc0763394b0727e919840f9f57 (diff)
resource names
Diffstat (limited to 'c2.cpp')
-rw-r--r--c2.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/c2.cpp b/c2.cpp
index 936638d..e88f12d 100644
--- a/c2.cpp
+++ b/c2.cpp
@@ -29,11 +29,13 @@ struct C2 : public App {
static Buffer_Id upload_verts(Device* dev) {
Buffer_Id stage = dev->create_buffer(
+ "temp",
sizeof verts,
Buffer_Flags::copy_src |
Buffer_Flags::cpu_readwrite
);
Buffer_Id vbo = dev->create_buffer(
+ "autism triangle vbo",
sizeof verts,
Buffer_Flags::vertex_buffer |
Buffer_Flags::copy_dst
@@ -59,7 +61,7 @@ static Sampler_Id create_clamped_linear(Device* dev) {
s.mag = Filter_Mode::linear;
s.address_u = Address_Mode::repeat;
s.address_v = Address_Mode::repeat;
- return dev->create_sampler(s);
+ return dev->create_sampler("repeated linear", s);
}
struct Config_Buffer {
@@ -80,7 +82,7 @@ extern "C" int entrypoint() {
Texture* texture;
Texture* texture2;
Model* monkey;
- Buffer_Id vbo, cbuf, cbuf2;
+ Buffer_Id vbo, cbuf;
Sampler_Id clamped_linear;
UI* ui;
C2* app = App::create<C2>("c2");
@@ -113,15 +115,11 @@ extern "C" int entrypoint() {
texture = (Texture*)assets.load("22.tex");
texture2 = (Texture*)assets.load("kita.tex");
cbuf = dev->create_buffer(
+ "config buffer",
sizeof(Config_Buffer),
Buffer_Flags::constant_buffer |
Buffer_Flags::cpu_readwrite
);
- cbuf2 = dev->create_buffer(
- sizeof(Config_Buffer2),
- Buffer_Flags::constant_buffer |
- Buffer_Flags::cpu_readwrite
- );
per_frame = heap_alloc(
dev->heap,
per_frame_memory_size
@@ -251,7 +249,6 @@ extern "C" int entrypoint() {
dev->destroy_sampler(clamped_linear);
dev->destroy_buffer(vbo);
dev->destroy_buffer(cbuf);
- dev->destroy_buffer(cbuf2);
dev->destroy();
app->destroy();
return 0;