• Advertisement
Sign in to follow this  

d3dx load functions extremely slow

This topic is 4797 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, Does anyone know why sometimes certain DX load functions are slow in some applications? When used in the dx samples, they load instantly. When loaded in a barebones template, they are still as fast, however, when I put them in dll's, for some reason they load really slow (sometimes taking up to 10 minutes to finish). The d3d device is set up identical in all applications and the .fx files and .x files are in the same directory as the the application files. I'm just trying to find out if there's a reason besides the function looking for the files in question in different directories. The functions in question are: D3DXLoadMeshHierarchyFromX() and D3DXCreateEffectFromFile().

Share this post


Link to post
Share on other sites
Advertisement
That sounds very unusual. I have used D3DX functions in DLLs before, with no problem. Are you doing things with multiple threads or anything like that? Also, did you create the D3D device in a separate DLL from where you are calling the D3DX functions?

Share this post


Link to post
Share on other sites
It's not the DLL's I just found out.
I created a new project using the same files and now the load times are
instant. I'm not sure why it's doing it since it's just a testbed to include
animated models.
Anyways, everything is good now and running as expected. Maybe some data or
files got corrupted.
Thanks,


- Oordeel

Share this post


Link to post
Share on other sites
- FYI
It seems that the cause for the slow down is when you set some debug parameters.
More specifically when following flags are set:
_CRTDBG_DELAY_FREE_MEM_DF
and
_CRTDBG_CHECK_ALWAYS_DF

So, be careful when you set these and you use the D3DXLoadMeshHierarchyFromX()
and D3DXCreateEffectFromFile() functions, they will slow down alot depending
on the size of the files you're trying to load in.

Just thought it might be useful if someone ever comes across a similar problem
and does a search in the forums ;P

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement