Files
funnygame/materialsystem/vulkan/commands/draw.cpp
2025-12-14 15:54:21 +02:00

23 lines
531 B
C++

#include "../vulkan_state.h"
BEGIN_DECLARE_VULKAN_COMMAND(ClearColor)
float r;
float g;
float b;
float a;
IImage *pImage;
END_DECLARE_VULKAN_COMMAND(ClearColor)
DECLARE_VULKAN_COMMAND(ClearColor)
{
CVkImage *pImage = (CVkImage*)pImage;
VkClearColorValue color = {.float32 = {1,0,1,0}};
VkImageSubresourceRange range = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.levelCount = 1,
.layerCount = 1,
};
vkCmdClearColorImage(hCommandBuffer, pImage->m_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &color, 1, &range);
}