This small patch fixes a problem when using a shared palette with
textures (EXT_shared_texture_palette) for mesa32 (even if
SHARED_TEXTURE_PALETTE_EXT was enabled, texObj was used to check for the
current palette format).
And, in the current dev sources, line 482 of Make-config is missing a
trailing /
Steven Fuller
--- texture.c Tue Jan 25 19:10:42 2000
+++ texture.c Thu Feb 17 19:09:19 2000
@@ -248,17 +248,21 @@
GLcontext *ctx = gl_get_current_context(); /* THIS IS A HACK */
GLint i = index;
const GLubyte *palette;
+ GLenum format;
if (ctx->Texture.SharedPalette) {
palette = ctx->Texture.Palette;
+ format = ctx->Texture.PaletteFormat;
}
else {
+ format = tObj->PaletteFormat;
palette = tObj->Palette;
}
-
- switch (tObj->PaletteFormat) {
+
+ switch (format) {
case GL_ALPHA:
- rgba[ACOMP] = tObj->Palette[index];
+ /* rgba[ACOMP] = tObj->Palette[index]; */
+ rgba[ACOMP] = palette[index];
return;
case GL_LUMINANCE:
case GL_INTENSITY: