D3D9 crew - getting position of object rendered by DrawIndexedPrimitive?

Discussion in 'OT Technology' started by Nader_D, Aug 24, 2008.

  1. Nader_D

    Nader_D HAHAHEHHUH ---- POOOHhHhHHCHhh! OT Supporter

    Joined:
    Oct 31, 2005
    Messages:
    88,288
    Likes Received:
    0
    Location:
    Ottawa, Canada
    What is the correct method of finding the location of an object rendered by DrawIndexedPrimitive?

    I have tried using GetTransform and hooking SetTransform, but they always return a matrix of:

    1000
    0100
    0010
    0001

    Here is an example of my SetTransform hook:

    HRESULT APIENTRY hkIDirect3DDevice9::SetTransform(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX *pMatrix)
    {
    if (State == D3DTS_WORLD){
    m_pMatrix = pMatrix;
    }
    return m_pD3Ddev->SetTransform(State, pMatrix);
    }

    The value of m_pMatrix is then output when DrawIndexedPrimitive() is rendering a specific model rec, but the value of m_pMatrix is not the expected value.
     

Share This Page