About the usage of lock and unlock.
Posted: Fri Oct 17, 2014 1:31 am
First of all, this is just a theoretical question, but involves the functionality of the engine.
It is noticeable that as time goes by, one of the largest bottlenecks of our applications will be the loading times, where resources that aren't directly streamed (some stream friendly support would be a great adition) will have to be loaded at once, meaning that the whole program will, in the best case, reduce its pace to load the assets, this becomes specially problematic when loading the textures, as they are larger files in comparison to the meshes, getting worse, as the size of the texture increases.
Obviously, for this, it is sensible to use a format which can be streamed somehow, and these are the questions.
When i ask Irrlicht to create a texture, to add a texture to the video driver, (not to load a texture nor to create a rendertarget texture) it does also create its mip levels, right?
If so, Then, the next step is to fill the levels, but filling the lower levels first would provide information for the later levels to display something? I mean, We have seen in many places how this works, First the objects have blurry textures, and as time goes by, the textures are progressively loaded. Is it possible using lock and unlock to do something the like in Irrlicht or the textures would appear black until the last mip level was loaded?
Obviously i wouldn't lock inside the render loop, but locking and unlocking outside it would upload the diferent mip levels to the video card properly or this can't happen if the texture is in use?
It is noticeable that as time goes by, one of the largest bottlenecks of our applications will be the loading times, where resources that aren't directly streamed (some stream friendly support would be a great adition) will have to be loaded at once, meaning that the whole program will, in the best case, reduce its pace to load the assets, this becomes specially problematic when loading the textures, as they are larger files in comparison to the meshes, getting worse, as the size of the texture increases.
Obviously, for this, it is sensible to use a format which can be streamed somehow, and these are the questions.
When i ask Irrlicht to create a texture, to add a texture to the video driver, (not to load a texture nor to create a rendertarget texture) it does also create its mip levels, right?
If so, Then, the next step is to fill the levels, but filling the lower levels first would provide information for the later levels to display something? I mean, We have seen in many places how this works, First the objects have blurry textures, and as time goes by, the textures are progressively loaded. Is it possible using lock and unlock to do something the like in Irrlicht or the textures would appear black until the last mip level was loaded?
Obviously i wouldn't lock inside the render loop, but locking and unlocking outside it would upload the diferent mip levels to the video card properly or this can't happen if the texture is in use?