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.
假设我有一个由多个三角形组成的多边形(一个长矩形),使用GL_TRIANGLE_STRIP.
GL_TRIANGLE_STRIP
现在想象我有一个正方形纹理,应该映射到构成矩形的每个小正方形上。我该如何做到这一点?
您需要沿几何体重复纹理。为此,您需要将纹理设置GL_TEXTURE_WRAP_S为GL_REPEAT.
GL_TEXTURE_WRAP_S
GL_REPEAT
然后你可以为你的顶点分配纹理坐标: