In this exercise, the vertices themselves are not the problem. The first
triangle is the one that appears on the screen. You can verify this by
commenting out this triangle and seeing that nothing then appears. The second
triangle is then the one that's causing problems. We've been told the triangle
disappears when culling is turned on, so it's probably the vertex order. By
swapping any two of these indices. You reverse the order of the triangle. Here
I've swapped the first two. Doing this solves the problem and gives us the right
answer.
この練習で頂点そのものは問題ではありません
最初の三角形が画面に表示されることは
この三角形をコメントアウトしたあと
非表示になることで検証できます
よって問題の原因は第2の三角形だと分かります
カリングが有効だと三角形は消えるため
頂点の順序が問題でしょう
3つのインデックスのうち2つを交換すると
三角形の順序は逆になります
私は最初の2つを交換しました
これで問題が解決し正しい答えが得られます
這個作業的問題不在頂點
第一個三角形是螢幕上出現的
你可以嘗試註解掉第一個三角形,這樣螢幕上會沒東西
第二個是有問題的
當背面剔除啟動時它就會消失,所以應該是頂點順序錯了
調換任兩個索引就能翻轉這個三角形
我掉換前兩個,這樣就能得到正確答案