• Advertisement
Sign in to follow this  

Survey: Are you using managed DirectX or unmanaged DirectX?

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

How many of you are using unmanaged DirectX? How many of you are using managed DirectX? The reason I ask is I am curious to know how many people are working with MDX. I started a little project a while ago using C++ with unmanaged DirectX and had some wonderful D3D setup code. In one of my classes I have been learning C#, and I came across some good looking MDX tutorials. I am almost tempted to switch from unmanaged to managed. I don't feel like abandoning my old code, but at the same time I want the nice features of MDX (garbage collection, better casting between types, etc. Things just seem a little simpler). Any thoughts? What are your experiences like in working with unmanaged and managed DirectX?

Share this post


Link to post
Share on other sites
Advertisement
One vote for Unmanaged DX. Although I'm using C++, and I haven't learnt C# yet, so I don't think it counts [smile]

Share this post


Link to post
Share on other sites
I am using unmanaged. I was considering using managed for my debug build only, for better debugging (I heard this was possible though I've not tried it).

Share this post


Link to post
Share on other sites
I am using unmanaged. I was considering using managed for my debug build only, for better debugging (I heard this was possible though I've not tried it).

Share this post


Link to post
Share on other sites
im using unamanaged c++ on my main project, but managed on my side project...

but my vote goes to unamanged..

Share this post


Link to post
Share on other sites
Unmanaged. You can count that as 20 votes if you want to count the entire programming staff here.

As with the other replies, nobody here has learned C# or managed code. We want cross platform code.

Share this post


Link to post
Share on other sites
Unmanaged
I tried managed but wasn't used to C# at the time, so I switched back to unmanaged.

Share this post


Link to post
Share on other sites
Both, but my main pet project is in MDX.

MDX is awesome, frankly.

Share this post


Link to post
Share on other sites
Even though maaged has a few nicer features, I believe unmanaged is the way to go when considering portability. c++ was always designed to be easier to read, which, in my opinion is more important than some of the nice features you'll get from managed, especially if you are working in a team or expect others to interpret your code. C. Bloom has a very nice article about this subject which I think you might find interesting. Not to mention that there was a similar discussion on gamedev which you can find here.

Share this post


Link to post
Share on other sites
Quote:
Original post by mike_ix
I believe unmanaged is the way to go when considering portability. c++ was always designed to be easier to read, which, in my opinion is more important than some of the nice features you'll get from managed, especially if you are working in a team or expect others to interpret your code.

I challenge you to find a competent C++ programmer that cannot read most of C# right off the bat. Seriously, I have no idea where you come off claiming C++ is the epitomy of easily read code.

And for portability, we are talking about DirectX. DirectX isn't portable, whether unmanaged or not. If you are talking about language portability, then .Net can run on Linux, Windows, and Macs. And you can use another graphics API/engine that takes care of the graphics portability too. For example, Tao.OpenGl or OgreDotNet both will run on all of those platforms.

EDIT: Sorry, guess I should answer the survey. I use MDX in general, but right now I am trying OgreDotNet.

Share this post


Link to post
Share on other sites
I use both of them myself, I'm crazy and have several projects in the works at once. They are really largely the same in terms of ease of use and performance in my experience. Just use whatever language you are most comfortable with.

Share this post


Link to post
Share on other sites
Unmanaged.

I have no problem with reference counts, using pointers only when they refer to valid data, or freeing memory that I've allocated. It's just a matter of discipline.

I learned programming by writing assembly language routines for embedded systems that were burned in to ROM. The only debugger that I had was an oscillosope probe attached to an I/O pin. You learn to really think through what you're doing before you write a line of code when you're working in an environment like that.

Today, I'd even argue that this sort of discipline is becoming less relative when writing PC applications. You use whatever tools you can to be the most productive. If managing memory is troublesome for you, then use a managed language. If the DX sample code written in C# is more understandable, then go that route. There's no sense beating yourself to death over mechanics when there are alternatives available that put an end your development headaches.



Share this post


Link to post
Share on other sites
Quote:
Original post by Promit

MDX is awesome, frankly.


Frankly, I Guess that sums up my thoughts quite nicely [wink]

Share this post


Link to post
Share on other sites
MDX here.

I think I'm either addicted to C# or too lazy to get back to C++ and all the discipline involved ;)

Share this post


Link to post
Share on other sites
Interesting results so far! I am glad to see that I am not the only one who seems to like both unmanaged and managed (although I have yet to really code anything with MDX).

As for the cross-platform abilities of MDX: I have heard rumours (if I understand things correctly) that they might create some sort of managed environment to run on the Xbox360. Can anyone confirm this? Is this what XNA is?

Share this post


Link to post
Share on other sites
Quote:
Original post by remigius
Quote:
Original post by Promit

MDX is awesome, frankly.


Frankly, I Guess that sums up my thoughts quite nicely [wink]

Ditto

Share this post


Link to post
Share on other sites
Unmanaged here.
Mainly because I want to do something without having to get used to C# first and I´m getting really used to C++. But I think I´ll give C# and MDX a try definitely, don´t know when though. If usage of unmanaged DirectX seems cumbersome to you I´d give managed a try at once. I actually like unmanaged really well for now ;)

Share this post


Link to post
Share on other sites
Quote:
Original post by Moe
Interesting results so far! I am glad to see that I am not the only one who seems to like both unmanaged and managed (although I have yet to really code anything with MDX).

As for the cross-platform abilities of MDX: I have heard rumours (if I understand things correctly) that they might create some sort of managed environment to run on the Xbox360. Can anyone confirm this? Is this what XNA is?


You'd be correct Moe. That's what part of XNA is striving for. I say part because XNA is so much more than just providing .NET Framework builds on the Xbox360.

Oh, and to answer the survey, I use MDX 2.0. Since I got VS 2005 SE, I've been using that, and I haven't looked back. I've always hated writing Win32 code to get a simple window up and running. ;)

Share this post


Link to post
Share on other sites
Managed.

I find it better not because of the clean design of the managed API (which is much better than the brain-dead COM one), but because of C#. I don't want to start a flamewar, so let's just say that C++ is extremely ugly, unclean and inelegant. Practically useful and in ways powerful, yes, but it should not be used in 87%1 of the situations in which people use it.

And no, C# is not the holy grail of languages either, but it *is* a demonstration of a relatively clean C-based language. If C++ is your only forte, seriously consider learning other languages (e.g. LISP, OCaml, Ruby, Python)--you'll be shocked at how efficient and fun programming can be.

EDIT:
Quote:
I believe unmanaged is the way to go when considering portability. c++ was always designed to be easier to read, which, in my opinion is more important than some of the nice features you'll get from managed, especially if you are working in a team or expect others to interpret your code.

C++ is the absolute worst when it comes to readability. Try reading some truly powerful generic code--i.e. templates--, it just makes your head spin. And don't get me started about the error messages2.

As for portability, no. Unless you're talking about XBox kind of portability, then yes. If you're aiming for cross-platform development, use OpenGL. Or better, use an existing engine, like OGRE (whose C# port, Axiom, is portable and cross-platform).

1Figure made up on the spot

2And I'm not talking about standard C++ library error messages and STLFilt and all that. I'm talking about general error messages when generic programming or template metaprogramming is involved. Talk about rape.

Share this post


Link to post
Share on other sites
As for .NET being portable... it is. To a point. XBox doesn't have .NET. XBox360 doesn't have it yet. PS2 doesn't. PS3 likely doesn't, and likely won't. I'm betting Wii won't either. Add onto that, that until recently PCs didn't have .NET, meaning most developers have a large non managed codebase they're not just going to throw away. So, no, we don't use managed code, and likely won't for quite some time. I imagine many non PC only game studios are in a similar boat.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement