d3drm: Pass mesh builder color to newly created mesh.

This commit is contained in:
Christian Costa 2012-06-04 19:31:08 +02:00 committed by Alexandre Julliard
parent b7a74b0204
commit 23db9d8bed
2 changed files with 3 additions and 1 deletions

View File

@ -2021,6 +2021,8 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_CreateMesh(IDirect3DRMMeshBuil
hr = E_OUTOFMEMORY; hr = E_OUTOFMEMORY;
} }
} }
if (SUCCEEDED(hr))
hr = IDirect3DRMMesh_SetGroupColor(*mesh, 0, This->color);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
hr = IDirect3DRMMesh_SetGroupMaterial(*mesh, 0, (LPDIRECT3DRMMATERIAL)This->material); hr = IDirect3DRMMesh_SetGroupMaterial(*mesh, 0, (LPDIRECT3DRMMATERIAL)This->material);
if (FAILED(hr)) if (FAILED(hr))

View File

@ -369,7 +369,7 @@ static void test_MeshBuilder(void)
todo_wine ok(nb_face_vertices == 3, "Wrong number of vertices per face %u (must be 3)\n", nb_face_vertices); todo_wine ok(nb_face_vertices == 3, "Wrong number of vertices per face %u (must be 3)\n", nb_face_vertices);
todo_wine ok(data_size == 3, "Wrong number of face data bytes %u (must be 3)\n", data_size); todo_wine ok(data_size == 3, "Wrong number of face data bytes %u (must be 3)\n", data_size);
color = IDirect3DRMMesh_GetGroupColor(mesh, 0); color = IDirect3DRMMesh_GetGroupColor(mesh, 0);
todo_wine ok(color == 0xff00ff00, "Wrong color returned %#x instead of %#x\n", color, 0xff00ff00); ok(color == 0xff00ff00, "Wrong color returned %#x instead of %#x\n", color, 0xff00ff00);
hr = IDirect3DRMMesh_GetGroupTexture(mesh, 0, &texture); hr = IDirect3DRMMesh_GetGroupTexture(mesh, 0, &texture);
ok(hr == D3DRM_OK, "GetCroupTexture failed returning hr = %x\n", hr); ok(hr == D3DRM_OK, "GetCroupTexture failed returning hr = %x\n", hr);
ok(texture == NULL, "No texture should be present\n"); ok(texture == NULL, "No texture should be present\n");