相应地,如果您需要将立方体正面的左下角映射到纹理的左下角,必须将纹理坐标(0,1)指派给顶点0。
Accordingly, if you want to map the lower left corner (-1, -1) of the cube's front face to the texture's lower left corner, you must assign the texture coordinates (0, 1) to vertex 0.
通过这样的方式,也就隐式地将立方体的外部定义为正面,而将内部作为背面。
This way, I implicitly defined the outside of the cube as the front face and the inside as the back face.
如果立方体有一个半掩的盖子,您同时可看到其正面和背面,此时同时渲染两面的操作非常有用。
The latter is useful if the cube has a half-open lid and you can see both inside and outside at the same time.
应用推荐