Android-x86
Fork
捐款

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-mesa: 提交

external/mesa


Commit MetaInfo

修訂74237c1a101e2943960b5597d3920d06b0cca2e9 (tree)
時間2009-10-31 19:03:34
作者Chia-I Wu <olvaffe@gmai...>
CommiterChia-I Wu

Log Message

mesa: Remember client active texture in _mesa_meta_draw_tex.

Change Summary

差異

--- 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,
20822082
20832083 if (drawtex->ArrayObj == 0) {
20842084 /* one-time setup */
2085+ GLint active_texture;
20852086
20862087 /* create vertex array object */
20872088 _mesa_GenVertexArrays(1, &drawtex->ArrayObj);
@@ -2093,6 +2094,9 @@ _mesa_meta_draw_tex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
20932094 _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts),
20942095 NULL, GL_DYNAMIC_DRAW_ARB);
20952096
2097+ /* client active texture is not part of the array object */
2098+ active_texture = ctx->Array.ActiveTexture;
2099+
20962100 /* setup vertex arrays */
20972101 _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x));
20982102 _mesa_EnableClientState(GL_VERTEX_ARRAY);
@@ -2101,6 +2105,9 @@ _mesa_meta_draw_tex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
21012105 _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(st[i]));
21022106 _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY);
21032107 }
2108+
2109+ /* restore client active texture */
2110+ _mesa_ClientActiveTextureARB(GL_TEXTURE0 + active_texture);
21042111 }
21052112 else {
21062113 _mesa_BindVertexArray(drawtex->ArrayObj);
Show on old repository browser