Overv / VulkanTutorial

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

GlfwInit should be inside an if statement #344

Open frederikja163 opened 12 months ago

frederikja163 commented 12 months 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