I think I came up with a solution.
Every time I changed the Skeleton object, I loaded a new .atlas
file. For some reason libgdx or OpenGL does not like that and the textures didn't get loaded. I also got the following error:
E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
The trick was to load all the atlases in the create()
-function, before anything gets rendered. I'm storing them in a Map
and getting them when needed.
I'm not sure how efficient that is memorywise in the long run if the atlases get big and plenty, but it'll do for now.