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`.
```cpp
if (!instance_builder_return) {
printf("Failed to create Vulkan instance. Cause %s\n",
instance_builder_return.error().message());
std::cerr << "Failed to create Vulkan instance. Error: " << instance_builder_return.error().message() << "\n";
return -1;
}
```
@ -262,4 +261,4 @@ To destroy the swapchain, call `vkb::destroy_swapchain()`. This is null out the
```cpp
vkb::destroy_swapchain(vkb_swapchain);
```
```