summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2023-10-29 13:06:40 +0200
committerkartofen <mladenovnasko0@gmail.com>2023-10-29 13:06:40 +0200
commit4512fafc57d2ad95b83c8476781ce105a2cdc4e5 (patch)
treea37817c9bfa2f183f02439a31dcb38f78a7a0ccc /src/main.c
parentff5bf11c5f319f9c90de7a59eb4f8f338a74a38f (diff)
index buffer and staging
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index cc6c3d5..4b5685d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;