GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit 74237c1a authored by Chia-I Wu's avatar Chia-I Wu
Browse files

mesa: Remember client active texture in _mesa_meta_draw_tex.

parent ce5af556
......@@ -2082,6 +2082,7 @@ _mesa_meta_draw_tex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
if (drawtex->ArrayObj == 0) {
/* one-time setup */
GLint active_texture;
/* create vertex array object */
_mesa_GenVertexArrays(1, &drawtex->ArrayObj);
......@@ -2093,6 +2094,9 @@ _mesa_meta_draw_tex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
_mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts),
/* client active texture is not part of the array object */
active_texture = ctx->Array.ActiveTexture;
/* setup vertex arrays */
_mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x));
......@@ -2101,6 +2105,9 @@ _mesa_meta_draw_tex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
_mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(st[i]));
/* restore client active texture */
_mesa_ClientActiveTextureARB(GL_TEXTURE0 + active_texture);
else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment