right handed matrices

hi, do you know where can i find an implementation of matrix routines like glRotate, gluPerspective… ? i have all my own matrix routines but they are left handed. When i tried to convert them to a right handed system i get some errors i couldnt solve.


Try the Code Of The Day section at flipCode

thank you!
looking at flipcode, looking better at google and looking in the gl specs i could convert the routines… but only one still doesnt work: the lookat. I’d want to know how gluLookAt build its matrix because i cant build the mine using my own lookat routine! with d3d (left handed system) my lookat routine worked right: having the look/up/right vectors and the camera pos i build the correcting matrix. But with gl a cant build it (using look/up/left + pos).
Do you have any idea?


You do not need to modify all your code. You simply need to scale the coordinate system before doing any rendering.

I think you only need to scale z.



glScalef(1,1,-1); //turn into a right-handed coordinate system.
//render my stuff has usual.

and that works right now!
thank you guys!