OpenGL: check for 1.3+ or 2.0+, not just 1.3/2.X to 4.X

This commit is contained in:
Alam Ed Arias 2017-05-29 23:04:03 -04:00
parent 6be7693ecb
commit 6847a89bc2

View file

@ -528,18 +528,10 @@ boolean SetupGLFunc13(void)
if (sscanf((const char*)version, "%d.%d", &glmajor, &glminor) == 2) if (sscanf((const char*)version, "%d.%d", &glmajor, &glminor) == 2)
{ {
// Look, we gotta prepare for the inevitable arrival of GL 2.0 code... // Look, we gotta prepare for the inevitable arrival of GL 2.0 code...
switch (glmajor) if (glmajor == 1 && glminor >= 3)
{ gl13 = true;
case 1: else if (glmajor > 1)
if (glminor == 3) gl13 = true;
break;
case 2:
case 3:
case 4:
gl13 = true; gl13 = true;
default:
break;
}
} }
} }