marciano wrote:
cantele wrote:
What's even more weird: I cannot create that texture later on - it is "in use" or "exists" (shows in the log), even though it was never found in the first place. It can be found as a texture resource with the correct name. Unloading it returns true, no matter how many times I unload it (meaning it's unloaded?). However it cannot be found by querying unloaded resources after unloading (does this mean it's unqueriable by default, and why?).
The material loaded by the pipeline creates a new texture resource if it is not yet existing. Unloading is not the same as removing but I think that's clear. I'm not sure why it does not show up when using queryUnloadedResource. Could you debug into the function to see what's going on?
I just ran into this problem as well, while generating textures. It turns out that the constructor for Texture2DResource erroneously sets
_loaded = true (egTextures.cpp, line 172, when this should be set instead when the texture data is loaded. I have fixed this so that the constructor only sets
_loaded = true if the texture is renderable - you can find the fix in SVN.