Jump to content
  • Advertisement
Sign in to follow this  
ramy

direct3d device creation

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

hey guys, i have a question, i have done a library in native c++ to create and render a 3d device using direct3d. if i want to use that under C#, i know i have to wrap the c++ library i did, but my question is, wat do i pass from C# to c++ for the HWND, to create the device in c++? any ideas? thx

Share this post


Link to post
Share on other sites
Advertisement
ok did that.

the native c++ library is compiled with CLR option. now, when i come and wrap it under managed C++, it reads the library , but it brings some linking errors, some of these r from the std library like GetDC() that are available in the native C++ library that i have my direct3d device in.

how do i solve the linking errors in the managed library?

Share this post


Link to post
Share on other sites
Quote:
Original post by intrest86
Use the "Handle" property of your form, it holds the HWnd.


could you please tell me how to send it to native c++, cause im having a hard time doing it. thx

Share this post


Link to post
Share on other sites
I have never wrapped anything myself, but can't you compile your library as it is, unmanaged, and then add then add it to your managed wrapper? I'd assume that you use the library functions just as you usually do when using libraries. But never done it before, so YMMV.

On the other hand, does your library really do much? Is there a reason you aren't using DirectX directly from your managed code?

Share this post


Link to post
Share on other sites
cause i have a whole library for Direct3d of my own implementation in native. i dont want to rewrite it under managed.
i thought of doing a wrapper easier than rewritting the whole thing.
plus, in the future, i might be using the library for xbox games, cause the xbox uses native DirectX i heard.

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!