working on colors issue

This commit is contained in:
Kbz-8
2023-04-14 12:29:17 +02:00
parent ff6fb56042
commit 39c7857ccc
11 changed files with 16 additions and 73 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/25 11:59:07 by maldavid #+# #+# */
/* Updated: 2023/04/11 16:21:23 by maldavid ### ########.fr */
/* Updated: 2023/04/13 15:07:01 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -17,21 +17,6 @@
namespace mlx
{
VkFormat findSupportedFormat(const std::vector<VkFormat>& candidates, VkImageTiling tiling, VkFormatFeatureFlags features)
{
for(VkFormat format : candidates)
{
VkFormatProperties props;
vkGetPhysicalDeviceFormatProperties(Render_Core::get().getDevice().getPhysicalDevice(), format, &props);
if(tiling == VK_IMAGE_TILING_LINEAR && (props.linearTilingFeatures & features) == features)
return format;
else if(tiling == VK_IMAGE_TILING_OPTIMAL && (props.optimalTilingFeatures & features) == features)
return format;
}
core::error::report(e_kind::fatal_error, "Vulkan : failed to find image format");
return VK_FORMAT_R8G8B8A8_UNORM; // to avoid warning;
}
void Image::create(uint32_t width, uint32_t height, VkFormat format, VkImageTiling tiling, VkImageUsageFlags usage, VkMemoryPropertyFlags properties)
{
_width = width;