|  |  |  | @ -122,8 +122,20 @@ VkResult main_thread(ClientContext* context) { | 
		
	
		
			
				|  |  |  |  |         4*sizeof(uint32_t), | 
		
	
		
			
				|  |  |  |  |         &context->render)); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   HexRegion region; | 
		
	
		
			
				|  |  |  |  |   VK_RESULT(create_hex_region(0, 0, ®ion, &context->render)); | 
		
	
		
			
				|  |  |  |  |   HexRegion* region; | 
		
	
		
			
				|  |  |  |  |   VK_RESULT(create_hex_region(0, 0, ®ion, &context->hex, &context->render)); | 
		
	
		
			
				|  |  |  |  |   GPUHex* temp_hexes = malloc(sizeof(GPUHex)*REGION_HEX_COUNT); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   uint32_t colors[] = {0xFF0000FF, 0x00FF00FF, 0x0000FFFF}; | 
		
	
		
			
				|  |  |  |  |   for(uint32_t i = 0; i < REGION_HEX_COUNT; i++) { | 
		
	
		
			
				|  |  |  |  |     for(uint32_t h = 0; h < 6; h++) { | 
		
	
		
			
				|  |  |  |  |       temp_hexes[i].color[h] = colors[i%3]; | 
		
	
		
			
				|  |  |  |  |       temp_hexes[i].height[h] = 0; | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  |   VK_RESULT(add_transfer(temp_hexes, region->region, offsetof(GPUHexRegion, hexes), sizeof(GPUHex)*REGION_HEX_COUNT, 0, &context->render)); | 
		
	
		
			
				|  |  |  |  |   free(temp_hexes); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   context->position[0] = 0; | 
		
	
		
			
				|  |  |  |  |   context->position[1] = 0; | 
		
	
		
			
				|  |  |  |  |   context->position[2] = 0; | 
		
	
	
		
			
				
					|  |  |  | @ -192,8 +204,7 @@ VkResult main_thread(ClientContext* context) { | 
		
	
		
			
				|  |  |  |  |       camera[1] = context->position[1] + context->distance*sin(context->rotation[1]); | 
		
	
		
			
				|  |  |  |  |       camera[2] = context->position[2] + context->distance*cos(context->rotation[1])*sin(context->rotation[0]); | 
		
	
		
			
				|  |  |  |  |       glm_lookat(camera, context->position, up, context->hex.data.view); | 
		
	
		
			
				|  |  |  |  |       add_transfer(&context->hex.data, context->hex.context, 0, sizeof(GPUHexContext), 0, &context->render); | 
		
	
		
			
				|  |  |  |  |       add_transfer(&context->hex.data, context->hex.context, 0, sizeof(GPUHexContext), 1, &context->render); | 
		
	
		
			
				|  |  |  |  |       add_transfer(&context->hex.data, context->hex.context, 0, 2*sizeof(mat4), 0, &context->render); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     if(context->clicked_container != 0) { | 
		
	
	
		
			
				
					|  |  |  | 
 |