Opengl GLTF 2.0示例框纹理映射问题

Opengl GLTF 2.0示例框纹理映射问题,opengl,texture-mapping,gltf,Opengl,Texture Mapping,Gltf,我分析了示例boxTexture gltf文件并提取了以下数据 00 : position: -0.5,-0.5,0.5, tex_coords: 6,0, 01 : position: 0.5,-0.5,0.5, tex_coords: 5,0, 02 : position: -0.5,0.5,0.5, tex_coords: 6,1, 03 : position: 0.5,0.5,0.5, tex_coords: 5,1, 04 : position: 0.5,0.5,0.5,

我分析了示例boxTexture gltf文件并提取了以下数据

00 : position: -0.5,-0.5,0.5, tex_coords: 6,0,
01 : position: 0.5,-0.5,0.5,  tex_coords: 5,0,
02 : position: -0.5,0.5,0.5,  tex_coords: 6,1,
03 : position: 0.5,0.5,0.5,   tex_coords: 5,1,
04 : position: 0.5,0.5,0.5,   tex_coords: 4,0,
05 : position: 0.5,-0.5,0.5,  tex_coords: 5,0,
06 : position: 0.5,0.5,-0.5,  tex_coords: 4,1,
07 : position: 0.5,-0.5,-0.5, tex_coords: 5,1,
08 : position: -0.5,0.5,0.5,  tex_coords: 2,0,
09 : position: 0.5,0.5,0.5,   tex_coords: 1,0,
10 : position: -0.5,0.5,-0.5, tex_coords: 2,1,
11 : position: 0.5,0.5,-0.5,  tex_coords: 1,1,
12 : position: 0.5,-0.5,0.5,  tex_coords: 3,0,
13 : position: -0.5,-0.5,0.5, tex_coords: 4,0,
14 : position: 0.5,-0.5,-0.5, tex_coords: 3,1,
15 : position: -0.5,-0.5,-0.5,tex_coords: 4,1,
16 : position: -0.5,-0.5,0.5, tex_coords: 3,0,
17 : position: -0.5,0.5,0.5,  tex_coords: 2,0,
18 : position: -0.5,-0.5,-0.5,tex_coords: 3,1,
19 : position: -0.5,0.5,-0.5, tex_coords: 2,1,
20 : position: -0.5,-0.5,-0.5,tex_coords: 0,0,
21 : position: -0.5,0.5,-0.5, tex_coords: 0,1,
22 : position: 0.5,-0.5,-0.5, tex_coords: 1,0,
23 : position: 0.5,0.5,-0.5,  tex_coords: 1,1,

indices:
0,1,2,
3,2,1,
4,5,6,
7,6,5,
8,9,10,
11,10,9,
12,13,14,
15,14,13,
16,17,18,
19,18,17,
20,21,22,
23,22,21,

要生成如下所示的opengl模型

正如您在这里看到的,问题是纹理应用不正确, 这里有什么问题?坐标有问题吗?
我似乎无法准确指出我的错误所在。

顶点数据看起来是正确的。您可以使用单独检查每个访问者来验证。也许你的渲染代码有一个错误-看起来有点像你可能在使用位置属性而不是UV?酷,让我检查一下,看看我的渲染代码中是否有任何错误。非常感谢,这确实是我的渲染代码的问题。未正确设置VertexAttribute指针。顶点数据看起来正确。您可以使用单独检查每个访问者来验证。也许你的渲染代码有一个错误-看起来有点像你可能在使用位置属性而不是UV?酷,让我检查一下,看看我的渲染代码中是否有任何错误。非常感谢,这确实是我的渲染代码的问题。没有正确设置VertexAttribute指针。