6 static VkSemaphore sem_getimg;
12 if(vk_init(VKINIT_DEPTH, &flags) == -1) {
16 sem_getimg = vk_create_sem();
17 sem_draw = vk_create_sem();
21 void app_cleanup(void)
23 vk_free_sem(sem_getimg);
24 vk_free_sem(sem_draw);
29 void app_display(void)
32 VkCommandBuffer cmdbuf;
34 /* get the next image from the swap chain */
35 imgid = vk_next_image(sem_getimg);
36 cmdbuf = vk_get_cmdbuf(imgid);
40 /* submit the command buffer, wait for one semaphore, signal another */
41 vk_submit(cmdbuf, sem_getimg, sem_draw);
43 /* swap buffers after drawing is finished */
47 void app_reshape(int x, int y)
49 if(vk_reshape(x, y) == -1) {
54 void app_keyboard(int key, int press)
65 void app_mouse(int bn, int press, int x, int y)
69 void app_motion(int x, int y)