|
|
|
@ -492,7 +492,7 @@ VkResult create_hex_context(
|
|
|
|
|
return VK_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
VkResult create_hex_region(int32_t q, int32_t r, HexRegion** region, HexContext* hex, RenderContext* gpu) {
|
|
|
|
|
VkResult set_hex_region(int32_t q, int32_t r, int32_t y, uint32_t map, HexRegion** region, HexContext* hex, RenderContext* gpu) {
|
|
|
|
|
VkResult result;
|
|
|
|
|
|
|
|
|
|
uint32_t i = 0;
|
|
|
|
@ -509,13 +509,15 @@ VkResult create_hex_region(int32_t q, int32_t r, HexRegion** region, HexContext*
|
|
|
|
|
|
|
|
|
|
(*region)->data.q = q;
|
|
|
|
|
(*region)->data.r = r;
|
|
|
|
|
(*region)->data.y = y;
|
|
|
|
|
(*region)->data.map = map;
|
|
|
|
|
VK_RESULT(create_storage_buffer(
|
|
|
|
|
gpu->allocator,
|
|
|
|
|
0,
|
|
|
|
|
sizeof(GPUHexRegion),
|
|
|
|
|
&(*region)->region,
|
|
|
|
|
&(*region)->region_memory));
|
|
|
|
|
VK_RESULT(add_transfer(&(*region)->data.q, (*region)->region, offsetof(GPUHexRegion, q), sizeof(uint32_t)*2, gpu->current_frame, gpu));
|
|
|
|
|
VK_RESULT(add_transfer(&(*region)->data.q, (*region)->region, offsetof(GPUHexRegion, q), sizeof(int32_t)*3 + sizeof(uint32_t), gpu->current_frame, gpu));
|
|
|
|
|
|
|
|
|
|
(*region)->address = buffer_address(gpu->device, (*region)->region);
|
|
|
|
|
|
|
|
|
|