Commit 5bf9878034bc061c0d4e5158d02c0a986aab8150

  • avatar
  • Chia-I Wu <olvaffe @gm…l.com>
  • Sat Oct 31 11:36:57 CET 2009
mesa: Remember client active texture in _mesa_meta_draw_tex.
  
28352835
28362836 if (drawtex->ArrayObj == 0) {
28372837 /* one-time setup */
2838 GLint active_texture;
28382839
28392840 /* create vertex array object */
28402841 _mesa_GenVertexArrays(1, &drawtex->ArrayObj);
28472847 _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts),
28482848 NULL, GL_DYNAMIC_DRAW_ARB);
28492849
2850 /* client active texture is not part of the array object */
2851 active_texture = ctx->Array.ActiveTexture;
2852
28502853 /* setup vertex arrays */
28512854 _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x));
28522855 _mesa_EnableClientState(GL_VERTEX_ARRAY);
28582858 _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(st[i]));
28592859 _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY);
28602860 }
2861
2862 /* restore client active texture */
2863 _mesa_ClientActiveTextureARB(GL_TEXTURE0 + active_texture);
28612864 }
28622865 else {
28632866 _mesa_BindVertexArray(drawtex->ArrayObj);