From 6f2e084b6dbb5dba87c9b34d7cbbea7a56505d09 Mon Sep 17 00:00:00 2001 From: Sadie del Solar Date: Wed, 17 Sep 2025 16:13:03 -0700 Subject: [PATCH] Add a code block for the GLFW window pointer. Almost all of the code listed in this chapter uses a c++ code block. The block for the 'GLFWWindow* window' was missing. --- en/03_Drawing_a_triangle/00_Setup/00_Base_code.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/en/03_Drawing_a_triangle/00_Setup/00_Base_code.md b/en/03_Drawing_a_triangle/00_Setup/00_Base_code.md index df26c6ac..e5b0e0b3 100644 --- a/en/03_Drawing_a_triangle/00_Setup/00_Base_code.md +++ b/en/03_Drawing_a_triangle/00_Setup/00_Base_code.md @@ -145,8 +145,14 @@ disable it for now with another window hint call: glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); ``` -All that's left now is creating the actual window. Add a `GLFWwindow* window;` -private class member to store a reference to it and initialize the window with: +All that's left now is creating the actual window. Add a private class member to store a reference to it: + +```c++ +private: +GLFWwindow* window; +``` + +Initialize the window with ```c++ window = glfwCreateWindow(800, 600, "Vulkan", nullptr, nullptr);