Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


The death of D3D9


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
46 replies to this topic

#1 N.I.B.   Members   -  Reputation: 1195

Like
0Likes
Like

Posted 23 October 2013 - 11:26 AM

Is seems really strange to me that there are still many beginners who learn D3D9. There are even questions about FVF and FF pipeline on this forum...

 

 

Besides the HLSL, D3D9 is completely different than D3D10+. How the API looks, the feature set. The programming model itself is very different. Perhaps a matter of taste, but I find D3D10 easier to work with.

 

I can't really find any good reason to learn D3D9 nowdays.

 



Sponsor:

#2 belfegor   Crossbones+   -  Reputation: 2686

Like
0Likes
Like

Posted 23 October 2013 - 12:50 PM

Why do you care?



#3 N.I.B.   Members   -  Reputation: 1195

Like
1Likes
Like

Posted 23 October 2013 - 12:55 PM

No real reason. Just wondering why people still bother with DX9.



#4 Waaayoff   Members   -  Reputation: 781

Like
4Likes
Like

Posted 23 October 2013 - 01:07 PM

Because Windows XP still runs on 39% of PCs.

 

Edit: Also i think some find it easier not to have to deal with shaders at first. They do tend to complicate things a bit.


Edited by Waaayoff, 23 October 2013 - 01:42 PM.

"Spending your life waiting for the messiah to come save the world is like waiting around for the straight piece to come in Tetris...even if it comes, by that time you've accumulated a mountain of shit so high that you're fucked no matter what you do. "

#5 N.I.B.   Members   -  Reputation: 1195

Like
1Likes
Like

Posted 23 October 2013 - 02:10 PM


Edit: Also i think some find it easier not to have to deal with shaders at first. They do tend to complicate things a bit.

 

In my opinion, learning fixed function is not really learning graphics. With FF, all you do is configure a state machine, plug in some matrices and that's it. You don't need to know math, you don't need to know lighting - and you will not really learn them.

 

My first experience with graphics development was implementing a software FF pipeline. I used a really crappy book with a lot of math errors, so I had to develop most of the math by myself. And implement clipper, rasterizer, depth unit, blending. After that, switching to shaders is a piece of cake.

 

Not that I expect people to write their own pipeline nowdays, but FF is a relic of the past. It's a nasty, useless shortcut.



#6 MJP   Moderators   -  Reputation: 11568

Like
2Likes
Like

Posted 23 October 2013 - 03:04 PM

I agree, it should be dead at this point. I also make a face whenever I see someone asking about FVF codes or other legacy fixed-function features. If anyone is looking to learn graphics then they would be much better served with a shader-based approach using a modern API.

Of course it may make sense to use D3D9 if you're writing an app that needs to target Windows XP, due to Microsoft's unfortunate decision of tying D3D features to OS features. But using it to learn is a bad idea, IMO.



#7 Krohm   Crossbones+   -  Reputation: 3167

Like
2Likes
Like

Posted 24 October 2013 - 01:54 AM

Is seems really strange to me that there are still many beginners who learn D3D9. ...

I can't really find any good reason to learn D3D9 nowdays.

Don't tell me dude. I'd drop D3D9 any day of the week if I could. Why those beginners are shooting themselves in the foot is something I cannot understand. Dealing with all the 10yo cruft is just painful IMHO!



#8 cdoubleplusgood   Members   -  Reputation: 844

Like
4Likes
Like

Posted 24 October 2013 - 02:46 AM


Also i think some find it easier not to have to deal with shaders at first. They do tend to complicate things a bit.

And instead they learn that crappy dead-end stuff about lights and materials and a myriad of device states that are only relevant for "F"VF... shudder.



#9 Real_Noname   Members   -  Reputation: 276

Like
2Likes
Like

Posted 24 October 2013 - 07:24 AM

Not so long ago I developed a driver system that abstracted 3 API's - DX9, DX11, OpenGL. From my experience by writing the same stuff in three different ways (no fixed pipline, shaders on Cg), DirectX 9 was the easiest do set up and render in terms of code written and complexity.

 

In DirectX 11 you want to render? Nope, you have to create a SwapChain. Oh, you want to render some colours? Sorry, you need to connect by view your SwapChain Buffer. You need a depth buffer? Then create it! Why is it a texture? Don't ask - and yes, you need another view.

 

DirectX 9 in comparison is so much easier to learn from the outside, because you need very little to see "something" on screen at the beginning.


//====== POWER IN CODE =======

// Homepage: http://en.coderulers.info


#10 N.I.B.   Members   -  Reputation: 1195

Like
0Likes
Like

Posted 24 October 2013 - 07:35 AM


DirectX 9 in comparison is so much easier to learn from the outside, because you need very little to see "something" on screen at the beginning

Maybe, I guess it's a matter of taste.

That doesn't change the fact that D3D9 is becoming obsolete, and there's little point for newbies to go anywhere near it.



#11 Hodgman   Moderators   -  Reputation: 30885

Like
3Likes
Like

Posted 24 October 2013 - 07:36 AM

I still use D3D9 myself for SM3 and WinXP support, but yeah, I wouldn't recommend it to a beginner.

 

All the fixed-function vertex and pixel stuff (texture combiners!) is actually more complex than a bare-bones shader IMHO.

 

I guess the beginners that come here with D3D9 questions are either using old PC's, old books, and/or old tutorials.

 

On the other hand, I did like GL1.x as a complete beginner, because the amount of code to get a triangle on screen with glBegin/etc was very small, so it was easy to take baby steps.



#12 Real_Noname   Members   -  Reputation: 276

Like
0Likes
Like

Posted 24 October 2013 - 07:51 AM

 


DirectX 9 in comparison is so much easier to learn from the outside, because you need very little to see "something" on screen at the beginning

Maybe, I guess it's a matter of taste.

That doesn't change the fact that D3D9 is becoming obsolete, and there's little point for newbies to go anywhere near it.

 

I'm just explaining the most likely reason why beginners are trying to learn DX9 - probably when they see a random DX10/DX11 tutorial with the amount of stuff you need to set up to draw a single triangle, they probably come to conclusion "I wait with this, first I learn about DX9 so i then understand DX10/DX11".

 

On the other hand, I did like GL1.x as a complete beginner, because the amount of code to get a triangle on screen with glBegin/etc was very small, so it was easy to take baby steps.

And now, because of the complete chaos context juggling to create a proper 3.3+ Core context + extension handling, most beginners in OGL learn about legacy 1.1.


//====== POWER IN CODE =======

// Homepage: http://en.coderulers.info


#13 noodleBowl   Members   -  Reputation: 205

Like
0Likes
Like

Posted 24 October 2013 - 09:12 AM

I consider myself a beginner with Direct X and I choose to use Direct X 9

 

I mainly chose Direct X 9 because of the legacy hardware support. I mean you can support Direct X 9 using Direct X 11 but only up to certain degree if I remember correctly.

So this

 

Because Windows XP still runs on 39% of PCs.

 

Holds a very large deciding factor with me

 

 

Now in terms of using the FVF, at least for me, I feel like the tutorials and resources are at fault with this one. With D3D9 nearly all beginner coding books and tutorials I have seen talk about setting up the FVF and do not even touch on Shaders. I feel like if there is a better way to do something or it gives me more fuctionality for the long run then just explain that to me first. Don't waste my time with things that could make me work harder and lead to a dead end.



#14 Shane C   Crossbones+   -  Reputation: 1283

Like
1Likes
Like

Posted 24 October 2013 - 09:26 AM

I think it's because people are not properly informed you can target DirectX 9 cards on DirectX 11, or don't have the hardware to properly test DirectX 11-exclusive features. I have problems with this information myself. I think we need to find a way to inform the community on everything we know about this subject, assuming we haven't already, to properly inform people who aren't doing it on purpose.

#15 NightCreature83   Crossbones+   -  Reputation: 2930

Like
5Likes
Like

Posted 24 October 2013 - 09:36 AM

I consider myself a beginner with Direct X and I choose to use Direct X 9

 

I mainly chose Direct X 9 because of the legacy hardware support. I mean you can support Direct X 9 using Direct X 11 but only up to certain degree if I remember correctly.

So this

 

Because Windows XP still runs on 39% of PCs.

 

Holds a very large deciding factor with me

 

 

Now in terms of using the FVF, at least for me, I feel like the tutorials and resources are at fault with this one. With D3D9 nearly all beginner coding books and tutorials I have seen talk about setting up the FVF and do not even touch on Shaders. I feel like if there is a better way to do something or it gives me more fuctionality for the long run then just explain that to me first. Don't waste my time with things that could make me work harder and lead to a dead end.

Seriously unless your OS is windows XP and you have no way of upgrading as a beginner you have no need to support D3D9, and you will be better of learning D3D11 from day one.

 

The difference between the 2 API's is too dramatic, I agree with Hodgman that the render states for blending, texture manipulation are a nightmare in D3D9 and this is all far easier to express in a shader, with normal arithmetic and you can express more than what you could through FF.

 

Nearly everything that has a typed resource in D3D9 now either is a view of a resource or a buffer with a particular binding or a view associated with it.

 

Be carefull about the effect pipeline in D3D9 as it doesn't exist by default anymore for D3D11 so learn to do things the hardway if you insist on using D3D9.

 

I am currently coming from knowing D3D9 to learning D3D11 and it feels like I had to learn everything all over again, and I was used to using shaders in D3D9 and not FF. So my advice is just learn D3D11 unless you only have access to a winXP development environment, as a beginner it is not likely you are realising your game you are just learning how to use the tech.

 

The percentage of people running winXP will only go down in the future.


Edited by NightCreature83, 24 October 2013 - 09:37 AM.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, Mad Max

#16 Tom KQT   Members   -  Reputation: 1610

Like
0Likes
Like

Posted 24 October 2013 - 09:44 AM

I think it's because people are not properly informed you can target DirectX 9 cards on DirectX 11, or don't have the hardware to properly test DirectX 11-exclusive features. I have problems with this information myself. I think we need to find a way to inform the community on everything we know about this subject, assuming we haven't already, to properly inform people who aren't doing it on purpose.

You can, but AFAIK that only allows you to use DirectX9-only graphics cards, but you still need Vista and above. So this is a solution only for people who have old hardware, not for people who have old OS (and XP is still quite common, so...).

Plus, you are limited so SM2. SM3 works only when you are using the "real" DirectX 9.0c.

 

 

All the fixed-function vertex and pixel stuff (texture combiners!) is actually more complex than a bare-bones shader IMHO.

It depends on a point of view. There are many threads here where people ask how to set the FFV states to achieve a specific look - and usually the answers are something like "I suggest you to use shaders and suddenly this will be incredibly simple and even more flexible". That's absolutely right.

But we must also admit, that for the basic stuff, the FFV is much simpler, especially if you are fine with the default values. You just set some lights, which is straightforward, and prepare and set your transform matrices. And you're done. With shaders, even if you use the Effect Frameworks, you have to code much more and learn much more immediately from the start, or you won't be able to do anything more than an empty screen.

I personaly don't agree that this doesn't teach you how graphics work. You still have to understand the basic principles, you just don't have to see so much "inside". You must know what W/V/P matrices are and how to create them, you just don't have to know how exactly to use them to transform vertices. You must know what a light of a certain type is and what are its properties and how it affects the lighting, but you don't have to care about the equations behind it.

 

Anyway, I'm fully for shaders, I haven't used FFV for years. But I'm still working with DX9.0c for compatibility and laziness issues, although I know how to use DX10/11 (and I like its structure much more, it somehow makes more "sense").


Edited by Tom KQT, 24 October 2013 - 09:58 AM.


#17 JohnnyCode   Members   -  Reputation: 259

Like
0Likes
Like

Posted 24 October 2013 - 10:00 AM

Well, in case you do not need to target higher shader model than 3.0, why would you restrict your aplication to dx10+? In case of using a deffered renderer, you will more unlikely hit SM3 limit. Are there other benefits of dx10+ over dx9? (performance or so).

I have been thinking of migrating to dx10+ but the fact of creating a very small target audience, I didn't as I was not in the need of a better Shader model.



#18 mhagain   Crossbones+   -  Reputation: 8134

Like
0Likes
Like

Posted 24 October 2013 - 10:22 AM

Fixed pipeline is certainly far more complex than shaders, but using shaders does have a requirement for you to write a certain amount of supporting infrastructure before you can do anything.  They're not really strong for "just dive in and start writing code" stuff.

 

None of that should be read as advocating a preference for FFP over shaders, by the way.

 

The only thing from D3D9 that I can honestly say I miss is standalone shader constants, and that's from a convenience perspective moreso than anything else.  When trying out new ideas or experimental/test code, rapid iteration is critical, and having to declare a cbuffer struct, a D3D buffer object for it, decide the usage policy and the register it goes in, map/write/unmap, bind it, remember to release it, etc is just not as fast to work with - in this particular case.  A small-ish pool of standalone constant regs (in addition to cbuffers, not instead of them) would be handy.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#19 Tom KQT   Members   -  Reputation: 1610

Like
0Likes
Like

Posted 24 October 2013 - 11:21 AM

Well, in case you do not need to target higher shader model than 3.0, why would you restrict your aplication to dx10+? In case of using a deffered renderer, you will more unlikely hit SM3 limit. Are there other benefits of dx10+ over dx9? (performance or so).

I have been thinking of migrating to dx10+ but the fact of creating a very small target audience, I didn't as I was not in the need of a better Shader model.

That's actually a good question. If you don't need anything better than SM3.0 (and honestly, you can do great things with SM3.0), why should you limit your target audience? Easier use of DX10/11 is not an argument here.

I think that we still are not (unfortunatelly) in the times when XP is dead and you can easily ignore it. So, I personaly would make either multiplatform applications (DX9 / DX1x) or only DX9. Especially if you are a small indie developer who needs as many eager players as possible.



#20 cdoubleplusgood   Members   -  Reputation: 844

Like
1Likes
Like

Posted 24 October 2013 - 12:22 PM


I think that we still are not (unfortunatelly) in the times when XP is dead and you can easily ignore it.

But if you start today with a new project, or with game dev in general, when will you have a project "RTM"? Before April 2014? Likely not. And that's when MS abandons support for XP. I think XP use will drop rapidly then.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS