I'm creating a DirectX renderer for a project I previously made in OpenGL, reusing the glm library would be really useful.
Is it possible to convert the glm::lookAt matrix to work with DirectX, I have tried the following but the matrix created by DirectX Math Library is different
D3DXMatrixLookAtLH( &matView,
&D3DXVECTOR3( 0.0f, 3.0f, 5.0f ),
&D3DXVECTOR3( 0.0f, 0.0f, 0.0f ),
&D3DXVECTOR3( 0.0f, 1.0f, 0.0f ) );
glm::mat4 gmatView = glm::lookAt( glm::vec3( 0.0f, 3.0f, 5.0f ),
glm::vec3( 0.0f, 0.0f, 0.0f ),
glm::vec3( 0.0f, 1.0f, 0.0f ) );
float* pt = glm::value_ptr( gmatView );
D3DXMATRIX matGLConvertView = D3DXMATRIX( pt );
Thanks