mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-26 05:51:36 +00:00
GLX now supports EXT_multitexture if you've got it, one more step
toward real ARB_multitexture.
This commit is contained in:
parent
a3e32e213e
commit
c1f7cef497
1 changed files with 26 additions and 7 deletions
|
@ -140,6 +140,10 @@ const char *gl_version;
|
|||
const char *gl_extensions;
|
||||
|
||||
qboolean is8bit = false;
|
||||
|
||||
// ARB Multitexture
|
||||
int gl_mtex_enum = TEXTURE0_SGIS;
|
||||
qboolean gl_arb_mtex = false;
|
||||
qboolean gl_mtexable = false;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
@ -292,18 +296,34 @@ void VID_SetPalette (unsigned char *palette)
|
|||
void
|
||||
CheckMultiTextureExtensions ( void )
|
||||
{
|
||||
if (COM_CheckParm ("-nomtex"))
|
||||
{
|
||||
Con_Printf ("Not using multitexture.");
|
||||
return;
|
||||
}
|
||||
#ifdef HAVE_DLOPEN
|
||||
dlhand = dlopen (NULL, RTLD_LAZY);
|
||||
if (dlhand)
|
||||
if (dlhand != NULL)
|
||||
{
|
||||
if (strstr(gl_extensions, "GL_SGIS_multitexture ") && !COM_CheckParm("-nomtex"))
|
||||
Con_Printf("Multitexture enabled ");
|
||||
if (strstr(gl_extensions, "GL_SGIS_multitexture "))
|
||||
{
|
||||
Con_Printf("Multitexture extensions found.\n");
|
||||
qglMTexCoord2fSGIS = (void *)dlsym(dlhand, "glMTexCoord2fSGIS");
|
||||
qglSelectTextureSGIS = (void *)dlsym(dlhand, "glSelectTextureSGIS");
|
||||
Con_Printf ("(SGIS)\n");
|
||||
qglMTexCoord2fSGIS =
|
||||
(void *)dlsym(dlhand, "glMTexCoord2fSGIS");
|
||||
qglSelectTextureSGIS =
|
||||
(void *)dlsym(dlhand, "glSelectTextureSGIS");
|
||||
gl_mtexable = true;
|
||||
} else if (strstr(gl_extensions, "GL_EXT_multitexture "))
|
||||
{
|
||||
Con_Printf ("(EXT)\n");
|
||||
qglMTexCoord2fSGIS =
|
||||
(void *)dlsym(dlhand, "glMTexCoord2fEXT");
|
||||
qglSelectTextureSGIS =
|
||||
(void *)dlsym(dlhand, "glSelectTextureEXT");
|
||||
gl_mtexable = true;
|
||||
} else {
|
||||
Con_Printf ("Not using multitexture extensions.\n");
|
||||
Con_Printf ("(but not found)\n");
|
||||
}
|
||||
dlclose(dlhand);
|
||||
dlhand = NULL;
|
||||
|
@ -311,7 +331,6 @@ CheckMultiTextureExtensions ( void )
|
|||
}
|
||||
#else
|
||||
gl_mtexable = false;
|
||||
Con_Printf ("No dlopen\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue