inform driver of changed wrap/filter parameters due to binding of nv_texrect texture
authorRoland Scheidegger <rscheidegger@gmx.ch>
Fri, 6 Feb 2004 15:27:42 +0000 (15:27 +0000)
committerRoland Scheidegger <rscheidegger@gmx.ch>
Fri, 6 Feb 2004 15:27:42 +0000 (15:27 +0000)
src/mesa/main/texobj.c

index cdcc5acc7547186316f9a88b0fc5aa84a05e1564..1829cc0c13b706297b2cfb13a8226e687887434c 100644 (file)
@@ -818,6 +818,14 @@ _mesa_BindTexture( GLenum target, GLuint texName )
             newTexObj->WrapT = GL_CLAMP_TO_EDGE;
             newTexObj->WrapR = GL_CLAMP_TO_EDGE;
             newTexObj->MinFilter = GL_LINEAR;
+            if (ctx->Driver.TexParameter) {
+               static const GLfloat fparam_wrap[1] = {(GLfloat) GL_CLAMP_TO_EDGE};
+               static const GLfloat fparam_filter[1] = {(GLfloat) GL_LINEAR};
+               (*ctx->Driver.TexParameter)( ctx, target, newTexObj, GL_TEXTURE_WRAP_S, fparam_wrap );
+               (*ctx->Driver.TexParameter)( ctx, target, newTexObj, GL_TEXTURE_WRAP_T, fparam_wrap );
+               (*ctx->Driver.TexParameter)( ctx, target, newTexObj, GL_TEXTURE_WRAP_R, fparam_wrap );
+               (*ctx->Driver.TexParameter)( ctx, target, newTexObj, GL_TEXTURE_MIN_FILTER, fparam_filter );
+            }
          }
       }
       else {