Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.2k stars 527 forks source link

GlfwInit should be inside an if statement #344

Open frederikja163 opened 1 year ago

frederikja163 commented 1 year ago

glfwInit should be placed inside an if statement like so

if (!glfwInit()){
    // Handle glfw error.
}

To handle the glfw error it might be best to throw an exception. Might aswell teach glfw best practices from day 1 :) https://www.glfw.org/docs/3.3/quick.html