On Mon Mar 24 12:22:58 2025 +0000, Matteo Bruni wrote:
This is a bit awkward. For cube textures, this should be `IDirect3DCubeTexture9_GetLevelDesc((IDirect3DCubeTexture9 *)src_texture, ...` In practice the two `GetLevelDesc()` methods match in position in the respective vtbls and signature, so this works, but it's still technically a "bad" cast and it looks suspicious at first glance. I'd prefer to do this "by the book" and duplicate the `GetLevelDesc()` call for the two cases.
I just used `IDirect3DSurface9_GetDesc(src_surface, &src_surface_desc);` here on the surface instead of doing a separate call for each texture type, hopefully that's fine as well. I can change if it doing the separate calls makes the code clearer.