软件渲染器。在这个项目中,为什么 x,y,z 轴是这样的?

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

在这个项目中(https://github.com/skywind3000/mini3d/blob/master/mini3d.c),当我尝试改变“model”和“view”矩阵时,我发现x轴指向屏幕外,y轴指向左侧,z轴朝上。

这个和左右手坐标不一样system.But我想用左手还是右手coordinate.How来解决?

我找到了答案。

当使用look_at函数构建“view”矩阵时,“world-up”矩阵应该是{0,1,0,1}而不是{0,0,1,1} .

你可以看到这个答案:Understanding glm::lookAt()