diff --git a/Makefile b/Makefile index 198bf9b..6c33c2f 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ OBJDIR = $(BUILDDIR)/obj COBJDIR = $(OBJDIR)/c CXXOBJDIR = $(OBJDIR)/cxx SHADER_OUTDIR = $(BUILDDIR)/shaders +ASSETS_DIR = assets ifeq ($(WND_BKND), SDL) CFLAGS += -DUSE_SDL_WINDOW_BACKEND @@ -47,7 +48,7 @@ OUT_NAME = main OUT = $(BUILDDIR)/$(OUT_NAME) SHADER_OUT = $(SHADER_OUTDIR)/shader.spv -build: $(OUT) $(SHADER_OUT) +build: $(OUT) $(SHADER_OUT) copy-assets $(OUT): $(OBJS) $(CXX) $(LDFLAGS) -o "$@" $^ $(LDLIBS) @@ -68,6 +69,9 @@ $(SHADER_OUT): $(SHADER_SRC) @mkdir -p $(SHADER_OUTDIR) $(SLANGC) $(SHADER_SRC) $(SLANGC_FLAGS) -o $(SHADER_OUT) +copy-assets: + @cp -r $(ASSETS_DIR) $(BUILDDIR) + run: @cd $(BUILDDIR) && ./$(OUT_NAME) diff --git a/assets/collections.png b/assets/collections.png new file mode 100644 index 0000000..6fe2e37 Binary files /dev/null and b/assets/collections.png differ diff --git a/src/main.c b/src/main.c index 857679b..6e5d31b 100644 --- a/src/main.c +++ b/src/main.c @@ -162,7 +162,7 @@ i32 main(void) { GpuLoadImageFromFileRequest load_img_req = { .command_pool = pool, - .filename = wpStr8LitRo("/home/abdelrahman/Pictures/800px-Trumpets02262006.jpg"), + .filename = wpStr8LitRo("assets/collections.png"), }; GpuImage *texture = gpuLoadImageFromFile(&arena, &temp_arena, load_img_req);