mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-04 15:31:21 +00:00
Better Opengl version check
somehow forgor about vendor information in the version string lmao
This commit is contained in:
parent
7ff1d5877d
commit
30e7bd90a4
1 changed files with 3 additions and 1 deletions
|
@ -155,6 +155,7 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
|||
{
|
||||
INT32 cbpp = cv_scr_depth.value < 16 ? 16 : cv_scr_depth.value;
|
||||
static boolean first_init = false;
|
||||
static int majorGL = 0, minorGL = 0;
|
||||
|
||||
oglflags = 0;
|
||||
|
||||
|
@ -189,7 +190,8 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
|||
else
|
||||
maximumAnisotropy = 1;
|
||||
|
||||
if (atof((const char*)gl_version) >= 1.4)
|
||||
if (sscanf((const char*)gl_version, "%d.%d", &majorGL, &minorGL)
|
||||
&& (!(majorGL == 1 && minorGL <= 3)))
|
||||
supportMipMap = true;
|
||||
else
|
||||
supportMipMap = false;
|
||||
|
|
Loading…
Reference in a new issue