Zebediah Figura (@zfigura) commented about dlls/ddraw/device.c:
- } else if (primitive_type != device->ddraw_device_buffer.primitive_type) {
TRACE_(ddraw_perf)("Buffering failed due to mismatched primitive_type %d != buffer.primitive_type %d \n", primitive_type, device->ddraw_device_buffer.primitive_type);
return WINED3DERR_NOTAVAILABLE;
- }
- /* append all the vertices to the buffer */
- memcpy(device->ddraw_device_buffer.buffer_vertices + device->ddraw_device_buffer.buffer_vertex_count * stride, vertices, vertex_count * stride);
- TRACE_(ddraw_perf)("vertex count %lu stride %d buffer_vertex_count %05lu buffer_indice_count %05lu\n", vertex_count, stride,
device->ddraw_device_buffer.buffer_vertex_count, device->ddraw_device_buffer.buffer_indice_count);
- /* Create the index */
- if (primitive_type == D3DPT_TRIANGLEFAN) goto fan;
- if (primitive_type == D3DPT_POINTLIST) goto points;
- FIXME("primitive_type %#x not supported\n", primitive_type);
- goto done;
Let's use helper functions instead of gotos, please.