Commit 74237c1a101e2943960b5597d3920d06b0cca2e9
mesa: Remember client active texture in _mesa_meta_draw_tex.
| |   |
| 2082 | 2082 | |
| 2083 | 2083 | if (drawtex->ArrayObj == 0) { |
| 2084 | 2084 | /* one-time setup */ |
| GLint active_texture; |
| 2085 | 2086 | |
| 2086 | 2087 | /* create vertex array object */ |
| 2087 | 2088 | _mesa_GenVertexArrays(1, &drawtex->ArrayObj); |
| … | … | |
| 2094 | 2094 | _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), |
| 2095 | 2095 | NULL, GL_DYNAMIC_DRAW_ARB); |
| 2096 | 2096 | |
| /* client active texture is not part of the array object */ |
| active_texture = ctx->Array.ActiveTexture; |
|
| 2097 | 2100 | /* setup vertex arrays */ |
| 2098 | 2101 | _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); |
| 2099 | 2102 | _mesa_EnableClientState(GL_VERTEX_ARRAY); |
| … | … | |
| 2105 | 2105 | _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(st[i])); |
| 2106 | 2106 | _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); |
| 2107 | 2107 | } |
|
| /* restore client active texture */ |
| _mesa_ClientActiveTextureARB(GL_TEXTURE0 + active_texture); |
| 2108 | 2111 | } |
| 2109 | 2112 | else { |
| 2110 | 2113 | _mesa_BindVertexArray(drawtex->ArrayObj); |