Stefan Dösinger (@stefan) commented about dlls/ddraw/tests/ddraw1.c:
- /* Pick a pixel where multiple quads are present */
- pick_rect.x1 = pick_rect.x2 = 64;
- pick_rect.y1 = pick_rect.y2 = 360;
- record_count = get_pickrecords(device, execute_buffer, viewport, &pick_rect, 3, &record[0]);
- if (record_count == 3)
- {
/* Documentation states this list is z-ordered, but it appears that it is not. */
check_pickrecord(&record[0], D3DOP_TRIANGLE, quad_offset + 12, -0.5f);
check_pickrecord(&record[1], D3DOP_TRIANGLE, quad_offset + 32, 6.5f);
check_pickrecord(&record[2], D3DOP_TRIANGLE, quad_offset + 52, -3.0f);
/* If the count is wrong, do not populate any records */
memset(&record, 0, sizeof(record));
record_count = 1;
hr = IDirect3DDevice_GetPickRecords(device, &record_count, &record[0]);
I would expect it to write 3 pick records if the input size in record_count is larger than the number retrieved. I.e., if you set record_count = 4 and make the array large enough it should write 3 and leave the 4th untouched. That's the usual pattern for getters like this at least.