Original Post
I have a sample application (from "Multiplayer Game Programming") that uses DirectX 8 as the basis of the 3D rendering engine. During initialization, it sets the VIEW and PROJECTION matrices using the SetTransform function. This particular demo never calls the GetTransform function.
Then I took the Pick demo application that came with the DirectX 8.1 SDK, and tried to integrate the Pick function into the existing application. Pick uses GetTransform as part of the process of generating a ray that corresponds to the location the user clicked on. But when I call GetTransform, the HRESULT returned is D3DERR_INVALIDCALL, which is supposed to mean that one of the parameters is incorrect.
After some work, I found that even if I call GetTransform immediately after calling SetTransform, with the exact same arguments, the error code is still returned. (The SetTransform call is successful.) But the Pick Demo doesn''t have this problem.
Does anyone know if there could be a problem with my Device that would cause this problem? Or if there''s some other initialization step that has to be done before any of the Transform matrices can be read back? (Maybe the D3DTS_WORLD matrix needs to be set?) Dunno.
Thanks,
--Domenic