Hi,
It's again me... i know ^^
I tried to load additional data into my Irrlicht application with the pthreads lib while the mine thread displays a landscape and while the camera is just moving a little bit... nothing very complicated... when trying to load additional data... i get a really heavy performance impact (FPS at 0 from around 100) so my question is... how are the pros managing that... are they loading everything into memory before the game starts? I am especially referring to games like Far Cry... I think everyone knows the huge islands... or swg... when you run around in the nature you normally don't notice any loading...
Thanks in advance for any hints... R2
Loading additional data in realtime?
Loading additional data in realtime?
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
I'm not sure I completely understand what exactly your trying to do with loading the data. But you may want to take a look at the source from the Feburary 2005 GDM, it contains an article on late-binding data and from reading the article over again it might be what your trying to do. You can find the source for it here :: http://www.gdmag.com/code.htm :: Hope this helps you 

Yes mm765 i want to load especially models. I don't synchronize it because i didn't think that it's necessary for such a small example.
I will have a look at it AlexL
I will have a look at it AlexL
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
hmm...too bad you didnt say which driver you are using because with what you wrote im a bit confused.
using the pthread-lib hints at linux but then if you would use opengl your app would prolly crash if you try to load something with a texture while youre rendering because the loading thread couldnt use the same opengl-context if you didnt change your irrlicht-lib to make it a shared context and so on.
but you could also use pthread-win32 and use directx which then would probably halt the rendering if a texture gets loaded while rendering until the texture is fully loaded (which would explain your 0 fps).
and of course it could be you made it so that your loading thread only runs while youre not rendering (which i meant with synchronizing) which would make using threads quite senseless
soo..which one is it ?
using the pthread-lib hints at linux but then if you would use opengl your app would prolly crash if you try to load something with a texture while youre rendering because the loading thread couldnt use the same opengl-context if you didnt change your irrlicht-lib to make it a shared context and so on.
but you could also use pthread-win32 and use directx which then would probably halt the rendering if a texture gets loaded while rendering until the texture is fully loaded (which would explain your 0 fps).
and of course it could be you made it so that your loading thread only runs while youre not rendering (which i meant with synchronizing) which would make using threads quite senseless

soo..which one is it ?
Sorry... i totally forgot to mention it... i am using Direct X 9.0...
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
the problem then is the texture locking which is hard to work around in directx with irrlicht. it is easier for opengl (a solution for opengl is included in nx) .
so if you can live with using opengl id suggest using it.
if you need directx then you need to change the dx-texture-class so that it holds a buffer with the image and doesnt directly upload the texture upon loading from disk but at the point it is used.
so if you can live with using opengl id suggest using it.
if you need directx then you need to change the dx-texture-class so that it holds a buffer with the image and doesnt directly upload the texture upon loading from disk but at the point it is used.