Which DirectX to Pick

Started by
8 comments, last by mathacka 11 years, 3 months ago

Which DirectX API should I choose to use?

Is there an easier way to code in DX11 or DX10 even compared to 9?

Are there more things to check for before initialization of a DirectX interface?

Since they're all backwards compatible, why not even use DirectX 1, Microsoft still uses tutorials for this?

Advertisement

It's basically a choice between 9 and 11 these days.

If you want to support Windows XP then use 9, otherwise use 11.

DX11 has "feature levels" that allows you to use it in different ways, to support different types of hardware.

Dx11 set to use D3D_FEATURE_LEVEL_9_* supports D3D9/SM2 level hardware.

Dx11 set to use D3D_FEATURE_LEVEL_10_* supports D3D10/SM4 level hardware.

Dx11 set to use D3D_FEATURE_LEVEL_11_* supports D3D11/SM5 level hardware.

10/11 removed the fixed-function pipeline, so these days you need to learn how to write shaders in order to use them, so you could say they're more complicated.

However, you could also say they're simpler, because 9 always had 2 (or more) ways to do everything, due to it supporting both shaders and fixed-function...

I'm not sure if it's even possible to get an official SDK for DX8 and earlier from Microsoft any more.

DX 1? That would be pretty old, DX 1.0 appeared in 1995 (since about 18 years) it's not a good idea to use a very old version, a very old version will definitely not supported bunches of important features and a well noticed graphics improvement, plus it might be not compatible with recent versions of OS since it's very old and deprecated.

If you want to create something compatible with most machines, I would say DX 9 will be fine and can give you almost the same result you get from DX 10 and DX 11.

If you're looking to learn, I'd say go with DX11. It's a cleaner API than DX9, and will be the most relevant going forward. I would only use DX9 if you're developing a game or app and targeting Windows XP is important to you.

I always found the DirectX 11 to be simpler to set up. But if the intent is to get something simple up and running, you have to write shader code. Which although is not a bad thing, just that you have to do some household work in the project.<br /><br />DirectX 9, although you are going to call more APIs, you will only be writing in C, not HLSL (if you are doing something simple, and not writing shaders).<br /><br />HLSL is pretty simple to learn but if you are against learning a slightly different programming paradigm, use DX9. So I think it boils down to whether you can or you want to write shaders.

Just wanted to chime in and say that Microsoft has been and continues to phase XP out of existence. I would venture as far as to say that it's probably pretty safe to assume that NONE of your potential players will be on XP. With that being said DX11 would be your better choice (also assuming that it will be a little while before you release), it should be safe to assume as long as your not using to much brand new tech or super advanced calls that only todays top level hardware can support that you'll have a nice wide audience when it's all said and done. Also, you might want to look into the XNA Frameworks and .NET, they are Microsoft's managed API sets (all OOP too). 90+% of the time Microsoft will do the memory management and proper techniques better than an indie coder would. Take advantage of the free framework that would already surpass what your likely to code yourself, it will expedite your development process exponentially and give you a more stable end result.

Dan Mayor

Professional Programmer & Hobbyist Game Developer

Seeking team for indie development opportunities, see my classifieds post

Always choose the current tech, it is going to grow old 'enough' while you are learning it.

I own "Introduction to 3D Game Programming with DirectX 10" by Frank D. Luna. I haven't really read it yet, would that be a good place to start. Also I heard "Game Coding Complete" uses DirectX 11 and is great for beginners?

I own "Introduction to 3D Game Programming with DirectX 10" by Frank D. Luna. I haven't really read it yet, would that be a good place to start. Also I heard "Game Coding Complete" uses DirectX 11 and is great for beginners?

It depends on how good at learning you are. The book covers also the basic stuff (setting up the Visual Studio, D3D inicialization, device creation etc), so you can learn everything you need from it. Of course one book is never enough, but as a starting point, I think you can try it.

Don't worry about the fact that it is for DX10 and not 11, the differences between those two are minor, compared to DX9 versus DX10.

Btw, I recommend you to read also the initial chapters about vector and matrix maths. Even if you think you remember that from the school ;)

Cool, I might consider doing xna stuff after all, it will be faster to deploy. Yeah, I'm sure I'll brush up on my linear algebra, that's all the graphics books talk about in the first 3 chapters it seems.

This topic is closed to new replies.

Advertisement