d3drm: Enum all materials even if only the first one is handled.
This commit is contained in:
parent
5e1d854ee5
commit
466c244d18
|
@ -1244,10 +1244,7 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData)
|
||||||
WARN("Returned size %u does not match expected one %u\n", size, data_size);
|
WARN("Returned size %u does not match expected one %u\n", size, data_size);
|
||||||
|
|
||||||
if (nb_materials > 1)
|
if (nb_materials > 1)
|
||||||
{
|
|
||||||
FIXME("Only one material per mesh supported, first one applies to all faces\n");
|
FIXME("Only one material per mesh supported, first one applies to all faces\n");
|
||||||
nb_materials = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (SUCCEEDED(hr = IDirectXFileData_GetNextObject(pData2, &child)) && (i < nb_materials))
|
while (SUCCEEDED(hr = IDirectXFileData_GetNextObject(pData2, &child)) && (i < nb_materials))
|
||||||
{
|
{
|
||||||
|
@ -1256,6 +1253,14 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData)
|
||||||
LPDIRECT3DRMMATERIAL2 material;
|
LPDIRECT3DRMMATERIAL2 material;
|
||||||
LPDIRECTXFILEOBJECT material_child;
|
LPDIRECTXFILEOBJECT material_child;
|
||||||
|
|
||||||
|
if (i >= 1)
|
||||||
|
{
|
||||||
|
/* FIXME: Only handle first material but enum all of them */
|
||||||
|
IDirectXFileObject_Release(child);
|
||||||
|
i++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
hr = IDirectXFileObject_QueryInterface(child, &IID_IDirectXFileData, (void **)&data);
|
hr = IDirectXFileObject_QueryInterface(child, &IID_IDirectXFileData, (void **)&data);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue