Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现如果我在 gluLookAT 之前不使用 glLoadIdentity,那么我会看到空白屏幕。我不明白:为什么?
gluLookAt基本上计算一个由平移(到您指定的眼点)和旋转(以定向它)组成的变换矩阵。然而,这个变换矩阵与当前矩阵相乘。因此,如果当前矩阵不是同一矩阵,您的相机将在其他地方结束,旋转和平移操作将被额外应用。请注意,尽管有名称,但gluLookAt原则上可以用于定位和定向任何对象,而不仅仅是“相机”。
gluLookAt