Sign in to follow this  
akurdas

integrating a C# project into C++ application

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this