How to add few texcoords for one vertex? I did a simple cube.
geom_format = GeomVertexFormat.getV3n3c4t2()
vdata = GeomVertexData('unnamed_cube', geom_format, Geom.UHStatic)
vdata.setNumRows(8)
vertex = GeomVertexWriter(vdata, 'vertex')
normal = GeomVertexWriter(vdata, 'normal')
color = GeomVertexWriter(vdata, 'color')
texcoord = GeomVertexWriter(vdata, 'texcoord')
vertex.addData3f(-x, -y, -z) # 0
normal.addData3f(0, 0, 1)
color.addData4f(1, 0, 0, 1)
texcoord.addData2f(0.25, 0.33)
vertex.addData3f(x, -y, -z) # 1
normal.addData3f(0, 0, 1)
color.addData4f(1, 0, 0, 1)
texcoord.addData2f(0.5, 0.33)
vertex.addData3f(x, y, -z) # 2
normal.addData3f(0, 0, 1)
color.addData4f(1, 0, 0, 1)
texcoord.addData2f(0.5, 0.66)
vertex.addData3f(-x, y, -z) # 3
normal.addData3f(0, 0, 1)
color.addData4f(1, 0, 0, 1)
texcoord.addData2f(0.25, 0.66)
vertex.addData3f(-x, -y, z) # 4
normal.addData3f(0, 0, 1)
color.addData4f(1, 0, 0, 1)
texcoord.addData2f(0.0, 0.33)
texcoord.addData2f(1.0, 0.33)
texcoord.addData2f(0.25, 0.0)
vertex.addData3f(x, -y, z) # 5
normal.addData3f(0, 0, 1)
color.addData4f(1, 0, 0, 1)
texcoord.addData2f(0.75, 0.33)
texcoord.addData2f(0.5, 0.0)
vertex.addData3f(x, y, z) # 6
normal.addData3f(0, 0, 1)
color.addData4f(1, 0, 0, 1)
texcoord.addData2f(0.75, 0.66)
texcoord.addData2f(0.5, 1.0)
vertex.addData3f(-x, y, z) # 7
normal.addData3f(0, 0, 1)
color.addData4f(1, 0, 0, 1)
texcoord.addData2f(1.0, 0.66)
texcoord.addData2f(0.0, 0.66)
texcoord.addData2f(0.25, 1.0)
primitive = GeomTriangles(Geom.UHStatic)
primitive.addVertices(0, 4, 5) # 1
primitive.addVertices(0, 5, 1) # 2
primitive.addVertices(1, 5, 6) # 3
primitive.addVertices(1, 6, 2) # 4
primitive.addVertices(2, 6, 7) # 5
primitive.addVertices(2, 7, 3) # 6
primitive.addVertices(3, 7, 4) # 7
primitive.addVertices(3, 4, 0) # 8
primitive.addVertices(4, 7, 6) # 9
primitive.addVertices(4, 6, 5) # 10
primitive.addVertices(3, 0, 1) # 11
primitive.addVertices(3, 1, 2) # 12
primitive.closePrimitive()
geom = Geom(vdata)
geom.addPrimitive(primitive)
self.node = GeomNode('gnode')
self.node.addGeom(geom)