work on basic VR

This commit is contained in:
2026-05-30 20:43:02 +03:00
parent 4811ad0820
commit 3b128315e7
18 changed files with 716 additions and 29 deletions

View File

@@ -10,22 +10,13 @@ DECLARE_VULKAN_COMMAND(ClearColor)
CVkImage *pImg;
if (pImage)
pImg = (CVkImage*)pImage;
if (ppSwapchainImages)
pImg = (CVkImage*)ppSwapchainImages[iCurrentFrame];
if (pImg == NULL)
Plat_FatalErrorFunc("pImage and *ppSwapchainImages are NULL\n");
VkClearColorValue color = {.float32 = {r,g,b,a}};
VkImageSubresourceRange range = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.levelCount = 1,
.layerCount = 1,
};
vkCmdClearColorImage(hCommandBuffer, pImg->m_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &color, 1, &range);
vkCmdClearColorImage(hCommandBuffer, ((CVkImage*)VulkanGetObject(stImage, iCurrentFrame))->m_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &color, 1, &range);
}
DECLARE_VULKAN_COMMAND(Begin)