From ff5bf11c5f319f9c90de7a59eb4f8f338a74a38f Mon Sep 17 00:00:00 2001 From: kartofen Date: Sat, 28 Oct 2023 00:16:54 +0300 Subject: added vertex buffers --- src/main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main.c') 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) { -- cgit v1.2.3