cgmath
cgmath copied to clipboard
Left-handed perspective matrix
It'd be nice if cgmath could create both left and right-handed perspective matrices. Currently it only does right-handed. Direct3D has different functions: D3DXMatrixPerspectiveLH and D3DXMatrixPerspectiveRH. As far as I know, everything else in cgmath works for both left and right-handed systems.
This would be pretty easy to implement, but it would be important to be really clear about the convention to avoid confusion
something like this maybe?
{
let mut mat = cgmath::perspective(...);
mat[2][2] *= -1;
mat
}
(not sure if I got the correct matrix index there)