Changed the error printf to std::cerr

This commit is contained in:
Charles Giessen 2020-12-23 15:32:21 -07:00 committed by GitHub
parent 9a1b5f3a53
commit ac945e8aa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,8 +14,7 @@ auto instance_builder_return = instance_builder.build();
Because creating an instance may fail, the builder returns an 'Result' type. This contains either a valid `vkb::Instance` struct, which includes a `VkInstance` handle, or contains an `vkb::InstanceError`. Because creating an instance may fail, the builder returns an 'Result' type. This contains either a valid `vkb::Instance` struct, which includes a `VkInstance` handle, or contains an `vkb::InstanceError`.
```cpp ```cpp
if (!instance_builder_return) { if (!instance_builder_return) {
printf("Failed to create Vulkan instance. Cause %s\n", std::cerr << "Failed to create Vulkan instance. Error: " << instance_builder_return.error().message() << "\n";
instance_builder_return.error().message());
return -1; return -1;
} }
``` ```