Appearantly you even set the compatibility by default, which I think is great
.
However, concerning 4.x support I think this doesn't really work as expected, your 'release try' currently happens as follows:
while (!myContext && (mySettings.MajorVersion >= 3))
{
//Try create context
// If we couldn't create an OpenGL 3 context, adjust the settings
if (!myContext)
{
if (mySettings.MinorVersion > 0)
{
// If the minor version is not 0, we decrease it and try again
mySettings.MinorVersion--;
}
else
{
// If the minor version is 0, we decrease the major version and stop with 3.x contexts
mySettings.MajorVersion = 2;
}
}
}
So if it cannot create a 4.1/4.0 context it will immediately fall back to 2.x, which shouldn't really happen. I added some methods to the more general GLContext and adapted the glx and wgl context classes accordingly. I think this fix is more future proof. Anyway, you can find the patch
hereI know there are some weird looking +/- lines in the fix also, I guess that has something to do with line endings getting changed upon saving.