(c *converter) bufferViewImage ( src *gltf.Document, index uint32, dst *gltf.Document) (uint32, string, error) { bv := src.BufferViews[index ] buf, err := modeler.ReadBufferView(src, bv ) if err != nil { // error handling } // reduction & GPU native texture encoding converted, mimeType, err := converter.Convert(buf ) if err != nil { // error handling } newIndex := modeler.WriteBufferView(dst, gltf.TargetNone, converted ) return newIndex, mimeType, nil }