我已经在 X3D 中定义了一些面,并试图为它们分配颜色。我有下面的代码,但是当我加载模型时,什么都没有出现,它只显示“硬件缓冲”。当我摆脱与颜色定义相关的部分时,它加载正常(并且形状正确)。有什么想法吗?谢谢!
<x3d>
<Scene>
<Group>
<Transform translation="0 1.829 0">
<Transform center="0 -1.829 0" rotation="0.0000 0.0000 -1.0000 1.5708" translation="18.288 -3.658 11.582">
<Transform center="0 -1.829 0" rotation="0 1 0 0.0000">
<Shape>
<Appearance><Material diffuseColor="0.0000 0.0000 1.0000"/></Appearance>
<IndexedFaceSet solid='true' coordIndex='0 1 2 3 -1 7 6 5 4 -1 0 4 5 1 -1 1 5 6 2 -1 2 6 7 3 -1 3 7 4 0 -1'>
<Coordinate point='-0.004 1.829 0.174 0.004 1.829 0.174 0.004 1.829 -0.174 -0.004 1.829 -0.174 -0.004 -1.829 0.174 0.004 -1.829 0.174 0.004 -1.829 -0.174 -0.004 -1.829 -0.174'/>
</IndexedFaceSet>
</Shape>
<Shape>
<Appearance><Material/></Appearance>
<IndexedFaceSet colorPerVertex='false' solid='true' colorIndex='1 1 0 1 1 1' coordIndex='0 1 2 3 -1 7 6 5 4 -1 0 4 5 1 -1 1 5 6 2 -1 2 6 7 3 -1 3 7 4 0 -1'>
<Color color="0.8627 0.8627 0.8627 0.0000 0.0000 1.0000"/>
<Coordinate point='-0.1015 1.829 0.174 0.1015 1.829 0.174 0.1015 1.829 0.16 -0.1015 1.829 0.16 -0.1015 -1.829 0.174 0.1015 -1.829 0.174 0.1015 -1.829 0.16 -0.1015 -1.829 0.16'/>
</IndexedFaceSet>
</Shape>
</Transform>
</Transform>
</Transform>
</Group>
</Scene>
</x3d>