Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualGavin Williams

Posted 19 November 2012 - 06:57 PM

Hi,
Just to set the scene, I've been using SlimDX for accessing Direct X 11 in C#. But I'm very much interested in how Direct X 11.1 will be made available to C# and how I can work with C#/DX11.1 on the Windows Store platform specifically. Obviously there is SharpDX. But at the moment I'm just trying to understand how interop might best work on Win RT to connect Direct X with C#. And how I might implement such interop, or at least understand it better.

So I've read or heard via the build videos that Direct X has been integrated with WinRT, at least, that's what some of the diagram's portray. But when I inspect the WinMetadata folder, Direct X is not part of the WinRT object model (it seems to me).

So is it that Direct X is in WinRT by name only ? And has it not been functionally integrated ? I would imagine that if it were integrated, then the CLR could generate a Runtime Callable Wrapper as needed, but I would say performance might not be as good as say SharpDX. I'm not sure if SharpDX uses C++/CLI or C++/CX, but I think the Runtime Callable Wrappers would incur an additional cost.

And if interop between Direct X and C# were implemented for RT, what then would be the best way. I would say use class libraries rather than Windows RT Components as I am only interested in C#.

Also, I would say use C++/CX rather than C++/CLI as I believe that CX provides better interop performance. In fact CX might be the only way to write RT wrappers (not Runtime Callable Wrappers). But this is confusing because as I've said, Direct X might not be actually a part of RT even though it is shown to be. I haven't quite worked out how CX fits into the picture other than to say it's next gen C++/CLI and is CLI for RT. So I would use CX to provide Direct X with a managed programming surface ? Or C++/CLI otherwise.Am I starting to understand this properly ? Or what can be said about how to approach this problem ?

#1Gavin Williams

Posted 19 November 2012 - 06:54 PM

Hi,
Just to set the scene, I've been using SlimDX for accessing Direct X 11 in C#. But I'm very much interested in how Direct X 11.1 will be made available to C# and how I can work with C#/DX11.1 on the Windows Store platform specifically. Obviously there is SharpDX. But at the moment I'm just trying to understand how interop might best work on Win RT to connect Direct X with C#. And how I might implement such interop, or at least understand it better.

So I've read or heard via the build videos that Direct X has been integrated with WinRT, at least, that's what some of the diagram's portray. But when I inspect the WinMetadata folder, Direct X is not part of the WinRT object model (it seems to me).

So is it that Direct X is in WinRT by name only ? And has it not been functionally integrated ? I would imagine that if it were integrated, then the CLR could generate a Runtime Callable Wrapper as needed, but I would say performance might not be as good as say SharpDX. I'm not sure if SharpDX uses C++/CLI or C++/CX, but I think the Runtime Callable Wrappers would incur an additional cost.

And if interop between Direct X and C# were implemented for RT, what then would be the best way. I would say use class libraries rather than Windows RT Components as I am only interested in C#.

Also, I would say use C++/CX rather than C++/CLI as I believe that CX provides better interop performance. In fact CX might be the only way to write RT wrappers (not Runtime Callable Wrappers). But this is confusing because as I've said, Direct X might not be actually a part of RT even though it is shown to be I haven't quite worked out how CX fits into the picture other than to say it's next gen C++/CLI and is CLI for RT. So I would use CX to provide Direct X with a managed programming surface ? Or C++/CLI otherwise.Am I starting to understand this properly ? Or what can be said about how to approach this problem ?

PARTNERS