Jumping over to DirectX?

Started by
16 comments, last by 21st Century Moose 9 years, 9 months ago

Please stay away from Direct3D!!

I can't speak for the API design or any of that, but Direct3D is only available for one platform. (As I understand it, the XBox version is actually a different API). If you learn Direct3D, and later decide that you want to target Linux, OS X, Android, iOS, PlayStation, et cetera, then you'll need to go back to OpenGL.

Right now, I guess you're only concerned about Windows. But think about 5, 10 years from now. Windows is the most popular OS because people are used to it, and developers don't bother to target other platforms. That's changing. College students are picking up OS X and finding it to be a smoother experience. Nerdy, curious developers like myself are installing Linux on an old computer or in a virtual machine, and finding out how much freedom it provides (you don't need to alter any source code, just change settings). Windows is on the decline.

Plus, there's the whole mobile device thing. You want into that market, and you need to know OpenGL ES.

If you really think that Direct3D offers enough benefits to warrant learning it, go ahead. But first, do yourself a favor: try Linux. Install it in a virtual machine, or an old computer, or set up a dual-boot on your current computer. Experiment a little. Try to find the right desktop environment for yourself. If it turns out you like GNOME, or KDE, or Unity, or one of the other thousands of desktop environments (just try five or so, not all of them) better than what you get with Windows, then it's better you find that out before you devote a bunch of time to learning an API that won't work on other platforms.

I used to use Windows, and I couldn't understand why anyone would bother to use anything else. But once I tried Linux, I realized that I'll never again be satisfied with an OS that forces me to pay for every new version, requires anti-virus, hogs my system resources, and won't let me customize things.

All I'm asking is that before you jump to a proprietary, single-platform, can't-get-the-latest-features-without-buying-a-new-OS-that-you-may-hate API, you make sure you're okay with only ever releasing games for that platform.

Sorry for the rant about the awesomeness of Linux. I just think that--especially with SteamOS--you need to take it into account.

Advertisement

If you learn Direct3D, and later decide that you want to target Linux, OS X, Android, iOS, PlayStation, et cetera, then you'll need to go back to OpenGL.


Meanwhile in reality...

1) D3D11 serves Windows
1.1) Until D3D12 comes along, platforms unknowns
1.2) Maybe Mantle too for AMD specific paths
2) D3D11+ serves Xbox One
2.1) and it'll probably get a flavour of D3D12
3) PS4 requires Gnm
4) OS X is stuck in the low 4.1 OpenGL support so no modern features for you
5) Linux uses OpenGL but driver support remains spotty
6) Android is a hateful OS and you'll be writing hardware specific hacks and workarounds until the cows come home
7) iOS is basically going Metal
7.1) unless you want pre-8.0 devices too then you'll need Apple Flavoured GL|ES too

The reality is that to cover the platforms you listed and then some you'll need more than one backend anyway, OpenGL is not (and never has been) the answer to all graphics programming woes. On Windows alone once you get outside of NV land things become more and more patchy, and that's not counting things NV's tendency to do what they think is right vs the spec which trips people up.

The ONLY reason I'm considering spinning up an OpenGL backend for my game over a D3D11 one is because it gives me access to some features which future APIs will have but currently don't expose and in the time line of my game idea those new APIs will be around before I ship.
(Also I've got a few years experience working on rendering for AAA games so I figure I'm experienced enough to figure out wtf is going on when things break... and they will...)

Please stay away from Direct3D!!

I can't speak for the API design or any of that, but Direct3D is only available for one platform. (As I understand it, the XBox version is actually a different API). If you learn Direct3D, and later decide that you want to target Linux, OS X, Android, iOS, PlayStation, et cetera, then you'll need to go back to OpenGL.

Right now, I guess you're only concerned about Windows. But think about 5, 10 years from now. Windows is the most popular OS because people are used to it, and developers don't bother to target other platforms. That's changing. College students are picking up OS X and finding it to be a smoother experience. Nerdy, curious developers like myself are installing Linux on an old computer or in a virtual machine, and finding out how much freedom it provides (you don't need to alter any source code, just change settings). Windows is on the decline.

Plus, there's the whole mobile device thing. You want into that market, and you need to know OpenGL ES.

If you really think that Direct3D offers enough benefits to warrant learning it, go ahead. But first, do yourself a favor: try Linux. Install it in a virtual machine, or an old computer, or set up a dual-boot on your current computer. Experiment a little. Try to find the right desktop environment for yourself. If it turns out you like GNOME, or KDE, or Unity, or one of the other thousands of desktop environments (just try five or so, not all of them) better than what you get with Windows, then it's better you find that out before you devote a bunch of time to learning an API that won't work on other platforms.

I used to use Windows, and I couldn't understand why anyone would bother to use anything else. But once I tried Linux, I realized that I'll never again be satisfied with an OS that forces me to pay for every new version, requires anti-virus, hogs my system resources, and won't let me customize things.

All I'm asking is that before you jump to a proprietary, single-platform, can't-get-the-latest-features-without-buying-a-new-OS-that-you-may-hate API, you make sure you're okay with only ever releasing games for that platform.

Sorry for the rant about the awesomeness of Linux. I just think that--especially with SteamOS--you need to take it into account.

Nice "sales pitch", but if you check out post #5 you'll see that Linux is already a target platform for the OP. In spite of which he's still talking about jumping to D3D.

Just to re-emphasise phantom's post, the mobile platforms use OpenGL ES (which, like that for 360, is actually a different API) - strike one. The Playstation 3 offered PSGL which nobody used - strike two. Smart money seems to be on Apple ditching OpenGL on OS X in the near-to-medium future too - strike three.

"Only ever releasing games for that platform" - what a silly thing to say. Why not write a renderer that supports both OpenGL and D3D?

Frankly, this focus on OpenGL as a magic ingredient that suddenly makes your game multiplatform is completely bogus. Is OpenGL going to make your networking code multiplatform? Is it going to make your sound code multiplatform? Is it going to make your input code multiplatform? You're already writing to platform-specific APIs for these, rendering is not a special case.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Well, sorry for offering my opinion and advice. I can see I'm not welcome here. Please continue misinterpreting my post and upvoting everyone who acts like a jerk towards me. Seriously. Knock yourself out. I'm used to being treated like crap for having a different opinion.

You will find that throwing yourself public pity parties is shunned as much as providing heavily biased opinions as fact or even more.
Instead of shifting blame, you should consider why you were so down-voted in the first place, man up, and take steps to fix it in the future.

L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid


4) OS X is stuck in the low 4.1 OpenGL support so no modern features for you

My GPU (GTS 250), old as it is, can still run 95% of the triple-A games on PC, and it only supports up to OpenGL 3.3. If you're targeting above 4.1 for "modern features", things like platform choice no longer matter because you don't really have a platform at that point unless you don't want to release for another 5 years.

The prevailing direction is towards heavy compute based architectures which, yes, requires two rendering paths anyway ("legacy" and "compute") if you want to cover old hardware however in the AAA space at least pre-11 hardware is becoming less of a focus so your 95% will drop off pretty quickly now.

More to the point if you are working on something now then your release window is likely to be a couple of years away so saying "well, this is good enough now.." gets you no where. (A release window of less than that probably requires an existing engine, either in house or purchased, so the choice of renderer backend is already fixed either for the initial target or whatever the purchased engine supports).

Either way, Apple have shown no interest in updating OpenGL support on OSX and, despite the hardware being able to, do not support compute shaders (beyond other things) which is a major issue for many people.

Regardless pre-DX11 class hardware is yet another render path, regardless of platform or API.

Well, sorry for offering my opinion and advice. I can see I'm not welcome here. Please continue misinterpreting my post and upvoting everyone who acts like a jerk towards me. Seriously. Knock yourself out. I'm used to being treated like crap for having a different opinion.

You wrote:

Right now, I guess you're only concerned about Windows

But yet the OP had already stated (in post #5) that Linux is currently a target platform.

You wrote:

If you learn Direct3D, and later decide that you want to target Linux, OS X, Android, iOS, PlayStation, et cetera, then you'll need to go back to OpenGL

And that's as scurillous as the infamous Wolfire blog post because most of those platforms don't actually use OpenGL (best of luck trying to port desktop GL code to GL ES).

Frankly, I could go on here but what's the point? This isn't "opinion and advice", this is misinformation. There's nothing wrong with giving opinion provided you've got facts to back it up, and in this case you don't - you are in fact just giving a sales-pitch for Linux to someone who was already targetting it anyway, and using false information to support that sales-pitch.

That's why you were downvoted.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement