[fpc-pascal] GLM library alternative?

Ryan Joseph ryan at thealchemistguild.com
Mon May 29 04:22:42 CEST 2017


> On May 28, 2017, at 10:33 PM, Ryan Joseph <ryan at thealchemistguild.com> wrote:
> 
> 	projTransform := TMatrix4x4.CreatePerspective(60.0, 500 / 500, 0.1, 10.0);
> 	modelTransform := TMatrix4x4.CreateTranslation(0, 0, -3.0) * TMat4.CreateRotateX(54);

I found out the problem. I was expecting the multiply to work like with GLM where you could do: 

translation * rotation

but with the operator overloads I need to do protation * translation. Anthony’s multiply matrix 4 operators did this in the order I expected and how I figured it out. Not sure why and it’s probably not safe to swap the parameters because it would likely break other parts of the unit.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list