While creating a core context I noticed that after calling wglShareLists Vertex Array Objects Names start with 1 again.
UINT GlobalVAO[ 2 ] = { 0 };
if ( 1 )
{
glGenVertexArrays( 1, &GlobalVAO[ 0 ] );
glBindVertexArray( GlobalVAO[ 0 ] );
}
int attriblist[] = {
WGL_CONTEXT_MAJOR_VERSION_ARB, 4,
WGL_CONTEXT_MINOR_VERSION_ARB, 2,//returns 4.4 anyway!
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,//WGL_CONTEXT_DEBUG_BIT_ARB,
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
0, 0 };
HGLRC NewGLC = wglCreateContextAttribsARB( hdc, NULL, attriblist );
BOOL Shared = wglShareLists( hrc, NewGLC );// hrc comes from a call to hrc = wglCreateContext( Window_hdc );
if (NewGLC)
{
wglMakeCurrent( hdc, NewGLC );
}
if ( 1 )
{
glGenVertexArrays( 1, &GlobalVAO[ 1 ] );
glBindVertexArray( GlobalVAO[ 1 ] );
}
if ( GlobalVAO[ 0 ] == GlobalVAO[ 1 ])//always returns true
{
}