MCPcopy Create free account
hub / github.com/Nadrin/Quartz / createDefaultVulkanInstance

Method createDefaultVulkanInstance

apps/quartz/renderwindow.cpp:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45QVulkanInstance *RenderWindow::createDefaultVulkanInstance()
46{
47 QScopedPointer<QVulkanInstance> vkInstance(new QVulkanInstance);
48 vkInstance->setApiVersion(QVersionNumber(1, 1));
49#ifdef QUARTZ_DEBUG
50 vkInstance->setLayers(QByteArrayList() << "VK_LAYER_LUNARG_standard_validation");
51#endif
52 if(!vkInstance->create()) {
53 QMessageBox::critical(nullptr, tr("Quartz"), QString("%1: %2")
54 .arg(tr("Failed to create Vulkan instance"))
55 .arg(vkInstance->errorCode()));
56 return nullptr;
57 }
58 return vkInstance.take();
59}
60
61bool RenderWindow::requestSourceFile()
62{

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected