Matteo Bruni (@Mystral) commented about dlls/d3dx10_43/texture.c:
- out->Height = D3DX10_DEFAULT;
- out->Depth = D3DX10_DEFAULT;
- out->FirstMipLevel = D3DX10_DEFAULT;
- out->MipLevels = D3DX10_DEFAULT;
- out->Usage = D3DX10_DEFAULT;
- out->BindFlags = D3DX10_DEFAULT;
- out->CpuAccessFlags = D3DX10_DEFAULT;
- out->MiscFlags = D3DX10_DEFAULT;
- out->Format = D3DX10_DEFAULT;
- out->Filter = D3DX10_DEFAULT;
- out->MipFilter = D3DX10_DEFAULT;
- out->pSrcInfo = NULL;
+}
+HRESULT create_resource_data(const void *data, SIZE_T size, D3DX10_IMAGE_LOAD_INFO *load_info,
D3D10_SUBRESOURCE_DATA **resource_data)
load_texture_data() / load_resource_data()?
We might consider introducing of our own structure for storing texture data, like e.g.: ``` struct texture_data { unsigned int row_pitch, slice_pitch; BYTE *data; }; ``` instead of sort-of abusing D3D10_SUBRESOURCE_DATA by attaching the data at the end. Otherwise, probably a comment explaining that this function is returning an "object" combining a D3D10_SUBRESOURCE_DATA header with the actual texture data would be nice.