mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 20:31:30 +00:00
Merge remote-tracking branch 'origin/master' into next
This commit is contained in:
commit
3fe4921a24
4 changed files with 15 additions and 16 deletions
|
@ -366,10 +366,7 @@ static INT32 WINAPI SetRes(viddef_t *lvid, vmode_t *pcurrentmode)
|
|||
else
|
||||
maximumAnisotropy = 0;
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
SetupGLFunc13();
|
||||
#endif
|
||||
|
||||
|
||||
screen_depth = (GLbyte)(lvid->bpp*8);
|
||||
if (screen_depth > 16)
|
||||
|
|
|
@ -517,18 +517,15 @@ boolean SetupGLfunc(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifndef MINI_GL_COMPATIBILITY
|
||||
// This has to be done after the context is created so the version number can be obtained
|
||||
boolean SetupGLFunc13(void)
|
||||
{
|
||||
#ifndef STATIC_OPENGL
|
||||
#define GETOPENGLFUNC(func, proc) \
|
||||
func = GetGLFunc(#proc); \
|
||||
if (!func) \
|
||||
{ \
|
||||
DBG_Printf("failed to get OpenGL function: %s", #proc); \
|
||||
} \
|
||||
|
||||
#ifdef MINI_GL_COMPATIBILITY
|
||||
return false;
|
||||
#else
|
||||
#ifdef STATIC_OPENGL
|
||||
gl13 = true;
|
||||
#else
|
||||
const char *glversion = (const char *)pglGetString(GL_VERSION);
|
||||
UINT32 majorversion = 0, minorversion = 0;
|
||||
|
||||
|
@ -537,9 +534,10 @@ boolean SetupGLFunc13(void)
|
|||
if (majorversion > 1 || (majorversion == 1 && minorversion >= 3)) // Version of OpenGL is equal to or greater than 1.3
|
||||
{
|
||||
// Get the functions
|
||||
GETOPENGLFUNC(pglActiveTexture , glActiveTexture)
|
||||
GETOPENGLFUNC(pglMultiTexCoord2f , glMultiTexCoord2f)
|
||||
pglActiveTexture = GetGLFunc("glActiveTexture");
|
||||
pglMultiTexCoord2f = GetGLFunc("glMultiTexCoord2f");
|
||||
|
||||
if (pglMultiTexCoord2f)
|
||||
gl13 = true; // This is now true, so the new fade mask stuff can be done, if OpenGL version is less than 1.3, it still uses the old fade stuff.
|
||||
}
|
||||
}
|
||||
|
@ -547,8 +545,8 @@ boolean SetupGLFunc13(void)
|
|||
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// -----------------+
|
||||
// SetNoTexture : Disable texture
|
||||
|
|
|
@ -176,6 +176,8 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
|||
else
|
||||
maximumAnisotropy = 1;
|
||||
|
||||
SetupGLFunc13();
|
||||
|
||||
granisotropicmode_cons_t[1].value = maximumAnisotropy;
|
||||
|
||||
SDL_GL_SetSwapInterval(cv_vidwait.value ? 1 : 0);
|
||||
|
|
|
@ -237,6 +237,8 @@ boolean OglSdlSurface(INT32 w, INT32 h, boolean isFullscreen)
|
|||
#endif
|
||||
maximumAnisotropy = 0;
|
||||
|
||||
SetupGLFunc13();
|
||||
|
||||
granisotropicmode_cons_t[1].value = maximumAnisotropy;
|
||||
|
||||
SetModelView(w, h);
|
||||
|
|
Loading…
Reference in a new issue