Changed project back to C++

This commit is contained in:
Piotr Krygier committed 2022-10-05 15:51:19 +02:00
1 parent ce0c399810
commit e7b9d4a32f
15 files changed
+1181 -412

No files matched your search

+61 -73
View File
@@ -4,16 +4,24 @@
* @brief Error messages for Vulkan initializers
* @version 0.1
* @date 2022-05-13
*
*
* @copyright Copyright (c) 2022
*
*
*/
#ifndef LOCALE_VULKAN_H
#define LOCALE_VULKAN_H
#pragma once
#include <array>
#include <vector>
#include "localization.hpp"
namespace rse::locale::vulkan
{
#define vulkanErrorMesssages vulkanErrorMesssages_nolocale[SELECTED_LANGUAGE]
enum Errors
{
VULKAN_INTANCE_INIT_FAILED,
@@ -27,78 +35,58 @@ enum Errors
VULKAN_SURFACE_CREATION_FAILED,
VULKAN_SWAPCHAIN_CREATION_FAILED,
VULKAN_SWAPCHAIN_IMVIEW_CREATION_FAILED,
VULKAN_SHADER_UNABLE_TO_OPEN,
VULKAN_SHADER_UNABLE_TO_CREATE_SHADER,
VULKAN_PIPELAYOUT_CREATION_FAILED,
VULKAN_RENDERPASS_CREATION_FAILED,
VULKAN_GRAPHICSPIPELINE_CREATION_FAILED,
VULKAN_FRAMEBUFFERS_CREATION_FAILED,
VULKAN_RECORD_COMMAND_BUFFER_FAILED,
VULKAN_SYNCOBJCTS_CREATION_FAILED,
LAST_MESSAGE
};
const struct MessageString_t vulkanErrorMesssages[LAST_MESSAGE] =
{
{
38,
{/* VULKAN_INTANCE_INIT_FAILED */
"Vulkan instance initialization failed"
std::array<std::array<const char*, LAST_MESSAGE>, LAST_LANGUAGE> vulkanErrorMesssages_nolocale = {
{/* EN_US */
/* VULKAN_INTANCE_INIT_FAILED */
"Vulkan instance initialization failed",
/* VULKAN_NO_PHYSICAL_DEVICES */
"No physical graphical physical devices found in system",
/* VULKAN_NO_SUITABLE_PHYSICAL_DEVICES */
"No suitable physical device found",
/* VULKAN_QUEUE_NOT_SUPPORTED */
"Selected physical device does not support required queue capabilities",
/* VULKAN_FAILED_TO_CREATE_DEVICE */
"Failed to create logical device",
/* VULKAN_ALLOCATOR_CREATION_FAILED */
"Failed to create Vulkan Memory Allocator",
/* VULKAN_COMMAND_POOL_CREATION_FAILED */
"Failed to create command pool",
/* VULKAN_COMMAND_BUFFER_ALLOCATION_FAILED */
"Failed to allocate command buffers",
/* VULKAN_SURFACE_CREATION_FAILED */
"Failed to create window surface",
/* VULKAN_SWAPCHAIN_CREATION_FAILED */
"Failed to create swapchain",
/* VULKAN_SWAPCHAIN_IMVIEW_CREATION_FAILED */
"Failed to create swapchain image view",
/* VULKAN_SHADER_UNABLE_TO_OPEN */
"Failed to open a file containing shader code",
/* VULKAN_SHADER_UNABLE_TO_CREATE_SHADER */
"Failed to create a shader",
/* VULKAN_PIPELAYOUT_CREATION_FAILED */
"Failed to create pipeline layout",
/* VULKAN_RENDERPASS_CREATION_FAILED */
"Failed to create render pass",
/* VULKAN_GRAPHICSPIPELINE_CREATION_FAILED */
"Failed to create graphics pipeline",
/* VULKAN_FRAMEBUFFERS_CREATION_FAILED */
"Failed to create framebuffer",
/* VULKAN_RECORD_COMMAND_BUFFER_FAILED */
"Failed to record command buffer. Validate your commands.",
/* VULKAN_SYNCOBJCTS_CREATION_FAILED */
"Failed to create sync objects"
}
},
{
55,
{/* VULKAN_NO_PHYSICAL_DEVICES */
"No physical graphical physical devices found in system"
}
},
{
35,
{/* VULKAN_NO_SUITABLE_PHYSICAL_DEVICES */
"No suitable physical device found"
}
},
{
70,
{/* VULKAN_QUEUE_NOT_SUPPORTED */
"Selected physical device does not support required queue capabilities"
}
},
{
23,
{/* VULKAN_FAILED_TO_CREATE_DEVICE */
"Failed to create logical device"
}
},
{
41,
{/* VULKAN_ALLOCATOR_CREATION_FAILED */
"Failed to create Vulkan Memory Allocator"
}
},
{
30,
{/* VULKAN_COMMAND_POOL_CREATION_FAILED */
"Failed to create command pool"
}
},
{
35,
{/* VULKAN_COMMAND_BUFFER_ALLOCATION_FAILED */
"Failed to allocate command buffers"
}
},
{
32,
{/* VULKAN_SURFACE_CREATION_FAILED */
"Failed to create window surface"
}
},
{
27,
{/* VULKAN_SWAPCHAIN_CREATION_FAILED */
"Failed to create swapchain"
}
},
{
38,
{/* VULKAN_SWAPCHAIN_IMVIEW_CREATION_FAILED */
"Failed to create swapchain image view"
}
},
};
#endif
} // namespace rse::locale::vulkan