Jump to content
  • Advertisement
Sign in to follow this  

Directx dll from c#

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

Whilst this question is largly DirectX based, I think its going to result in a general programming reply, so I decided to place it here. Im wanting to create a C# application with GUI to compile my HLSL files and report back any errors. At the moment, Im just having the C# application call the fxc.exe application, with the HLSL file as one of the command line arguments, but the errors reported are obviously only seen in the console window of fxc.exe. Im wanting these errors to be passed back to the C# application, and be visible in the GUI. At the moment I see no way of doing this. From reading the documentation on fxc.exe, it mentions nothing about storing errors to a file, they only seem to be outputed to the console window. Whilst I could get this working with the XNA libraries, Im trying to avoid this as the rest of my engine uses the standard Directx libraries and C++. So it seems daft to have the XNA runtimes as one of the requirements purly to compile shaders. So Im thinking about loading one of the Directx .dlls in c#, and calling something like D3D10CompileEffectFromMemory() from C#. But I havent done anything like this before. So Im looking for some advice. The problem I see is that D3D10CompileEffectFromMemory(), requires as arguments, other types that are declared in the DirectX headers, such as ID3D10Blob. Which will contain the any errors reported and the compiled shader data.

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!