Skip to content

texture

FreeBodyEngine.core.files.loaders.texture #

TEXTURE_FILE = 'TEXTURE_FILE' module-attribute #

load_texture(file) #

Loads an image file into a Texture. If it was packed into the shared atlas at build time (release builds only, see build/atlas_gen.py), returns a view into that atlas instead of decoding file itself. Otherwise decodes file as a standalone texture; in dev mode, returns the already-registered live Texture for this exact path if one exists rather than creating a new one, and registers a freshly-created one so a later edit can be hot-reloaded in place (see core/files/hot_reload.py) - atlas-backed textures are never registered this way, since dev mode never atlas-packs, so there's nothing there to hot-reload.