Jump to content
  • Advertisement
Sign in to follow this  
Mike nl

CWD prefixed in D3DXCreateEffect's errors

This topic is 3120 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

Hello everyone, I hope someone can help with this lest I use the ugly solution. In my game engine, I'm loading effects from my VFS via D3DXCreateEffectFromFile with a custom ID3DXInclude handler, using the fact that the include handler is also called (albeit twice) for the specified path. Now, this works fine; my problem is one of aesthetics. If there is an error, DirectX seems to prefix the specified path with the current working directory. For instance, when I pass "DX9\Brush" (which includes a non-existant Globals.fxh) to D3DXCreateEffectFromFile with my custom include handler, I expect this error message: DX9\Brush(4,10): error X1507: failed to open source file: 'Globals.fxh' However, I get this: D:\Project\MapEditor\bin\Debug\DX9\Brush(4,10): error X1507: failed to open source file: 'Globals.fxh' The same occurs when I use D3DXCreateEffect after loading the file into memory beforehand: D:\Project\MapEditor\bin\Debug\memory(4,10): error X1507: failed to open source file: 'Globals.fxh' Which is even weirder, IMO. I can see why D3DXCreateEffectFromFile might think that it's an path relative to the CWD. But for memory files as well? That does not compute for me. So I hope someone has a solution to this problem, otherwise I'll have to do some ugly string replaces. Thanks in advance, Mike PS: for completeness, my situation is that I'm writing the engine in a statically linked C++ lib and am using that lib in this C# tool via C++/CLI. I'm using the August 2009 SDK. Debug runtime gives no error or related warning. Google searches gave me nothing relevant.

Share this post


Link to post
Share on other sites
Advertisement
*bump*

Also, I found out today that this doesn't happen for files which are included from the main file. Then it shows the path as specified in the include directive.

Doesn't anyone have an idea about this?

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!