Commit 74237c1a101e2943960b5597d3920d06b0cca2e9

  • avatar
  • Chia-I Wu <olvaffe @gm…l.com>
  • Sat Oct 31 11:03:34 CET 2009
mesa: Remember client active texture in _mesa_meta_draw_tex.
  
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);
20942094 _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts),
20952095 NULL, GL_DYNAMIC_DRAW_ARB);
20962096
2097 /* client active texture is not part of the array object */
2098 active_texture = ctx->Array.ActiveTexture;
2099
20972100 /* setup vertex arrays */
20982101 _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x));
20992102 _mesa_EnableClientState(GL_VERTEX_ARRAY);
21052105 _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(st[i]));
21062106 _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY);
21072107 }
2108
2109 /* restore client active texture */
2110 _mesa_ClientActiveTextureARB(GL_TEXTURE0 + active_texture);
21082111 }
21092112 else {
21102113 _mesa_BindVertexArray(drawtex->ArrayObj);