   Memory
  every time i load a model from a file it takes huge amounts of memory from the app like 6mb memory to load a single model pls tell me if this is natural or is there is something wrong with my code.   
  Well that kinda depends, what model format are you using? How many vertices are there, etc. But you're probably doing just fine.   ;  its a .x file here is a link http:www.almarwa.org\SnowMan.rar try loading the model your self and tell me what happend   ;  Uh, I don't particulary have any of my own code that's able to view .x files although meshview seems to eat up about 600k when loading it so yeah 6mb seems a bit heavy then.   ;  the mesh viewer that came with directX takes about 7mb opening so i think its my machine ;) thats better than the code being the problem.   ;Quote:Original post by Black Acethe mesh viewer that came with directX takes about 7mb opening so i think its my machine ;) thats better than the code being the problem.Yeah, meshview without opening anything takes about 6mb. or 6.7 when opening that file.;  no i was talking about the change in memory i opend it manualy it was 7 when i opened it then changed to 14 when i loaded the mesh 14-7 = 7MB and i tried using LoadTextureEX it minmized the memory usage to about 5mb can u tell me whats the Major diffrence between the two   ;  Unless you have written your own code to parse the .x file and build up the in memory representation, and its really inefficient, its probably not actually taking that much memory to load that specific file.  I would theorize that the memory use you are seeing it probably from the system loading dlls for you.  Try loading two models and see if the second one uses up another 7mb.  If its a lot more reasonable (a few hundred kb maybe) then its just system overhead and nothing to worry about.Alan   ;  yeah i tried loading the same model twice it took double the memory jumped from 14 to 21 MB i kinda know whats the problem CreateTextureFromFile Takes way too much memory cause all the parmatrs are set to defualt on the other hand you have CreateTextureFromFileEx which you can specify all the parametrs so i cut down the usage to 1.5MB instead of 7MB if you have any ideas to improve this tell me   ;  Do note that the D3DX system itself (as well as other libraries) consume it's own piece of memory when it's loaded in your application's memory space.That said, it is advisable to check for memory leaks if several megabytes just disappear over time without a just cause.   