This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void vk_draw() { | |
| VkCommandBuffer cmd = vk_get_current_cmd(); | |
| vk.CmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, vk.pipeline_layout, 0, 1, &vk.descriptor_sets, 0, null); | |
| VkDeviceSize size = 0; | |
| vk.CmdBindVertexBuffers(cmd, 0, 1, &vk.vert_buffer.handle, &size); | |
| vk.CmdBindIndexBuffer(cmd, vk.index_buffer.handle, 0, VK_INDEX_TYPE_UINT32); | |
| DrawCallInfo* drawinfo = (DrawCallInfo*)vk.indirect_draw_buffer.mapped_memory; | |
| u32 draw_call_count = 0; | |
| u32 draw_call_offset = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define JSON_OBJ(r, o) for (JsonValue k, v; json_iter_object(&r, o, &k, &v);) | |
| #define JSON_OBJ_(r, o) for (JsonValue key, val; json_iter_object(&r, o, &key, &val);) | |
| #define JSON_ARR(r, val) for (JsonValue obj; json_iter_array(&r, val, &obj);) | |
| Mesh mesh_load_glb(String name) { | |
| Scratch scratch; | |
| Buffer buff = os_file_read_all(scratch, name); | |
| struct FileHeader { | |
| u32 magic; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct PoolFreeNode { | |
| PoolFreeNode* next; | |
| }; | |
| struct MemPoolPow2 { | |
| PoolFreeNode* head; | |
| }; | |
| struct Allocator{ |