diff options
author | grm <grm@eyesin.space> | 2024-12-16 14:02:21 +0200 |
---|---|---|
committer | grm <grm@eyesin.space> | 2024-12-16 14:02:21 +0200 |
commit | bbcc41762f335e90dc850dd9d4a6cc5e51631c7c (patch) | |
tree | b3d983283fcc1340268a1d812f0e57e2552afefb /src | |
parent | f58834cfa1186373781761cd74e044fc9359c051 (diff) | |
download | cgame-bbcc41762f335e90dc850dd9d4a6cc5e51631c7c.tar.gz cgame-bbcc41762f335e90dc850dd9d4a6cc5e51631c7c.tar.bz2 cgame-bbcc41762f335e90dc850dd9d4a6cc5e51631c7c.zip |
upkeep
Diffstat (limited to 'src')
-rw-r--r-- | src/cplusplus.cpp | 1 | ||||
-rw-r--r-- | src/render.c | 4 | ||||
-rw-r--r-- | src/vkutil.h | 59 |
3 files changed, 3 insertions, 61 deletions
diff --git a/src/cplusplus.cpp b/src/cplusplus.cpp index 68cb8c3..b8dd787 100644 --- a/src/cplusplus.cpp +++ b/src/cplusplus.cpp @@ -56,6 +56,7 @@ imgui_proc_event(SDL_Event* e) } static VkDescriptorPool imguiPool; + void init_imgui(vks_context *vk) { diff --git a/src/render.c b/src/render.c index 0f1b12d..1ff2e13 100644 --- a/src/render.c +++ b/src/render.c @@ -1477,8 +1477,8 @@ init_vulkan() init_imgui(&s.vk); - load_model_obj(); - //load_model_gltf(); + //load_model_obj(); + load_model_gltf(); vulkan_create_vertex_buffer(); vulkan_create_index_buffer(); diff --git a/src/vkutil.h b/src/vkutil.h deleted file mode 100644 index 7252ba8..0000000 --- a/src/vkutil.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef _VKUTIL_H -#define _VKUTIL_H - -/** - * DEPRECATED - * vkutil.h -- helper functions and macros for working with vulkan in C - */ - -#include <stdio.h> -#include <stdarg.h> - -#include <vulkan/vulkan.h> -#include <vulkan/vk_enum_string_helper.h> // for string_VkResult - -#define VK_ARRAY_LEN(arr) sizeof((arr))/sizeof((arr)[0]) - -#define VK_CHECK(x) \ -do { \ - VkResult err = x; \ - if (err) { \ - fprintf(stderr, "%s:%d:0: vulkan error: %s \n", \ - __FILE__, __LINE__, string_VkResult(err)); \ - abort(); \ - } \ -} while (0) - -typedef enum { - VK_INFO = 0, - VK_WARN, - VK_ERROR, -} log_type; - -static inline void -vk_log(log_type t, const char * f, ...) -{ -#ifdef VKDEBUG - va_list args; - va_start(args, f); - switch (t) { - case VK_INFO: - printf("INFO: "); - vprintf(f, args); - break; - case VK_WARN: - fprintf(stderr, "WARN: "); - vfprintf(stderr, f, args); - break; - case VK_ERROR: - fprintf(stderr, "ERROR: "); - vfprintf(stderr, f, args); - break; - } - va_end(args); -#else - return; -#endif -} - -#endif /* _VKUTIL_H */ |