8-bit detection updates. No more -no8bit, it defaults off anyway. set

vid_use8bit 1 to check for 8-bit extensions.
This commit is contained in:
Jeff Teunissen 2000-11-23 07:21:46 +00:00
parent a58579cebf
commit 4e72832846

View file

@ -90,7 +90,7 @@ int gl_mtex_enum = TEXTURE0_SGIS;
qboolean gl_arb_mtex = false; qboolean gl_arb_mtex = false;
qboolean gl_mtexable = false; qboolean gl_mtexable = false;
qboolean is8bit = false; static qboolean is8bit = false;
cvar_t *vid_use8bit; cvar_t *vid_use8bit;
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
@ -374,16 +374,13 @@ VID_Init8bitPalette (void)
Con_Printf ("8-bit OpenGL extension: "); Con_Printf ("8-bit OpenGL extension: ");
if (COM_CheckParm ("-no8bit")) {
Con_Printf ("disabled.\n");
return;
}
#ifdef HAVE_DLOPEN #ifdef HAVE_DLOPEN
if (!(dlhand = dlopen (NULL, RTLD_LAZY))) { if (!(dlhand = dlopen (NULL, RTLD_LAZY))) {
Con_Printf ("unable to check.\n"); Con_Printf ("unable to check.\n");
return; return;
} }
#endif #endif
if (vid_use8bit->int_val) { if (vid_use8bit->int_val) {
#ifdef HAVE_TDFXGL #ifdef HAVE_TDFXGL
3dfx_Init8bitPalette (); 3dfx_Init8bitPalette ();
@ -394,7 +391,10 @@ VID_Init8bitPalette (void)
if (!is8bit) { if (!is8bit) {
Con_Printf ("not found.\n"); Con_Printf ("not found.\n");
} }
} else {
Con_Printf ("disabled.\n");
} }
#ifdef HAVE_DLOPEN #ifdef HAVE_DLOPEN
dlclose (dlhand); dlclose (dlhand);
dlhand = NULL; dlhand = NULL;