The death of D3D9

Started by
45 comments, last by NathanRidley 10 years, 5 months ago

Am I the only one who finds DX9 not all that extremly different than DX11? It could be the matter of fact that I started with shaders right away when learning DX9, and don't get me wrong i do like DX11's interface much more since its way cleaner, but the key concepts still remain. Individual states have been replaced by state objects, cbuffers instead of constant registers, and so on, but honestly, if you have learned DX9 without the FFP, it shouldn't be too hard to switch to DX11, and you'd already have learned a lot of concepts you need for eigther API...

You're not the only one. The kind of thinking you need to do about how you manage your objects and (many, but not all) of your states is very similar if using shaders and vertex buffers/declarations for everything in D3D9. Some states and other API differences can lead to a fairly large restructuring of code, however; particularly if using Effects in D3D9.

It is simpler to start - you need MUCH less code to get your first 3D application working and you don't need to learn so much (you don't need to learn the principle of shaders, HLSL etc.).

It is simpler when you don't need anything complex. You just set the proper states and you're done.

If you look upthread, I made much the same observation; you'll get no arguments from me on that count.

Seriously - just setting states and transform matrices IS simpler.

It's simpler if you're doing simpler stuff. As soon as you go to even moderately complex stuff than can still be handled by the FFP, it can become a horrible nightmare. To take a small example I did recently: I wanted to capture the screen image, greyscale it, then shift it to a brown-ish colour. IIRC I had to go into BumpEnvMap stuff to do that with FFP, and it was a 4 stage blend, not to mention the extra potential problems that could arise if I'd neglected to shut down states properly (always a key problem, often overlooked). By comparison it was one line of HLSL code - boom, done, and no state shutdown concerns.

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

Advertisement


Am I the only one who finds DX9 not all that extremly different than DX11...
...Individual states have been replaced by state objects, cbuffers instead of constant registers, and so on...

The entire programming model is different. State objcets, CBs, views - DX10 is a very different language than DX9. The code is structured differently, the API is tighter, resulting code is cleaner and shorter, easier to debug.

Is it easy to switch from DX9 to DX10? For me it was, but I know a lot of people that had difficulty with some newer concepts(views, for example).

Question is, should newbies bother with DX9?

There are some good open-source DX11 frameworks, some good beginner level DX10 books, there's really no reason to start with DX9.


You're not the only one. The kind of thinking you need to do about how you manage your objects and (many, but not all) of your states is very similar if using shaders and vertex buffers/declarations for everything in D3D9. Some states and other API differences can lead to a fairly large restructuring of code, however; particularly if using Effects in D3D9.

Ah yes, thats a good point, I've been using my own effect/mesh/sprite/font classes build from Direct3D-"primitives" in the recent project before switching to DX11, I think that played a big part too. If you aren't relying on the D3DX-stuff and do everything by hand, upgrading is a lot easier, since otherwise you'll have to come up with a solution for those things from ground up - and it doesn't make things easier if you've been used to have your D3DXEffect and D3DXMesh interfaces and now not only need to get the API to work, but also have to write those things before you can even see if what you've been doing is working at all.


The entire programming model is different. State objcets, CBs, views - DX10 is a very different language than DX9. The code is structured differently, the API is tighter, resulting code is cleaner and shorter, easier to debug.

Is it easy to switch from DX9 to DX10? For me it was, but I know a lot of people that had difficulty with some newer concepts(views, for example).

Don't get me wrong, I do also see that API as much cleaner/better (IMHO) to work with, but as I said, for me that changes where rather trivial. I didn't see that much difference in setting a state object VS setting the individual states. I must add, I've been using an API agnostic graphics wrapper interface that I've only had to implemented out for DX11, as well as a low-level render queue for processing state settings, so I quess that aided a lot. This also allowed me to directly view my progress in the game I've already made. I suppose, if you'd been used to using directx-commands directly in "high-level" game code, it would probably be more difficult.


Question is, should newbies bother with DX9?

There are some good open-source DX11 frameworks, some good beginner level DX10 books, there's really no reason to start with DX9.

I do agree that it was probably better to start with DX11 now on, for the cleaner API, etc... . Time spent on learning DX9 sub-FFP I don't belive to being lost though, especially if you plan on supporting Windows XP, since it teaches you the key concepts that are similar in any graphics API.


Don't get me wrong, I do also see that API as much cleaner/better (IMHO) to work with, but as I said, for me that changes where rather trivial. I didn't see that much difference in setting a state object VS setting the individual states.

Well, it's still Direct3D and it's still a graphics API, so the basic principles will be very similar ;) But besides this, the changes were quite big. Or maybe it's more fair to say that they weren't big, but there was a lof of them.

I know a reason, just for the passion of learning and knowing things and the challenge.

I know for a fact that some so called programmers feel complete and comfortable just making calls to methods that they don't know how they work(sometimes there is no way around this, we all end up doing this at some point). D3D9 is extremely easy D3D11 is even easier, so if you're just interested in the final result of things pick the easiest one or else if you're like me learn them all their differences, pros an cons, try to make a software rasterizer learn assembler, for god-sake! we're programmers, we like to learn how to do things the easy way and the hard way.

D3D9 does not die if you keep using it, in the end is all the same, sometimes I use visual c++ 6.0 just because I like it, I also use turbo C or turbo pascal and even turbo assembler. because I like the feeling of going back and do stuff I like. if you're a beginner learn all you can don't limit yourself, try the hardest stuff you can manage and while you're at it try also to be up to date.

Just trowing my two cents here: DirectX 9 today is not your daddy's DirectX 9. If you are avoiding the fixed pipeline and FVF, there is very little difference between a pure HLSL DirectX 9 and other versions. Sure, the setup code and resource creation API are drastically different, but once you are over that step, the code is basically the same. With a very thin abstraction layer you can easily switch between versions at compile time. It is harder to switch at run time though.

I intentionally use DirectX 9 exclusively to maximize the hardware coverage and to keep me on my toes. Think of it this was: some of the best engines out there were done in DirectX 9 and what other engines and versions of DirectX added are either trivial to add once you upgrade or ridiculously hard because of the subject matter. So using DirectX 9 keeps you from getting too lazy happy.png . I also make sure to use the lowest version of shader possible because on current hardware, that is just a fake limitation. This way you won't go overboard and write long and expensive shaders that could be written in a better way.

I think you should learn and conquer most that can be done in DirectX 9 and once you do, you will find that if you did an excellent job, you will have and excellent engine/renderer that barely lacks anything. On the other hand, DirectX 10 does have some worthwhile things to add. Alpha to coverage may not give you as much control as the DirectX equivalent, but it is a lot faster. Cleaner and more explicit data types are also a big plus.

What I'm saying that if you are going to render a cube or do anything that Unity or other engines do 10 times better, why bother with using DirectX and why go with the latest and most exclusive one? Are you really going to use all those new features?

It sounds that some of us can probably agree on some points:

- New programmers wanting to learn Direct3D now have no real reason to waste their time learning 9.0c first, because by the time they manage to make their first game, WinXP and 9.0-only cards will be really sparse.

- Existing 9.0c engines (shader-based) don't have to be redone in 10/11 yet unless there is a real need for some 10/11 features. That wouldn't actually help much, but would limit the target audience (albeit not drastically).

newbies use D3D9, maybe because still there are more tutorials and books on D3D9 than D3D10/11 and for very smaller or startup projects,IMO d3d9 is easy to use and setup.but yeah learning FF pipeline is waste of time now.

I think D3D9 is still so prevalent among newbies because of how easy it is to get into and no real reason to use 11. D3D9 isn't really that bad. Unless you're doing really fancy things in 3D (something a newbie would not be doing), you don't even need shader levels higher than 3. When you also consider that most AAA studios are still pushing out D3D9 games with optional D3D11 binaries, it just doesn't seem all that imperative to go there.

Even considering their odds of releasing a game before XP becomes insignificant, it might just not seem worth the risk. They might end up with a Terraria or something pretty early on. As I recall, that game was something made as something of a learning experience for the developers.

Yea, D3D9 is still great. But I wouldn't really suggest it for people who want to start learning D3D these days. Sure, it's faster to start with than with 10/11. BUT - that applies if you use the FFP and you won't be able to stay with that for a long time. If you want just to try something, see how it works, but have no serious plans with D3D in the future, then you may use 9.0c, why not. But if you really want to learn it and become quite good at it once, then starting with this old version will actually turn against you in the long run, because you will need to learn again and again from the start.

You'll get into 9.0c with FFP, you'll make your first simple testing applications or maybe simple games. Then you'll realise that you need shaders and you'll learn HLSL and all that. And then 9.0c will maybe really become dead (even deprecated by MS) and you'll have to learn DX11.

While if you start with DX11, you'll have a slower start, but you won't waste time later on learning something else.

In this sense, I kinda agree with the first post. But in general I don't agree with the title of the thread - because as I already said, existing D3D9 users don't have to be motivated enough to move to 11, if they are used to 9, know how to use it effectively, want their game to be as compatible as possible etc.

This topic is closed to new replies.

Advertisement