Handmade Hero»Forums»Code
90 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
2201 posts / 1 project
GLAD without glfw
So why can't you? What does not work when you do it that way?