OSDN Git Service

mesa: fix glDrawTex*
authorChia-I Wu <olvaffe@gmail.com>
Thu, 24 Mar 2011 19:10:51 +0000 (03:10 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Thu, 24 Mar 2011 19:29:54 +0000 (03:29 +0800)
As the case with _mesa_DrawPixels, the driver may install its vertex
shader and the vp override flag should be set.

src/mesa/main/drawtex.c

index 2089cdf..83485a9 100644 (file)
@@ -45,11 +45,15 @@ draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
       return;
    }
 
+   _mesa_set_vp_override(ctx, GL_TRUE);
+
    if (ctx->NewState)
       _mesa_update_state(ctx);
 
    ASSERT(ctx->Driver.DrawTex);
    ctx->Driver.DrawTex(ctx, x, y, z, width, height);
+
+   _mesa_set_vp_override(ctx, GL_FALSE);
 }