MCPcopy Index your code
hub / github.com/EngoEngine/engo / Load

Method Load

common/texture_atlas.go:65–73  ·  view source on GitHub ↗

Load will load the xml file and the main image as well as add references for sub textures/images in engo.Files, subtextures keep their path url (with appended extension from main image path if it does not exist), the main image is loaded in reference to the directory of the xml file For example this

(url string, data io.Reader)

Source from the content-addressed store, hash-verified

63// can be retrieved with this go code
64// texture, err := common.LoadedSprite("subimg.png")
65func (t *textureAtlasLoader) Load(url string, data io.Reader) error {
66 atlas, err := createAtlasFromXML(data, url)
67 if err != nil {
68 return err
69 }
70
71 t.atlases[url] = atlas
72 return nil
73}
74
75// Unload removes the preloaded atlass from the cache and clears
76// references to all SubTextures from the image loader

Callers

nothing calls this directly

Calls 1

createAtlasFromXMLFunction · 0.85

Tested by

no test coverage detected