work on basic VR
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user