summaryrefslogtreecommitdiff
path: root/src/graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics.h')
-rw-r--r--src/graphics.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/graphics.h b/src/graphics.h
index 52e511e..470ea9b 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -3,6 +3,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include <cglm/cglm.h>
#include <vulkan/vulkan.h>
#include "common.h"
@@ -13,6 +14,16 @@
typedef uint32_t u32;
+typedef struct vertex {
+ vec2 pos;
+ vec3 color;
+} vertex_t;
+
+typedef struct buffer {
+ VkBuffer buffer;
+ VkDeviceMemory memory;
+} buffer_t;
+
typedef struct graphics {
VkInstance instance;
VkDebugUtilsMessengerEXT debug_messenger;
@@ -54,6 +65,9 @@ typedef struct graphics {
VkFence fence_inflight;
} sync;
+ buffer_t vertex_buffer;
+ buffer_t staging_buffer;
+
} * graphics_t;
struct graphics_info {
@@ -63,6 +77,9 @@ struct graphics_info {
const char* const* extensions;
u32 ext_count;
+ vertex_t *vertices;
+ size_t nvertices;
+
int (*surface_func)(VkInstance instance, VkSurfaceKHR *surface);
};