From: Brian Paul Date: Tue, 14 Jul 2009 20:26:42 +0000 (-0600) Subject: mesa: fix texture border color code for glPopAttrib() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9aca6769dfb934e15e848f938b7fb31345a8b3b2;p=mesa.git mesa: fix texture border color code for glPopAttrib() The texture object's border color used to be stored as GLchan but it's been GLfloat for a while now. --- diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index a609199504e..4d85d54bb9e 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -849,7 +849,6 @@ pop_texture_group(GLcontext *ctx, struct texture_state *texstate) /* Restore texture object state for each target */ for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { const struct gl_texture_object *obj = NULL; - GLfloat bordColor[4]; GLenum target; obj = &texstate->SavedObj[u][tgt]; @@ -875,12 +874,7 @@ pop_texture_group(GLcontext *ctx, struct texture_state *texstate) _mesa_BindTexture(target, obj->Name); - bordColor[0] = CHAN_TO_FLOAT(obj->BorderColor[0]); - bordColor[1] = CHAN_TO_FLOAT(obj->BorderColor[1]); - bordColor[2] = CHAN_TO_FLOAT(obj->BorderColor[2]); - bordColor[3] = CHAN_TO_FLOAT(obj->BorderColor[3]); - - _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, bordColor); + _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, obj->BorderColor); _mesa_TexParameterf(target, GL_TEXTURE_PRIORITY, obj->Priority); _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, obj->WrapS); _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, obj->WrapT);