Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3917f83

Browse files
committed
Change validation layer chapter to specify that debug messengers are optional
1 parent 720bc72 commit 3917f83

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

en/03_Drawing_a_triangle/00_Setup/02_Validation_layers.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,9 @@ If the check was successful then `vkCreateInstance` should not ever return a
162162

163163
## Message callback
164164

165-
Unfortunately just enabling the layers doesn't help much, because they currently
166-
have no way to relay the debug messages back to our program. To receive those
167-
messages we have to set up a debug messenger with a callback, which requires the `VK_EXT_debug_utils`
168-
extension.
165+
The validation layers will print debug messages to the standard output by default, but we can also handle them ourselves by providing an explicit callback in our program. This will also allow you to decide which kind of messages you would like to see, because not all are necessarily (fatal) errors. If you don't want to do that right now then you may skip to the last section in this chapter.
166+
167+
To set up a callback in the program to handle messages and the associated details, we have to set up a debug messenger with a callback using the `VK_EXT_debug_utils` extension.
169168

170169
We'll first create a `getRequiredExtensions` function that will return the
171170
required list of extensions based on whether validation layers are enabled or
@@ -423,7 +422,7 @@ void createInstance() {
423422
createInfo.pNext = (VkDebugUtilsMessengerCreateInfoEXT*) &debugCreateInfo;
424423
} else {
425424
createInfo.enabledLayerCount = 0;
426-
425+
427426
createInfo.pNext = nullptr;
428427
}
429428

0 commit comments

Comments
 (0)