This might very well be a problem that it totally on my side. I just would like to ask you if there might be concerns in general. ok uhm:
In the editor I am currently building I implemented a loading routine for textures when you switch game scenes or dragn drop textures from the Asset browser to a scene. Currently there is only a Skydome that receives these. The loading routine automaticly loads Normal and Paralax maps if files with specified suffixes exists.
I put this loading routine into another Thread so that loading can happen in the background without freezing the main application. I am of course aware that Threads are always a big can of worms and I spent the last hours trying to find out if in any case a Texture could be in a loading process WHILE the rendering process tries to access it. And I think that shouldnt be the case.
Oh, the problem is random access violations that only happen sometimes when I keep switching quickly between scenes, forcing constant texture clearing and loading. I failed to catch these exceptions. They don't seem to happen directly in my extra thread. Debug window only gives me gpu drivers as the location.
So long story short, what I wanted to ask:
Is loading textures (including special types like ambient and paralax) in an extra thread and rendering other stuff in the main thread, in general something that should work with Afterwarp? Or would you say that this is something that should rather be avoided?
In the editor I am currently building I implemented a loading routine for textures when you switch game scenes or dragn drop textures from the Asset browser to a scene. Currently there is only a Skydome that receives these. The loading routine automaticly loads Normal and Paralax maps if files with specified suffixes exists.
I put this loading routine into another Thread so that loading can happen in the background without freezing the main application. I am of course aware that Threads are always a big can of worms and I spent the last hours trying to find out if in any case a Texture could be in a loading process WHILE the rendering process tries to access it. And I think that shouldnt be the case.
Oh, the problem is random access violations that only happen sometimes when I keep switching quickly between scenes, forcing constant texture clearing and loading. I failed to catch these exceptions. They don't seem to happen directly in my extra thread. Debug window only gives me gpu drivers as the location.
So long story short, what I wanted to ask:
Is loading textures (including special types like ambient and paralax) in an extra thread and rendering other stuff in the main thread, in general something that should work with Afterwarp? Or would you say that this is something that should rather be avoided?

Comment