> Hmm, this is not what I expected but is less work on their 
> part since so
> much has been invested in COM and so much of DirectX is COM based. I
> would have expected, as I have done several times, to take the body of
> C++ code and wrap the raw C++ code itself with a MC++ wrapper. This is
> much cleaner and is much better in performance (IJW transition thunk
> versus a COM transition thunk). 

Sam, I'm not the C++ guy you are, so maybe you can clarify something for
me: is IJW mutually exclusive with COM? 

My understanding (and maybe I put it wrong) is that 

a) There is no such thing as "raw C++" DirectX. DirectX is a COM-based
API. 
b) The managed DirectX classes are MC++ wrappers around the COM calls,
using IJW rather than the CLR COM interop stuff. 

> Then that "body" of code is 
> "exposed" to
> managed clients like C# and VB.NET. You get the opportunity to
> "refactor" your code and interfaces as well exposing only 
> what you want
> in the "new" MC++ wrapper. But, I guess since DirectX is so 
> tied to COM
> it was too much work. This was the reason why Visual Studio 
> and VSIP did
> not expose managed interfaces - hundreds of existing COM Interfaces.

There are some pretty major benefits to using MDX, despite its
less-than-perfect architecture. For one thing, they let you do things
like use System.Color instead of an int to specify colors, which is
really nice. And just being able to program in C# (or whatever) means
that you don't have to deal with HRESULTS or AddRef or any of that
garbage. 

> The issue is performance. I would expect that this allows more Managed
> programmers to use Direct/X now without going to C++ but not the lions
> share where every last bit of performance counts (i.e. games and other
> major users of Direct/X)

I'm not totally convinced yet. Games, sure. But aren't there a ton of
other things where 20 fps is good enough? Where pre-calculating frames
is a viable option? It's a lot easier to use now - that changes the type
of things it *can* be used for. 

Anyway, you may be right. MDX may be a non-event. But I'm going to play
with it as much as I can and see if I can't help other people figure out
the API. Then the market will tell us all where it's going. 

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to