c++ - OpenGL 4.5 glNamedFunction not found -


it seems linker not find new 4.5 functions:

undefined reference `glnamedbufferdata' 

though when glxinfo | grep version get:

opengl core profile version string: 4.5.0 nvidia 361.18 

though, optirun ...

i compile -dgl_gl_ext_prototypes , link -glfw -lgl -lpng

what miss?

here minimal (edited) code example:

#include "glad.h" #include <glfw/glfw3.h>  #include <stdio.h> #include <stdlib.h>  int main() {     if(!glfwinit()) return 64;     glfwwindow* window = glfwcreatewindow(800,600, "opengl test", null, null);     if(!window)     {         glfwterminate();         return 64;     }     glfwmakecontextcurrent(window);     if(!gladloadglloader((gladloadproc) glfwgetprocaddress)) {         exit(66);     }        gluint buffer;     glgenbuffers(1, &buffer);     glfloat data[] = {0,0, 0,1, 1,1, 1,0};     glnamedbufferdata(buffer, sizeof(data), data, gl_dynamic_draw);     glint error = glgeterror();     printf("%d\n", error);     while(!glfwwindowshouldclose(window))     {         glfwswapbuffers(window);         glfwpollevents();     }     glfwterminate();     return 0; } 

compiled with: g++ -dgl_glext_prototypes main.cc glad.h glad.c -o test -ldl -lgl -lglfw

i error 1282 after calling namedbuffers --- invalid_operation think ...

edit:

so used both glew glad extensions linked. function calls compile "named" function has no effect on program --- buffers not provided data or similar, though other functions still work expected.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -