   Managed DirectX ??
  Hi, I''m fairly new to the DirectX arena and I occasionally see people talk about Managed/Unmanaged DirectX. What does this mean? (i.e. What''s the difference?)(Is this somehow tied to the language you program in? I''m programming in C++.) 
  Managed DirectX are the new code to use under the .NET framework. Good ol'' DirectX was to be used via COM interfacing.Does this mean that if you plan to use the .NET framework you HAVE to use the Managed DirectX? No, but it is advisable. You could just use the ''normal'' version via COM interop, but it is slower.In the other hand, using Managed DirectX provides you some nice advantages, such as memory handling (grabage collection) and more benefits of it being run thru the CLR.I hope this has helped you a bit at least.   To Iterate is human, To Recurse Divine... ;  Thanks that helps some butTo further display my ignorance...What is .Net? Is that a language? an MSN library of objects (like MFC)? a new interface (analgous to COM)?How do I use it or know if I am already using it?;  I will put in my thoughts on the matter at hand, DX using .NET is really the only experience that I have with a 3d API.  Now there are a lot of advantages and of course disadvantages over the unmanaged DX, and here they are from what I understand.Pros: Managed DX is of course managed by the CLR which means, you have garbage collection, access to not only the DX but XML, crypto etc, right in the same framework without to much trouble.  You have bounds checking, buffer under runs/overflow checking.  Managed DX has some extra built in features that isn’t in the unmanaged version such as, automatic resizing, for example when you maximize a window your scene(all the objects) gets resized properly, where as unmanaged DX you don’t get this.  It takes less code to do things with managed DX.  You will have very little if any code errors, but of course you can still have logic errors.  Access to C#!Cons:  It’s a little bit slower, 2-5% slower then unmanaged, if you are coding correctly, if you don’t code correctly you can have a performance hit of 50% in somewhat rare cases.  But if you don’t code correctly in unmanaged code then your program might not work at all and it can have a performance hit also.  This is where people think NET sucks, which is sad, .NET will do a lot for the programmer, even if its not for the best performance, but if you take some control of how you code your program you wont have a big performance hit.  This is one thing that will cause a performance hit, boxing/unboxing mainly what this means is.  When .NET comes across a data type such as a type OBJECT, it needs to convert it to some other data type, and if you have to do this a lot it can take time to do it.For example say you have a for loop then runs 100 times per frame, and each time the loop is iterated you have to convert an item of type OBJECT to type int32Then after the operation is done, it needs to covert the data from int32 BACK to type OBJECT, this is not good, but if you play your cards right you can avoid this problem and not get a big performance hit.So far I am enjoying managed DX, but like I said I have no real experience with unmanaged DX.  Good luckEDIT:  .NET is a framework, its a layer( a program in a way that manages your .NET program ) It looks at your program as its running and make sure its running properly.  In .NET you have access to a new lanages such as C#, you can use other languages such as VB.NET, J#( kinda like java for .NET ) C++.NET and many others.  Any language that you pick will not have a performance advantage over another .NET language.  So even if you use VB.NET it runs just as fast at C++.NET.  With .NET it has a crap load of pre-build in functions somewhere like 3500-5000 methods.  .NET will give you access to ASP.NET, XML, ADO(database) crypto, IO, consol, network, DX bla bla bla.. Its nice, I would read up more on it and see if its right for you. [edited by - dalik on February 18, 2004 4:12:27 PM];  You can think about the .NET framework as a set of technologies and techniques wich try to make development more productive, embrace the distributed programming paradigm over the internet and many more things.. but just to get an idea an as introduction let''s say it has some similarities to Java.You can program in any of the .NET languages (amongst them C#, managed C++, Visual Basic .NET and some more), even mix code in diferent languajes on the same proyect. Your code will be executed under supervision of the Common Languaje Runtime (CLR), wich is something like the Java Virtual Machine (albeit far more sophisticated).This CLR supervision allows better security, memory managment, and more things, such as the Base Class Library... this means that the basic types and class libraries are all the same across the diferent .NET languages, wich lessens the learning curve from one language to another insde the framework.Remember, though, that to be able to execute .NET code you have to get installed in your sistem first the .NET framework (much like the Java VM is needed to execute Java code in any computer).I know this was not a good explanation, I am no good at explaining things, and much worse doing it in other language than Spanish, but anyway, hope that helped. To Iterate is human, To Recurse Divine... ;  Thanks for the info. I''m a bit of a purist, especially when I''m learning something new (like DirectX) so for now I''ll stick with straight DirectX.I believe in understanding the guts before abstracting to higher levels. (It''s probably because I have a Electrical Engineering degree not a computer science degree.) But in the end we''re all programmers. ;  I agree totally with you, Dalik... Managed DirectX can be pretty pretty fast if you are just a little bit careful when coding.. the only problem is that working under the .NET framework is soooo easy that we turn ourselves into lazy creatures and start doing a lot of nonsenses in the code, just because almost everything works :D at least, there is that risk  To Iterate is human, To Recurse Divine... 