static VkImage *images;
static VkImageView *iviews;
static uint32_t num_images;
-//renderpass
-static VkRenderPass rpass;
static VkFramebuffer fbs[2];
//semaphores-drawing-presentation
static uint32_t curr_img; // current sc image
rinf.subpassCount = 1;
rinf.pSubpasses = &sd;
- if(vkCreateRenderPass(vk_device, &rinf, 0, &rpass) != VK_SUCCESS) {
- fprintf(stderr, "Failed to create rpass.\n");
+ if(vkCreateRenderPass(vk_device, &rinf, 0, &vk_renderpass) != VK_SUCCESS) {
+ fprintf(stderr, "Failed to create render pass.\n");
return false;
}
VkFramebufferCreateInfo fbinf;
memset(&fbinf, 0, sizeof fbinf);
fbinf.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
- fbinf.renderPass = rpass;
+ fbinf.renderPass = vk_renderpass;
fbinf.attachmentCount = 2;
fbinf.pAttachments = fb_att;
fbinf.width = win_w;
VkRenderPassBeginInfo rbinf;
memset(&rbinf, 0, sizeof rbinf);
rbinf.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
- rbinf.renderPass = rpass;
+ rbinf.renderPass = vk_renderpass;
rbinf.framebuffer = fbs[i];
rbinf.renderArea.extent.width = win_w;
rbinf.renderArea.extent.height = win_h;