mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 00:24:12 +00:00
re-enable 8bit textures
This commit is contained in:
parent
06622fa164
commit
c72e2ef324
2 changed files with 3 additions and 12 deletions
|
@ -37,6 +37,7 @@
|
||||||
struct cvar_s;
|
struct cvar_s;
|
||||||
extern byte *vid_basepal;
|
extern byte *vid_basepal;
|
||||||
extern byte *vid_colormap;
|
extern byte *vid_colormap;
|
||||||
|
extern unsigned char d_15to8table[65536];
|
||||||
|
|
||||||
extern struct cvar_s *vid_fullscreen;
|
extern struct cvar_s *vid_fullscreen;
|
||||||
extern struct cvar_s *vid_system_gamma;
|
extern struct cvar_s *vid_system_gamma;
|
||||||
|
|
|
@ -272,7 +272,6 @@ GL_ResampleTexture (unsigned int *in, int inwidth, int inheight,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(GL_SHARED_TEXTURE_PALETTE_EXT) && defined(HAVE_GL_COLOR_INDEX8_EXT)
|
|
||||||
static void
|
static void
|
||||||
GL_Resample8BitTexture (unsigned char *in, int inwidth, int inheight,
|
GL_Resample8BitTexture (unsigned char *in, int inwidth, int inheight,
|
||||||
unsigned char *out, int outwidth, int outheight)
|
unsigned char *out, int outwidth, int outheight)
|
||||||
|
@ -297,7 +296,6 @@ GL_Resample8BitTexture (unsigned char *in, int inwidth, int inheight,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
GL_MipMap
|
GL_MipMap
|
||||||
|
@ -329,7 +327,6 @@ GL_MipMap (byte * in, int width, int height)
|
||||||
|
|
||||||
Mipping for 8 bit textures
|
Mipping for 8 bit textures
|
||||||
*/
|
*/
|
||||||
#if defined(GL_SHARED_TEXTURE_PALETTE_EXT) && defined(HAVE_GL_COLOR_INDEX8_EXT)
|
|
||||||
static void
|
static void
|
||||||
GL_MipMap8Bit (byte * in, int width, int height)
|
GL_MipMap8Bit (byte * in, int width, int height)
|
||||||
{
|
{
|
||||||
|
@ -357,7 +354,6 @@ GL_MipMap8Bit (byte * in, int width, int height)
|
||||||
out[0] = d_15to8table[(r << 0) + (g << 5) + (b << 10)];
|
out[0] = d_15to8table[(r << 0) + (g << 5) + (b << 10)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
GL_Upload32 (unsigned int *data, int width, int height, qboolean mipmap,
|
GL_Upload32 (unsigned int *data, int width, int height, qboolean mipmap,
|
||||||
|
@ -440,7 +436,6 @@ void
|
||||||
GL_Upload8_EXT (byte * data, int width, int height, qboolean mipmap,
|
GL_Upload8_EXT (byte * data, int width, int height, qboolean mipmap,
|
||||||
qboolean alpha)
|
qboolean alpha)
|
||||||
{
|
{
|
||||||
#if defined(GL_SHARED_TEXTURE_PALETTE_EXT) && defined(HAVE_GL_COLOR_INDEX8_EXT)
|
|
||||||
byte *scaled;
|
byte *scaled;
|
||||||
int scaled_width, scaled_height;
|
int scaled_width, scaled_height;
|
||||||
|
|
||||||
|
@ -502,7 +497,6 @@ GL_Upload8_EXT (byte * data, int width, int height, qboolean mipmap,
|
||||||
}
|
}
|
||||||
|
|
||||||
free (scaled);
|
free (scaled);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -538,15 +532,11 @@ GL_Upload8 (byte * data, int width, int height, qboolean mipmap, qboolean alpha)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(GL_SHARED_TEXTURE_PALETTE_EXT) && defined(HAVE_GL_COLOR_INDEX8_EXT)
|
|
||||||
if (VID_Is8bit () && !alpha) {
|
if (VID_Is8bit () && !alpha) {
|
||||||
GL_Upload8_EXT (data, width, height, mipmap, alpha);
|
GL_Upload8_EXT (data, width, height, mipmap, alpha);
|
||||||
} else {
|
} else {
|
||||||
#else
|
GL_Upload32 (trans, width, height, mipmap, alpha);
|
||||||
{
|
}
|
||||||
#endif
|
|
||||||
GL_Upload32 (trans, width, height, mipmap, alpha);
|
|
||||||
}
|
|
||||||
|
|
||||||
free (trans);
|
free (trans);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue