Daniel Salvadori 7 лет назад
Родитель
Сommit
28a5f9700e
1 измененных файлов с 19 добавлено и 9 удалено
  1. 19 9
      gls/vbo.go

+ 19 - 9
gls/vbo.go

@@ -37,23 +37,33 @@ const (
 	VertexTangent
 	VertexColor
 	VertexTexcoord
+	VertexTexcoord2
+	SkinWeight
+	SkinIndex
 )
 
 // Map from attribute type to default attribute name.
 var attribTypeNameMap = map[AttribType]string{
-	VertexPosition: "VertexPosition",
-	VertexNormal:   "VertexNormal",
-	VertexTangent:  "VertexTangent",
-	VertexColor:    "VertexColor",
-	VertexTexcoord: "VertexTexcoord",
+	VertexPosition:  "VertexPosition",
+	VertexNormal:    "VertexNormal",
+	VertexTangent:   "VertexTangent",
+	VertexColor:     "VertexColor",
+	VertexTexcoord:  "VertexTexcoord",
+	VertexTexcoord2: "VertexTexcoord2",
+	SkinWeight:      "matricesWeights",
+	SkinIndex:       "matricesIndices",
 }
 
 // Map from attribute type to default attribute size.
 var attribTypeSizeMap = map[AttribType]int32{
-	VertexPosition: 3,
-	VertexNormal:   3,
-	VertexColor:    3,
-	VertexTexcoord: 2,
+	VertexPosition:  3,
+	VertexNormal:    3,
+	VertexTangent:   3, // TODO
+	VertexColor:     3,
+	VertexTexcoord:  2,
+	VertexTexcoord2: 2,
+	SkinWeight:      4,
+	SkinIndex:       4,
 }
 
 // Map from element type to element size (in bytes).