Commit 5bf9878034bc061c0d4e5158d02c0a986aab8150
mesa: Remember client active texture in _mesa_meta_draw_tex.
| |   |
| 2835 | 2835 | |
| 2836 | 2836 | if (drawtex->ArrayObj == 0) { |
| 2837 | 2837 | /* one-time setup */ |
| GLint active_texture; |
| 2838 | 2839 | |
| 2839 | 2840 | /* create vertex array object */ |
| 2840 | 2841 | _mesa_GenVertexArrays(1, &drawtex->ArrayObj); |
| … | … | |
| 2847 | 2847 | _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), |
| 2848 | 2848 | NULL, GL_DYNAMIC_DRAW_ARB); |
| 2849 | 2849 | |
| /* client active texture is not part of the array object */ |
| active_texture = ctx->Array.ActiveTexture; |
|
| 2850 | 2853 | /* setup vertex arrays */ |
| 2851 | 2854 | _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); |
| 2852 | 2855 | _mesa_EnableClientState(GL_VERTEX_ARRAY); |
| … | … | |
| 2858 | 2858 | _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(st[i])); |
| 2859 | 2859 | _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); |
| 2860 | 2860 | } |
|
| /* restore client active texture */ |
| _mesa_ClientActiveTextureARB(GL_TEXTURE0 + active_texture); |
| 2861 | 2864 | } |
| 2862 | 2865 | else { |
| 2863 | 2866 | _mesa_BindVertexArray(drawtex->ArrayObj); |