diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-10-31 18:03:01 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2009-10-31 18:03:34 +0800 |
commit | 74237c1a101e2943960b5597d3920d06b0cca2e9 (patch) | |
tree | cc93f2997d4cc1a2bf1f26b6a89be4b08e330500 | |
parent | ce5af556aa72fc850e5f8657cae186a470b91fb8 (diff) |
mesa: Remember client active texture in _mesa_meta_draw_tex.android-x86-1.6
-rw-r--r-- | src/mesa/drivers/common/meta.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 896e258712..3c6345c23f 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -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), NULL, GL_DYNAMIC_DRAW_ARB); + /* 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)); _mesa_EnableClientState(GL_VERTEX_ARRAY); @@ -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])); _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); } + + /* restore client active texture */ + _mesa_ClientActiveTextureARB(GL_TEXTURE0 + active_texture); } else { _mesa_BindVertexArray(drawtex->ArrayObj); |