GL_FALSE, GL_FALSE,
offsetof(struct vertex, x));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_GENERIC(0),
- *buf_obj, 0, sizeof(struct vertex));
+ *buf_obj, 0, sizeof(struct vertex), true);
_mesa_enable_vertex_array_attrib(ctx, array_obj,
- VERT_ATTRIB_GENERIC(0));
+ VERT_ATTRIB_GENERIC(0), true);
if (texcoord_size > 0) {
_mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_GENERIC(1),
texcoord_size, GL_FLOAT, GL_RGBA,
GL_FALSE, GL_FALSE, GL_FALSE,
offsetof(struct vertex, tex));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_GENERIC(1),
- *buf_obj, 0, sizeof(struct vertex));
+ *buf_obj, 0, sizeof(struct vertex), true);
_mesa_enable_vertex_array_attrib(ctx, array_obj,
- VERT_ATTRIB_GENERIC(1));
+ VERT_ATTRIB_GENERIC(1), true);
}
} else {
_mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_POS,
GL_FALSE, GL_FALSE,
offsetof(struct vertex, x));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_POS,
- *buf_obj, 0, sizeof(struct vertex));
- _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_POS);
+ *buf_obj, 0, sizeof(struct vertex), true);
+ _mesa_enable_vertex_array_attrib(ctx, array_obj,
+ VERT_ATTRIB_POS, true);
if (texcoord_size > 0) {
_mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_TEX(0),
GL_FALSE, GL_FALSE,
offsetof(struct vertex, tex));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_TEX(0),
- *buf_obj, 0, sizeof(struct vertex));
- _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_TEX(0));
+ *buf_obj, 0, sizeof(struct vertex), true);
+ _mesa_enable_vertex_array_attrib(ctx, array_obj,
+ VERT_ATTRIB_TEX(0), true);
}
if (color_size > 0) {
GL_FALSE, GL_FALSE,
offsetof(struct vertex, r));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_COLOR0,
- *buf_obj, 0, sizeof(struct vertex));
- _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_COLOR0);
+ *buf_obj, 0, sizeof(struct vertex), true);
+ _mesa_enable_vertex_array_attrib(ctx, array_obj,
+ VERT_ATTRIB_COLOR0, true);
}
}
} else {
GLuint u, tgt;
save->ActiveUnit = ctx->Texture.CurrentUnit;
- save->EnvMode = ctx->Texture.Unit[0].EnvMode;
+ save->EnvMode = ctx->Texture.FixedFuncUnit[0].EnvMode;
/* Disable all texture units */
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
- save->TexEnabled[u] = ctx->Texture.Unit[u].Enabled;
- save->TexGenEnabled[u] = ctx->Texture.Unit[u].TexGenEnabled;
- if (ctx->Texture.Unit[u].Enabled ||
- ctx->Texture.Unit[u].TexGenEnabled) {
+ save->TexEnabled[u] = ctx->Texture.FixedFuncUnit[u].Enabled;
+ save->TexGenEnabled[u] = ctx->Texture.FixedFuncUnit[u].TexGenEnabled;
+ if (ctx->Texture.FixedFuncUnit[u].Enabled ||
+ ctx->Texture.FixedFuncUnit[u].TexGenEnabled) {
_mesa_ActiveTexture(GL_TEXTURE0 + u);
_mesa_set_enable(ctx, GL_TEXTURE_2D, GL_FALSE);
if (ctx->Extensions.ARB_texture_cube_map)
_mesa_reference_pipeline_object(ctx, &save->Pipeline, NULL);
}
+
+ _mesa_update_vertex_processing_mode(ctx);
}
if (state & MESA_META_STENCIL_TEST) {
/* Restore fixed function texture enables, texgen */
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
- if (ctx->Texture.Unit[u].Enabled != save->TexEnabled[u]) {
+ if (ctx->Texture.FixedFuncUnit[u].Enabled != save->TexEnabled[u]) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- ctx->Texture.Unit[u].Enabled = save->TexEnabled[u];
+ ctx->Texture.FixedFuncUnit[u].Enabled = save->TexEnabled[u];
}
- if (ctx->Texture.Unit[u].TexGenEnabled != save->TexGenEnabled[u]) {
+ if (ctx->Texture.FixedFuncUnit[u].TexGenEnabled != save->TexGenEnabled[u]) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- ctx->Texture.Unit[u].TexGenEnabled = save->TexGenEnabled[u];
+ ctx->Texture.FixedFuncUnit[u].TexGenEnabled = save->TexGenEnabled[u];
}
}
GL_FALSE, GL_FALSE,
offsetof(struct vertex, x));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_POS,
- drawtex->buf_obj, 0, sizeof(struct vertex));
- _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_POS);
+ drawtex->buf_obj, 0,
+ sizeof(struct vertex), true);
+ _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_POS, true);
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
GL_FALSE, GL_FALSE,
offsetof(struct vertex, st[i]));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_TEX(i),
- drawtex->buf_obj, 0, sizeof(struct vertex));
- _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_TEX(i));
+ drawtex->buf_obj, 0,
+ sizeof(struct vertex), true);
+ _mesa_enable_vertex_array_attrib(ctx, array_obj,
+ VERT_ATTRIB_TEX(i), true);
}
}
else {