summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c27
1 files changed, 12 insertions, 15 deletions
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 <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;