d3drm: Implement SetTextureCoordinates.
This commit is contained in:
parent
b89c32b2a1
commit
7a320e5ca4
|
@ -681,9 +681,10 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetTextureCoordinates(IDirect3
|
|||
{
|
||||
IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface);
|
||||
|
||||
FIXME("(%p)->(%f,%f): stub\n", This, u, v);
|
||||
TRACE("(%p)->(%u,%f,%f)\n", This, index, u, v);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return IDirect3DRMMeshBuilder3_SetTextureCoordinates(&This->IDirect3DRMMeshBuilder3_iface,
|
||||
index, u, v);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetVertexColor(IDirect3DRMMeshBuilder2* iface,
|
||||
|
@ -1555,9 +1556,15 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetTextureCoordinates(IDirect3
|
|||
{
|
||||
IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder3(iface);
|
||||
|
||||
FIXME("(%p)->(%f,%f): stub\n", This, u, v);
|
||||
TRACE("(%p)->(%u,%f,%f)\n", This, index, u, v);
|
||||
|
||||
return E_NOTIMPL;
|
||||
if (index >= This->nb_coords2d)
|
||||
return D3DRMERR_BADVALUE;
|
||||
|
||||
This->pCoords2d[index].u = u;
|
||||
This->pCoords2d[index].v = v;
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetVertexColor(IDirect3DRMMeshBuilder3* iface,
|
||||
|
|
|
@ -210,15 +210,17 @@ static void test_MeshBuilder(void)
|
|||
|
||||
valu = 1.23f;
|
||||
valv = 3.21f;
|
||||
hr = IDirect3DRMMeshBuilder_SetTextureCoordinates(pMeshBuilder, 1, valu, valv);
|
||||
todo_wine ok(hr == D3DRM_OK, "Cannot set texture coordinates (hr = %x)\n", hr);
|
||||
hr = IDirect3DRMMeshBuilder_SetTextureCoordinates(pMeshBuilder, 0, valu, valv);
|
||||
ok(hr == D3DRM_OK, "Cannot set texture coordinates (hr = %x)\n", hr);
|
||||
hr = IDirect3DRMMeshBuilder_SetTextureCoordinates(pMeshBuilder, 4, valu, valv);
|
||||
ok(hr == D3DRMERR_BADVALUE, "Should fail and return D3DRM_BADVALUE (hr = %x)\n", hr);
|
||||
|
||||
valu = 0.0f;
|
||||
valv = 0.0f;
|
||||
hr = IDirect3DRMMeshBuilder_GetTextureCoordinates(pMeshBuilder, 1, &valu, &valv);
|
||||
todo_wine ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr);
|
||||
todo_wine ok(valu == 1.23f, "Wrong coordinate %f (must be 1.23)\n", valu);
|
||||
todo_wine ok(valv == 3.21f, "Wrong coordinate %f (must be 3.21)\n", valv);
|
||||
hr = IDirect3DRMMeshBuilder_GetTextureCoordinates(pMeshBuilder, 0, &valu, &valv);
|
||||
ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr);
|
||||
ok(valu == 1.23f, "Wrong coordinate %f (must be 1.23)\n", valu);
|
||||
ok(valv == 3.21f, "Wrong coordinate %f (must be 3.21)\n", valv);
|
||||
|
||||
IDirect3DRMMeshBuilder_Release(pMeshBuilder);
|
||||
|
||||
|
@ -353,15 +355,17 @@ static void test_MeshBuilder3(void)
|
|||
|
||||
valu = 1.23f;
|
||||
valv = 3.21f;
|
||||
hr = IDirect3DRMMeshBuilder3_SetTextureCoordinates(pMeshBuilder3, 1, valu, valv);
|
||||
todo_wine ok(hr == D3DRM_OK, "Cannot set texture coordinates (hr = %x)\n", hr);
|
||||
hr = IDirect3DRMMeshBuilder3_SetTextureCoordinates(pMeshBuilder3, 0, valu, valv);
|
||||
ok(hr == D3DRM_OK, "Cannot set texture coordinates (hr = %x)\n", hr);
|
||||
hr = IDirect3DRMMeshBuilder3_SetTextureCoordinates(pMeshBuilder3, 4, valu, valv);
|
||||
ok(hr == D3DRMERR_BADVALUE, "Should fail and return D3DRM_BADVALUE (hr = %x)\n", hr);
|
||||
|
||||
valu = 0.0f;
|
||||
valv = 0.0f;
|
||||
hr = IDirect3DRMMeshBuilder3_GetTextureCoordinates(pMeshBuilder3, 1, &valu, &valv);
|
||||
todo_wine ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr);
|
||||
todo_wine ok(valu == 1.23f, "Wrong coordinate %f (must be 1.23)\n", valu);
|
||||
todo_wine ok(valv == 3.21f, "Wrong coordinate %f (must be 3.21)\n", valv);
|
||||
hr = IDirect3DRMMeshBuilder3_GetTextureCoordinates(pMeshBuilder3, 0, &valu, &valv);
|
||||
ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr);
|
||||
ok(valu == 1.23f, "Wrong coordinate %f (must be 1.23)\n", valu);
|
||||
ok(valv == 3.21f, "Wrong coordinate %f (must be 3.21)\n", valv);
|
||||
|
||||
IDirect3DRMMeshBuilder3_Release(pMeshBuilder3);
|
||||
IDirect3DRM3_Release(pD3DRM3);
|
||||
|
|
Loading…
Reference in New Issue