wined3d: Fix index offset for immediate mode draws.
This fixes 42fcf20221
. A non-NULL pointer
doesn't imply that the pointer isn't an offset into a buffer object data.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6c5e1aff04
commit
0581d86147
|
@ -196,12 +196,10 @@ static void draw_primitive_immediate_mode(struct wined3d_context *context, const
|
|||
if (instance_count)
|
||||
FIXME("Instancing not implemented.\n");
|
||||
|
||||
/* Immediate mode drawing can't make use of indices in a vbo - get the
|
||||
* data from the index buffer. If the index buffer has no vbo (not
|
||||
* supported or other reason), or with user pointer drawing idx_data
|
||||
* will be non-NULL. */
|
||||
if (idx_size && !idx_data)
|
||||
idx_data = wined3d_buffer_load_sysmem(state->index_buffer, context);
|
||||
/* Immediate mode drawing can't make use of indices in a VBO - get the
|
||||
* data from the index buffer. */
|
||||
if (idx_size)
|
||||
idx_data = wined3d_buffer_load_sysmem(state->index_buffer, context) + state->index_offset;
|
||||
|
||||
ops = &d3d_info->ffp_attrib_ops;
|
||||
|
||||
|
|
Loading…
Reference in New Issue