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

Function main

RAII_Samples/InstanceVersion/InstanceVersion.cpp:18–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18int main()
19{
20 try
21 {
22 vk::raii::Context context;
23
24 /* VULKAN_KEY_START */
25
26 uint32_t apiVersion = context.enumerateInstanceVersion();
27 std::cout << "APIVersion = " << decodeAPIVersion( apiVersion ) << std::endl;
28
29 /* VULKAN_KEY_END */
30 }
31 catch ( vk::SystemError & err )
32 {
33 std::cout << "vk::SystemError: " << err.what() << std::endl;
34 exit( -1 );
35 }
36 catch ( std::exception & err )
37 {
38 std::cout << "std::exception: " << err.what() << std::endl;
39 exit( -1 );
40 }
41 catch ( ... )
42 {
43 std::cout << "unknown error\n";
44 exit( -1 );
45 }
46 return 0;
47}

Callers

nothing calls this directly

Calls 1

decodeAPIVersionFunction · 0.70

Tested by

no test coverage detected