From e9bd321c8bd6bdb6aa7305c6da8b33e8cac462f7 Mon Sep 17 00:00:00 2001 From: kartofen Date: Sun, 22 Oct 2023 21:18:13 +0300 Subject: renamed device.c/.h to graphics --- src/main.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 8fd7345..0f35679 100644 --- a/src/main.c +++ b/src/main.c @@ -1,15 +1,12 @@ #include #include -#include "device.h" +#include "graphics.h" #include "window.h" #include "common.h" -// TODO: rename device.c/.h -// to graphics.c/.h - window_t window; -device_t device; +graphics_t graphics; int _create_surface(VkInstance instance, VkSurfaceKHR *surface); @@ -44,18 +41,18 @@ int main(void) window_extension_info(window, &ext_count, (const char **)extensions); // populate the device info - struct device_info dev_info = {0}; - dev_info.name = "Test App"; - dev_info.version = MAKE_VERSION(1, 0, 0); + struct graphics_info grph_info = {0}; + grph_info.name = "Test App"; + grph_info.version = MAKE_VERSION(1, 0, 0); - dev_info.ext_count = ext_count; - dev_info.extensions = (const char * const *)extensions; + grph_info.ext_count = ext_count; + grph_info.extensions = (const char * const *)extensions; - dev_info.surface_func = _create_surface; + grph_info.surface_func = _create_surface; // create the device - device = device_create(&dev_info); - if(!device) { + graphics = graphics_create(&grph_info); + if(!graphics) { err("device_create: failed"); if(extensions) free(extensions); goto f3; @@ -72,12 +69,12 @@ int main(void) break; } - device_draw_frame(device); + graphics_draw_frame(graphics); } ret = 0; - device_destroy(device); + graphics_destroy(graphics); f3: window_destroy(window); f2: SDL_Quit(); f1: return ret; -- cgit v1.2.3