Register
Handmade Hero»Forums»Code»GLAD without glfw
35 posts
GLAD without glfw
2 months, 1 week ago Edited by C_Worm on Dec. 15, 2019, 4:16 p.m.
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
2005 posts / 1 project
GLAD without glfw
2 months, 1 week ago
So why can't you? What does not work when you do it that way?