summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2023-10-28 00:16:54 +0300
committerkartofen <mladenovnasko0@gmail.com>2023-10-28 00:16:54 +0300
commitff5bf11c5f319f9c90de7a59eb4f8f338a74a38f (patch)
treee58ef28897986cb32f85d741ab4cc2efdf9622e4 /src/main.c
parente9bd321c8bd6bdb6aa7305c6da8b33e8cac462f7 (diff)
added vertex buffers
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 0f35679..cc6c3d5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -10,6 +10,12 @@ graphics_t graphics;
int _create_surface(VkInstance instance, VkSurfaceKHR *surface);
+vertex_t vertices[] = {
+ {{0.0f, -0.5f}, {1.0f, 0.0f, 0.0f}},
+ {{0.5f, 0.5f}, {0.0f, 1.0f, 0.0f}},
+ {{-0.5f, 0.5f}, {0.0f, 0.0f, 1.0f}}
+};
+
int main(void)
{
int ret = 1;
@@ -47,9 +53,12 @@ int main(void)
grph_info.ext_count = ext_count;
grph_info.extensions = (const char * const *)extensions;
+
+ grph_info.vertices = vertices;
+ grph_info.nvertices = ARR_SIZE(vertices);
grph_info.surface_func = _create_surface;
-
+
// create the device
graphics = graphics_create(&grph_info);
if(!graphics) {