Jump to content
  • Advertisement
Sign in to follow this  
akurdas

integrating a C# project into C++ application

This topic is 3202 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. I have small small shader project written in C#. It uses several C# specific user statements and functions such as; Microsoft.Xna.Framework.Content.Pipeline.Graphics, using Microsoft.Xna.Framework.Graphics.PackedVector, PixelBitmapContent,... I don't have a time to write all the code in c++ again, actually I'm not even sure if I can make it. So, Is there any way to use that c# project in my c++ application? Thanks

Share this post


Link to post
Share on other sites
Advertisement
You could use C++/CLI to interface with C# code. It doesn't really matter if you write in C++ or C#, as long as you program for .NET virtual machine. (I've written an XNA app that was using C++ PhysX and Havok libraries this way.)
If you wan't to code in pure C++ (not CLI), then interfacing with C# is not practicaly feasible.

I also doubt that using XNA graphics with raw DirectX graphics is possible. I could be wrong though.

Share this post


Link to post
Share on other sites
Quote:
Original post by Zbychs
If you wan't to code in pure C++ (not CLI), then interfacing with C# is not practicaly feasible.

You can expose your C# classes as COM objects if you want to interface with native C++.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!