diff options
author | kartofen <mladenovnasko0@gmail.com> | 2023-10-28 00:16:54 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2023-10-28 00:16:54 +0300 |
commit | ff5bf11c5f319f9c90de7a59eb4f8f338a74a38f (patch) | |
tree | e58ef28897986cb32f85d741ab4cc2efdf9622e4 /src/main.c | |
parent | e9bd321c8bd6bdb6aa7305c6da8b33e8cac462f7 (diff) |
added vertex buffers
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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) { |