[PATCH 3/3] d3drm: Enum all materials even if only the first one is handled.
Christian Costa
titan.costa at gmail.com
Sun Oct 21 07:51:32 CDT 2012
---
dlls/d3drm/meshbuilder.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
index 180a8a9..22efb00 100644
--- a/dlls/d3drm/meshbuilder.c
+++ b/dlls/d3drm/meshbuilder.c
@@ -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);
if (nb_materials > 1)
- {
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))
{
@@ -1256,6 +1253,14 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData)
LPDIRECT3DRMMATERIAL2 material;
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);
if (FAILED(hr))
{
More information about the wine-patches
mailing list