简体   繁体   中英

sofeware renderer. In this project, why the x,y,z axis like this?

in this project ( https://github.com/skywind3000/mini3d/blob/master/mini3d.c ),when I try to change "model" and "view" matrix,I find the x axis pointing out of the screen,the y axis pointing left,and the z axis pointing up.

This is different from the left and right hand coordinate system.But I want to use left or right hand coordinate.How to fix it?

I find the answer.

When use look_at function to build a "view" matrix,the "world-up" matrix should be {0,1,0,1} but not {0,0,1,1}.

you can see this answer: Understanding glm::lookAt()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM