Slide 20
Slide 20 text
Cluster, Inc. All Rights Reserved.
reduction/GPU native texture
20
func (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
}