enable and clean-up of paletted texture code
This commit is contained in:
@@ -700,7 +700,7 @@ static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name)
|
||||
}
|
||||
}
|
||||
/* now make the GL_RENDERER string */
|
||||
sprintf(buffer, "Mesa DRI %s 20000420", hardware);
|
||||
sprintf(buffer, "Mesa DRI %s 20000510", hardware);
|
||||
return buffer;
|
||||
}
|
||||
case GL_VENDOR:
|
||||
@@ -900,7 +900,6 @@ void fxDDInitExtensions( GLcontext *ctx )
|
||||
gl_extensions_disable(ctx, "GL_EXT_blend_minmax");
|
||||
gl_extensions_disable(ctx, "GL_EXT_blend_subtract");
|
||||
gl_extensions_disable(ctx, "GL_EXT_blend_color");
|
||||
gl_extensions_disable(ctx, "GL_EXT_paletted_texture");
|
||||
|
||||
gl_extensions_add(ctx, DEFAULT_ON, "3DFX_set_global_palette", 0);
|
||||
|
||||
|
@@ -325,11 +325,11 @@ void fxDDTexParam(GLcontext *ctx, GLenum target, struct gl_texture_object *tObj,
|
||||
|
||||
void fxDDTexDel(GLcontext *ctx, struct gl_texture_object *tObj)
|
||||
{
|
||||
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
|
||||
fxMesaContext fxMesa = FX_CONTEXT(ctx);
|
||||
tfxTexInfo *ti = fxTMGetTexInfo(tObj);
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_DRIVER) {
|
||||
fprintf(stderr,"fxmesa: fxDDTexDel(%d,%x)\n",tObj->Name,(GLuint)ti);
|
||||
fprintf(stderr, "fxmesa: fxDDTexDel(%d,%p)\n", tObj->Name, ti);
|
||||
}
|
||||
|
||||
if (!ti)
|
||||
@@ -346,10 +346,10 @@ void fxDDTexDel(GLcontext *ctx, struct gl_texture_object *tObj)
|
||||
|
||||
|
||||
/*
|
||||
* Convert gl_color_table table to Glide's format.
|
||||
* Convert a gl_color_table texture palette to Glide's format.
|
||||
*/
|
||||
|
||||
static void convertPalette(FxU32 data[256], const struct gl_color_table *table)
|
||||
static void
|
||||
convertPalette(FxU32 data[256], const struct gl_color_table *table)
|
||||
{
|
||||
const GLubyte *tableUB = (const GLubyte *) table->Table;
|
||||
GLint width = table->Size;
|
||||
@@ -415,7 +415,7 @@ static void convertPalette(FxU32 data[256], const struct gl_color_table *table)
|
||||
|
||||
void fxDDTexPalette(GLcontext *ctx, struct gl_texture_object *tObj)
|
||||
{
|
||||
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
|
||||
fxMesaContext fxMesa = FX_CONTEXT(ctx);
|
||||
|
||||
if (tObj) {
|
||||
/* per-texture palette */
|
||||
@@ -444,7 +444,7 @@ void fxDDTexPalette(GLcontext *ctx, struct gl_texture_object *tObj)
|
||||
|
||||
void fxDDTexUseGlbPalette(GLcontext *ctx, GLboolean state)
|
||||
{
|
||||
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
|
||||
fxMesaContext fxMesa = FX_CONTEXT(ctx);
|
||||
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
fprintf(stderr,"fxmesa: fxDDTexUseGlbPalette(%d)\n",state);
|
||||
@@ -456,7 +456,8 @@ void fxDDTexUseGlbPalette(GLcontext *ctx, GLboolean state)
|
||||
FX_grTexDownloadTable(GR_TMU0,GR_TEXTABLE_PALETTE, &(fxMesa->glbPalette));
|
||||
if (fxMesa->haveTwoTMUs)
|
||||
FX_grTexDownloadTable(GR_TMU1, GR_TEXTABLE_PALETTE, &(fxMesa->glbPalette));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
fxMesa->haveGlobalPaletteTexture = 0;
|
||||
|
||||
if ((ctx->Texture.Unit[0].Current == ctx->Texture.Unit[0].CurrentD[2]) &&
|
||||
@@ -471,6 +472,7 @@ void fxDDTexUseGlbPalette(GLcontext *ctx, GLboolean state)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int logbase2(int n)
|
||||
{
|
||||
GLint i = 1;
|
||||
|
Reference in New Issue
Block a user