On Fri Mar 15 19:02:21 2024 +0000, Zebediah Figura wrote:
Generally speaking, if you can get another interface via QueryInterface(), that other interface belongs to the same object. Interface querying is supposed to be transitive, reflexive, and symmetric, and while you *can* do that with two separate objects [and it's necessary for aggregation] it's strongly implies that you should be using multiple interfaces on the same object.
Thanks, that makes sense but in this case it complicates how to handle the behavior of the function, especially in `d3d9_device_QueryInterface`. It's much simpler to check if the d3d9on12 object is null before doing a QueryInterface.
Also, in the same function, how would you check the pD3D12Device value to see if it matches the d3d9 device if there's no d3d9on12 object in struct d3d9?