Interfacing C++ DX and C# DX

Started by
0 comments, last by RomSteady 18 years ago
I am currently working on a project where we want a Direct3D C++ application to talk to a Direct3D C# applicaiton and vice versa but I'm not really sure where to begin with this. I've already written the C++ code to initialize Direct3D but how would I pass that to C#; I believe a device in C# takes a form as a parameter whereas in C++ a Device takes an HWND. Would anyone be able to point me in the right direction or have any reference links to websites that talk about this kind of stuff? Thanks,
Advertisement
Use of the Form element to create your Managed Direct3D object has been deprecated in MDX 2.0. It is now recommended to use the Form's HWND to create the object.

There is a Managed DirectX Device constructor that will allow you to pass in your unmanaged Direct3D Device object.

Search the docs for public Device(IDirect3DDevice9);

(Edit: Changed "not recommended" to "now recommended." Typos are fun, especially when they change the meaning of the sentence. [grr])

[Edited by - RomSteady on April 10, 2006 8:17:47 AM]
Michael Russell / QA Manager, Ritual EntertainmentI used to play SimCity on a 1:1 scale.

This topic is closed to new replies.

Advertisement