VkCreateInstance () wirft einen Segmentierungsfehler aus, wenn die Validierungsschicht [geschlossen] aktiviert wird.
Posted: 19 Aug 2025, 09:06
Ich folge diesem Tutorial, um meine erste Vulkan-Anwendung zu entwickeln.
Code: Select all
#include
#include
#include
#include
#include
#define GLFW_INCLUDE_VULKAN
#include
constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
#define DEBUGV
// #define PRINT_EXTENSIONS
// #define PRINT_LAYERS
#ifdef DEBUGV
const bool ENABLE_VALIDATION_LAYER=true;
#else
const bool ENABLE_VALIDATION_LAYER=false;
#endif //DEBUG
const std::vector layerNames={
"VK_LAYER_KHRONOS_validation",
};
class MyApplication {
public:
void run() {
initWindow();
initVulkan();
mainLoop();
cleanup();
}
private:
GLFWwindow *window;
VkInstance instance;
// std::vector layerNames;
void initWindow() {
if(glfwInit()==GLFW_FALSE)
std::cout