I recently converted from using GLEW to GLLoad from the Unofficial SDK - Due to the fact that GLEW doesn’t really support OSX.
GLLoad is now causing a problem when trying to use 3.3 core gl::VertexAttribDivisor which is undefined even on a 4.3 context.
When trying to figure out why I took a look in how GLLoad was implemented inside the LoadFunctions. As far as I can tell the method is suppose to load the various functions specified for each version successively.
LoadFunctions taken from the newest version of GLLoad:
int LoadFunctions()
{
int eCurrLoadStatus = LS_LOAD_FUNCTIONS_ALL;
iMajorVersion = 0;
iMinorVersion = 0;
//Clear the extensions, in case we loaded already.
gleIntClear();
//Get the base functions that we need just to process OpenGL.
gleIntLoadBaseFuncs();
//Get the version numbers.
GetGLVersion(&iMajorVersion, &iMinorVersion);
if(iMajorVersion < 3)
{
//Load the 2.1 core.
if(!gleIntLoad_Version_2_1()) eCurrLoadStatus = LS_LOAD_FUNCTIONS_SOME;
}
else if(iMajorVersion == 3 && iMinorVersion < 2)
{
switch(iMinorVersion)
{
case 0:
if(!gleIntLoad_Version_3_0()) eCurrLoadStatus = LS_LOAD_FUNCTIONS_SOME;
break;
case 1:
//Check the ARB_compatibility extension.
if(CheckCompatibilityExt())
{
if(!gleIntLoad_Version_3_1_Comp()) eCurrLoadStatus = LS_LOAD_FUNCTIONS_SOME;
}
else
{
if(!gleIntLoad_Version_3_1()) eCurrLoadStatus = LS_LOAD_FUNCTIONS_SOME;
}
break;
}
}
else
{
int iProfileMask = 0;
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &iProfileMask);
if(iProfileMask)
{
if(iProfileMask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)
{
if(!gleIntLoad_Version_3_2_Comp()) eCurrLoadStatus = LS_LOAD_FUNCTIONS_SOME;
}
else
{
if(!gleIntLoad_Version_3_2()) eCurrLoadStatus = LS_LOAD_FUNCTIONS_SOME;
}
}
else
{
//Hack to fix NVIDIA stupidity.
if(CheckCompatibilityExt())
{
if(!gleIntLoad_Version_3_2_Comp()) eCurrLoadStatus = LS_LOAD_FUNCTIONS_SOME;
}
else
{
if(!gleIntLoad_Version_3_2()) eCurrLoadStatus = LS_LOAD_FUNCTIONS_SOME;
}
}
}
//Now, process the extensions.
//Use different methods if glGetStringi is available.
if(iMajorVersion < 3)
{
ProcExtFromExtString((const char *)glGetString(GL_EXTENSIONS), gleIntExtensionMap, gleIntExtensionMapSize);
}
else
{
ProcExtFromList();
}
return eCurrLoadStatus;
}
As far as I can tell this doesn’t handle anything past 3.2. Surely this is a bug as calling eg. gleIntLoad_Version_4_3_Comp() makes everything work as intended.