diff options
author | kartofen <mladenovnasko0@gmail.com> | 2023-10-22 21:18:13 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2023-10-22 21:18:13 +0300 |
commit | e9bd321c8bd6bdb6aa7305c6da8b33e8cac462f7 (patch) | |
tree | 14d1e8993b68520dcfedfd6939b84c1af1330376 /src/main.c | |
parent | 7e555eeadd1f295db7700b8bde884fcb92bb2b8d (diff) |
renamed device.c/.h to graphics
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 27 |
1 files changed, 12 insertions, 15 deletions
@@ -1,15 +1,12 @@ #include <stdio.h> #include <stdlib.h> -#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; |