MCPcopy
hub / github.com/g3n/engine / addAttributeToVBO

Method addAttributeToVBO

loader/gltf/loader.go:622–630  ·  view source on GitHub ↗

addAttributeToVBO adds the appropriate attribute to the provided vbo based on the glTF attribute name.

(vbo *gls.VBO, attribName string, byteOffset uint32)

Source from the content-addressed store, hash-verified

620
621// addAttributeToVBO adds the appropriate attribute to the provided vbo based on the glTF attribute name.
622func (g *GLTF) addAttributeToVBO(vbo *gls.VBO, attribName string, byteOffset uint32) {
623
624 aType, ok := AttributeName[attribName]
625 if !ok {
626 log.Warn(fmt.Sprintf("Attribute %v is not supported!", attribName))
627 return
628 }
629 vbo.AddAttribOffset(aType, byteOffset)
630}
631
632// validateAccessorAttribute validates the specified accessor for the given attribute name.
633func (g *GLTF) validateAccessorAttribute(ac Accessor, attribName string) error {

Callers 1

loadAttributesMethod · 0.95

Calls 2

WarnMethod · 0.80
AddAttribOffsetMethod · 0.80

Tested by

no test coverage detected