You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extensions specified by GLFW are always required, but the debug report
195
+
The extensions specified by GLFW are always required, but the debug messenger
196
196
extension is conditionally added. Note that I've used the
197
197
`VK_EXT_DEBUG_UTILS_EXTENSION_NAME` macro here which is equal to the literal
198
198
string "VK_EXT_debug_utils". Using this macro lets you avoid typos.
@@ -210,7 +210,7 @@ Run the program to make sure you don't receive a
210
210
existence of this extension, because it should be implied by the availability of
211
211
the validation layers.
212
212
213
-
Now let's see what a callback function looks like. Add a new static member
213
+
Now let's see what a debug callback function looks like. Add a new static member
214
214
function called `debugCallback` with the `PFN_vkDebugUtilsMessengerCallbackEXT`
215
215
prototype. The `VKAPI_ATTR` and `VKAPI_CALL` ensure that the function has the
216
216
right signature for Vulkan to call it.
@@ -265,29 +265,29 @@ always return `VK_FALSE`.
265
265
266
266
All that remains now is telling Vulkan about the callback function. Perhaps
267
267
somewhat surprisingly, even the debug callback in Vulkan is managed with a
268
-
handle that needs to be explicitly created and destroyed. Such a callback is called a *messenger* and you can have as many of them as you want. Add a class member for
268
+
handle that needs to be explicitly created and destroyed. Such a callback is part of a *debug messenger* and you can have as many of them as you want. Add a class member for
269
269
this handle right under `instance`:
270
270
271
271
```c++
272
-
VkDebugUtilsMessengerEXT callback;
272
+
VkDebugUtilsMessengerEXT debugMessenger;
273
273
```
274
274
275
-
Now add a function `setupDebugCallback` to be called from `initVulkan` right
275
+
Now add a function `setupDebugMessenger` to be called from `initVulkan` right
276
276
after `createInstance`:
277
277
278
278
```c++
279
279
voidinitVulkan() {
280
280
createInstance();
281
-
setupDebugCallback();
281
+
setupDebugMessenger();
282
282
}
283
283
284
-
voidsetupDebugCallback() {
284
+
voidsetupDebugMessenger() {
285
285
if (!enableValidationLayers) return;
286
286
287
287
}
288
288
```
289
289
290
-
We'll need to fill in a structure with details about the callback:
290
+
We'll need to fill in a structure with details about the messenger and its callback:
0 commit comments