Commit 8dc789fe authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Handle "namedArraysLoaded" in context_unload_vertex_data().

parent 437861f1
......@@ -5058,18 +5058,20 @@ void context_load_tex_coords(const struct wined3d_context *context, const struct
checkGLcall("loadTexCoords");
}
/* This should match any arrays loaded in context_load_vertex_data().
* TODO: Only load/unload arrays if we have to. */
static void context_unload_vertex_data(const struct wined3d_context *context)
/* This should match any arrays loaded in context_load_vertex_data(). */
static void context_unload_vertex_data(struct wined3d_context *context)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
if (!context->namedArraysLoaded)
return;
gl_info->gl_ops.gl.p_glDisableClientState(GL_VERTEX_ARRAY);
gl_info->gl_ops.gl.p_glDisableClientState(GL_NORMAL_ARRAY);
gl_info->gl_ops.gl.p_glDisableClientState(GL_COLOR_ARRAY);
if (gl_info->supported[EXT_SECONDARY_COLOR])
gl_info->gl_ops.gl.p_glDisableClientState(GL_SECONDARY_COLOR_ARRAY_EXT);
context_unload_tex_coords(context);
context->namedArraysLoaded = FALSE;
}
static void context_load_vertex_data(struct wined3d_context *context,
......@@ -5489,10 +5491,9 @@ void context_update_stream_sources(struct wined3d_context *context, const struct
context_unload_numbered_arrays(context);
context->numbered_array_mask = 0;
}
else if (context->namedArraysLoaded)
else
{
context_unload_vertex_data(context);
context->namedArraysLoaded = FALSE;
}
if (load_numbered)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment