0

The function glVertexAttribDivisor when used with CMake - it just throws the following error during compilation, which means that function is not imported.

error: 'glVertexAttribDivisor' was not declared in this scope; did you mean 'glVertexAttrib4iv'

I am currently using GLAD for loading openGL, like below:

if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress)) {
    std::cout << "Failed to initialize OpenGL context" << std::endl;
    return nullptr;
}

int gladInitRes = gladLoadGL();
if (!gladInitRes) {
    fprintf(stderr, "Unable to initialize glad\n");
    glfwDestroyWindow(window);
    glfwTerminate();
    return nullptr;
}

And printf("OpenGL version %i.%i\n", GLVersion.major, GLVersion.minor); prints out OpenGL version 4.2

Rohan Asokan
  • 634
  • 4
  • 22

0 Answers0