To change the scene-graph during runtime I'm using several working threads which disable the render-loop and update the gl-context (load/unload shaders / replace buffers etc.) e.g.

stop render-loop
get context
continue render-loop

If I try to generate a vao in a worker thread with:

glGenVertexArrays(1, &vaoId);

vaoId (the vertex array name) is 0 and glGenVertexArrays doesn't cast any error message.

I use a library for the gl-context processing but the code looks like this:

glXMakeCurrent(_glfw.x11.display, window->x11.handle, window->glx.context);

This behaviour isn't described in the SDK documatation about glGenVertexArrays.

I'm using a 3.2 core context (also tested with 4.3). My actual workaround would be to create a name-heap at startup and manage them by myself instead of using the gl-Is and gl-delete functions.