Use indexed drawing
This commit is contained in:
1 parent
6d8fdb2f8c
commit
c770895217
3 files changed
+102
-38
No files matched your search
@@ -31,9 +31,11 @@ typedef struct {
|
||||
VkFence in_flight;
|
||||
VkSemaphore render_fin;
|
||||
VkSemaphore img_avail;
|
||||
size_t vertex_data_size;
|
||||
VkBuffer vertex_buf;
|
||||
VkDeviceMemory vertex_buf_mem;
|
||||
VkBuffer index_buf;
|
||||
VkDeviceMemory index_buf_mem;
|
||||
size_t index_count;
|
||||
} gpu_ctx_t;
|
||||
|
||||
typedef struct {
|
||||
@@ -41,6 +43,8 @@ typedef struct {
|
||||
GLFWwindow *window;
|
||||
const vertex_t *vertex_data;
|
||||
size_t vertex_data_size;
|
||||
const uint16_t *index_data;
|
||||
size_t index_data_size;
|
||||
} gpu_config_t;
|
||||
|
||||
void gpu_init(gpu_ctx_t *ctx, const gpu_config_t *config);
|
||||
|
||||
Reference in new issue
Block a user