MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Hpp / main

Function main

tests/DispatchLoaderStatic/DispatchLoaderStatic.cpp:18–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18int main()
19{
20 try
21 {
22 vk::Instance instance = vk::createInstance( {} );
23
24 std::vector<vk::PhysicalDevice> physicalDevices = instance.enumeratePhysicalDevices();
25 release_assert( !physicalDevices.empty() );
26
27 vk::Device device = physicalDevices[0].createDevice( {} );
28
29 device.destroy();
30 instance.destroy();
31 }
32 catch ( vk::SystemError const & err )
33 {
34 std::cout << "vk::SystemError: " << err.what() << std::endl;
35 std::exit( -1 );
36 }
37 catch ( ... )
38 {
39 std::cout << "unknown error\n";
40 std::exit( -1 );
41 }
42
43 return 0;
44}

Callers

nothing calls this directly

Calls 1

createInstanceFunction · 0.85

Tested by

no test coverage detected