diff options
author | kartofen <mladenovnasko0@gmail.com> | 2023-10-29 13:06:40 +0200 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2023-10-29 13:06:40 +0200 |
commit | 4512fafc57d2ad95b83c8476781ce105a2cdc4e5 (patch) | |
tree | a37817c9bfa2f183f02439a31dcb38f78a7a0ccc /src/main.c | |
parent | ff5bf11c5f319f9c90de7a59eb4f8f338a74a38f (diff) |
index buffer and staging
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -11,9 +11,14 @@ 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}} + {{-0.5f, -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}}, + {{-0.5f, 0.5f}, {1.0f, 1.0f, 1.0f}} +}; + +u32 indices[] = { + 0, 1, 2, 2, 3, 0 }; int main(void) @@ -56,6 +61,8 @@ int main(void) grph_info.vertices = vertices; grph_info.nvertices = ARR_SIZE(vertices); + grph_info.indices = indices; + grph_info.nindices = ARR_SIZE(indices); grph_info.surface_func = _create_surface; |