Handmade Hero»Forums»Code
107 posts
GLAD without glfw
Edited by C_Worm on
Hey!

im wondering if i can do this without using glfwGetProcAddress? :

since im not using glfw library to create a window i don't have access to glfwGetProcAddress.

Can i initialize GLAD in some other way?

1
2
3
4
5
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
{
    std::cout << "Failed to initialize GLAD" << std::endl;
    return -1;
}    



why can't use wglGetProcAddress instead?

1
2
3
4
5
if (!gladLoadGLLoader((GLADloadproc)wglGetProcAddress))
{
    std::cout << "Failed to initialize GLAD" << std::endl;
    return -1;
}    



cheers
Mārtiņš Možeiko
2562 posts / 2 projects
GLAD without glfw
So why can't you? What does not work when you do it that way?