Hello! I've recently gotten into programming with C++, and I've wanted to use a graphics library for a while, so I decided on DirectX. However, I could not really find any tutorials on this library, and the microsoft website is absolutely less than helpful.... Anyone know of any good tutorials that deal with DirectX 10 and 11?
Are we talking about the same website here? MSDN has a rather large amount of in-depth tutorials and documentation. This should be a good starting point: http://msdn.microsof...s/jj554502.aspx
Their documentation is very unhelpful, and assumes you already know how to use DirectX, which really is a problem when you are making a tutorial.... I tried these but they were all for Windows Store applications. There was another section for Win32 games, but that section really didn't help all that much because the tutorials were jumbled.
I would suggest avoiding directx at all costs and using opengl instead.
Many, many, many experienced devs in the industry say the same thing.
OpenGL is an absolute pain to install and was not installing on my system. DirectX also has a larger range of capabilities than OpenGL, and I know that many developers I know use DirectX.
OpenGL is an absolute pain to install and was not installing on my system.
Wat? Your IDE should come with the OpenGL development stuff (MinGW, Cygwin, and MSVC++ all do) and your graphics card drivers should come with the runtime.
OTOH in my opinion you shouldn't bother with either right now and instead go with an existing graphics engine so you can focus on writing whatever it is you want rather than fighting with low level graphics APIs.
Wat? Your IDE should come with the OpenGL development stuff (MinGW, Cygwin, and MSVC++ all do) and your graphics card drivers should come with the runtime.
OTOH in my opinion you shouldn't bother with either right now and instead go with an existing graphics engine so you can focus on writing whatever it is you want rather than fighting with low level graphics APIs.
Huh, I don't have MinGw or Cygwin as far as I know..... that's rather odd. xD I may just go with an existing graphics engine, but I do want to learn about DirectX so I understand how the actual graphics work. I ordered a book for $5.00 off of Amazon that's pretty recent, so I might just end up going with that.... any other suggestions?
What do you have to back up your claim? I have done research on the topic and all I see that's better is slightly better optimization and cross-platform compatibility. That, in my opinion, is not that much of a benefit over DirectX's benefits.
There is also no reason to be rude when I am simply asking for help on a topic: you posting some ridiculous comment with no evidence to support your claim is unhelpful to me and the topic.
I've done a bit of research, and I've noticed that there really aren't many DirectX tutorials in general out there.... is this just because it's for more advanced users?
Lurking on many forums and blogs from industry professionals and indies over many years. You don't really need a single source when you can easily google and get results.
Directx is almost universally hated for a reason. I'm actually surprised this is news to you, a quick google gives you tons of results:
There is also no reason to be rude when I am simply asking for help on a topic: you posting some ridiculous comment with no evidence to support your claim is unhelpful to me and the topic.
I am so sorry you are so easily offended.
People in this field are blunt and to the point. If that hurts your feelings, I would suggest growing thicker skin.
People in this field are blunt and to the point. If that hurts your feelings, I would suggest growing thicker skin.
That's a one-sided argument: you simply cannot google something that's totally one-sided and then provide that as proof: that's like saying that one team is better than the other and fixing all of the scores. It doesn't work that way. And, if it is so universally hated, why would it still be used? I don't understand why you try to argue a point that you know that I'm not going to be persuaded on, as the topic clearly states. You don't have to be rude: just because you lurk forums doesn't make you any smarter or more "correct" than anyone else.
Let's try to bring this back on topic: DirectX really doesn't have much of an updated tutorial list: is there some reason why?
I've done a bit of research, and I've noticed that there really aren't many DirectX tutorials in general out there.... is this just because it's for more advanced users?
Because no one cares much about it.
DirectX > Exclusive to Windows and Windows mobile and Xbox (1, 2, 3).
OpenGL/ES > Exclusive to Windows, OSX, Unix, Android/iOS, Sony Playstation (1, 2, 3, 4), Nintendo gaming devices and w/e else that can use it. I probably missed many on that list for OpenGL/ES.
Edit: To briefly say, it is only worth it to "understand" DirectX if you are doing it for knowledge only. But if you plan anything serious, you pretty much waste your time.
That's a one-sided argument: you simply cannot google something that's totally one-sided and then provide that as proof: that's like saying that one team is better than the other and fixing all of the scores. It doesn't work that way.
I never said one was better than the other, I said directx was garbage, which is the truth.
If you are so unwilling to go and do a tiny bit of research on the subject, then that is your problem, not mine.
And, if it is so universally hated, why would it still be used?
Money, marketing, contracts, the fact that it is bundled with microsoft's APIs and install bases.
But mostly the first three.
MS pays devs more to use directx exclusively, to push the marketing and to have it be the most used platform. It's been this way since the beginning days of directx, back when you were still a baby, in fact, it's been like this even since before you were born.
MS markets the hell out of directx to developers and publishers, in fact, I'd say they spend more money on marketing than they do on development.
Publishers get discounts or paid by MS to use directx, thus, when bringing up contracts for developers, they require use of directx.
So in short, money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money.
I don't understand why you try to argue a point that you know that I'm not going to be persuaded on, as the topic clearly states.
I am not arguing anything, I am stating facts.
If you wish to continue down the road of willful ignorance, you need to re-evaluate your stance on things. And you want to be a programmer? HA!
You don't have to be rude:
Being blunt is not being rude. Learn the difference.
I could be rude if I really wanted to, but I don't honestly think you are worth the effort.
just because you lurk forums doesn't make you any smarter or more "correct" than anyone else.
Actually, it quite does in this respect, as that is how you learn things. You read, and read, and read, things posted by hobbyists, things posted by AAA developers, things posted by startup indies, you read their discussions on these matters, and draw your own conclusion from the data given.
So I would say you are completely wrong here. How do you think most people here, or most people working in these areas for a living got to where they are? You don't just go out and read books and tutorials, that is only 1/3 of the equation, you need to learn directly from those with experience, and given internships are not exactly handed out like candy, forums and blogs by those industry guys are pretty much the best alternative.
You need to expand your horizons, you seem to have a one-track mind.
Let's try to bring this back on topic: DirectX really doesn't have much of an updated tutorial list: is there some reason why?
I am unsure why you are having issues finding something that was just linked to you earlier?
Look at the bottom of the pages bagger linked:
Build date: 3/22/2013
Those are about as recent as they come.
Oh and on that note, you are trying to pull the "this is off topic" card but that doesn't apply here.
My posts are 100% ON topic.
You asked why there are not many DX tutorials.
This is why. I am giving you the reasons they do not exist.
Over 80% of the results are forum posts asking the same question you are, "where can i get directx tutorials?".
IN ADDITION to all this, you are asking for tutorials specifically for DX10 and 11, which no one outside of AAA dev teams uses. Even the indies that use directx never use above DX9. Of course there aren't going to be any tutorials.
I never said one was better than the other, I said directx was garbage, which is the truth.
You've provided no citations for that, except for clearly biased. Additionally, Id say you already lost the argument by evidently- and like the cited blog poster- having no clue what DirectX is. OpenGL and DirectX comparisons are the same as comparing Linux to Windows Explorer; DirectX includes Direct3D, DirectSound, DirectMusic, DirectGraphics, DirectWrite, DirectCompute, DirectPlay, etc. of course support for these particular subsystems varies throughout the versions, but the fact is that DirectX is a complete library that includes Sound,Graphics, Music, and other components, whereas OpenGL is only for Graphics. Most people will never work with OpenGL directly, however; .NET Devs will probably use something like OpenTK, which wraps both OpenGL and OpenAL; C++ devs will likely use SDL or DirectX, depending on their target platform, Java developers will use LWJGL. If you want to actually use "OpenGL" in it's purest forms we're talking about direct native calls to OpenGL32.dll, which is something that is always wrapped by a library by pretty much any sane developer.
If you are so unwilling to go and do a tiny bit of research on the subject, then that is your problem, not mine.
It's sort of like asking if there are ActiveX tutorials; it needs to be more specific. There is always sites like DirectX Tutorial, which cover it; MSDN has plenty of material on it's own, as well. (There are similar tutorials covering the other components of DirectX, such as DirectSound/XAudio and DirectGraphics.)
Money, marketing, contracts, the fact that it is bundled with microsoft's APIs and install bases.
Most Game Developers that choose DirectX don't get money. The latter two could be factored into things such as Microsoft advertising XBox360 Games in various ways to promote them, which of course requires the game to meet certain requirements, not the least of which is, well, running on DirectX, since that is the platform the XBox360 uses. The Playstation 3 uses a separate system as well; I'm not sure if it is based on OpenGL or not. Nonetheless the same thing applies; Sony will advertise via their Sony network various published games, and of course those games need to adhere to specific rules to be published.
MS pays devs more to use DirectX exclusively
big, FAT citation needed. All I can find on this sort of thing is from frothing-at-the-mouth Anti-MS zealots who back up their claims with unsubstantiated rumours and "A friend of a friend of a game developer told me" anecdotes. Of course they can pack it up and pretend the entire thing is under some strict NDA, but then what is the difference between MS and Sony? They both most likely feature that sort of thing.
to push the marketing and to have it be the most used platform. It's been this way since the beginning days of directx, back when you were still a baby, in fact, it's been like this even since before you were born.
Actually the main reason DirectX 3 got any traction was because MS themselves released a few games early on that used it, and Developers figured it was better than DOS games, which were the only alternative. Before that, MS's main competitor was not OpenGL, but actually MS-DOS, and the fact that almost every game was being developed with it. They did heavily promote DX as a platform for developers to move their games towards; but it wasn't in opposition to OpenGL; it was in opposition to DOS, and the fact that while DOS provided hardware-level device access, Windows didn't. DX sought to ammend this. The early versions were pretty crappy. NT4 integrated DirectX 2.Crap, as did 95 OSR2. Ironically, before they included DX2, Microsoft actually provided a software implementation of the current OpenGL API on Windows NT. Of course this usually required a high-end workstation, and was primarily oriented towards CAD and drafting type use; Direct3D was supposed to merely supplement it, and be used by games; presenting a simpler API for a simpler purpose. Incidentally, many games that chose to use OpenGL then still used DirectX for Sound Music, or Network support anyway. So by no means are they mutually exclusive.
OpenGL was only available with EXTREMELY high-end systems of the time, and DirectX was a good choice because it integrated a software renderer, so if the consumer didn't have an accelerated graphics card, missing features could be emulated via software (eg. Transform and Lighting, for example). This was WORLDS ahead of OpenGL; which basically required that all the features being used be implemented by the OpenGL implementation or errors occured. There were software implementations such as MESA, however the problem is that meant it was an all or nothing approach (also, MESA didn't work on windows, which was the primary target market of any sane developer). Either everything was emulated via MESA, or you used the hardware. Most games then had to purposely fallback and make sure all the features they used existed. Different card manufacturers added their own special Extensions over the base OpenGL API, which meant games had to explicitly support each specific implementation.
That isn't to say that DirectX/Direct3D was a walk in the park, feature-wise it was usually behind OpenGL, but it's automatic ability to use Software Rendering when necessary was a huge advantage. Otherwise, many games that otherwise went with OpenGL had to essentially create their own "subsystem"; eg. Quake 2's various Graphics "Drivers" which implemented Graphics support for the game via OpenGL, the Software Rasterizer, or Voodoo. This isn't a bad idea but when you just want to make a quick Windows game that can run on any system you don't want to have to create your own driver framework.
Everyone uses DirectX because API choice in game development is a positive feedback loop, and it was shifted in favor of DirectX in 2005.
It's a positive feedback loop because whenever one API becomes more popular, it keeps becoming more and more popular due to network effects. The most important network effects are as follows: the more popular API gets better support from graphics card vendors, and graphics programmers are more likely to already know how to use it.
DirectX started to become popular because it worked where OpenGL didn't. This is partly because OpenGL rested on the idea that the Implementation would figure out details, and essentially meant that any game that needed a certain 3-D feature would either have to make bloody sure that feature was available (eg. Occlusion culling) before using it, or crash. Same for features such as Transform and Lighting. And of course if your card's Video Driver didn't include an OpenGL implementation you were pretty much screwed. Why didn't vendors always include OpenGL Implementations in their Windows Drivers? I would imagine primarily because they would have to pretty much write a software renderer for every feature. Many early cards didn't support things like Transform and Lighting, so an OpenGL Driver for those sorts of cards probably wouldn't work for any game anyway, of which most required features like that (or non power of two textures and those sorts of things). So the manufacturers didn't bother to implement an interface that wouldn't be usable anyway. DirectX, however, meant they could implement those features their hardware did support, and DirectX would fill in the blanks; this included DirectMusic,DirectSound,Direct3D, DirectDraw, etc. All of which could be emulated in the software without additional work by the game or application. You ask for Transform and Lighting and you get transform and lighting, basically; it might be emulated and you can inspect whether those features are available in the interest of performance, but the fact that if you asked the framework to do something, it would either get the driver to do it, or if the driver said "nope dunno how to do Transform and Lighting" then it would go "fine, I'll do it myself" and it would perform software emulation of the feature. The fact that it got popular because it was better is not an indication of some conspiracy with vendors (software and hardware) by Microsoft. It just means that the implementation and usage of the API- while Direct3D didn't encompass the entire OpenGL feature set- was very enticing because it basically offloaded machine-specific concerns to the run-time.
MS markets the hell out of directx to developers and publishers, in fact, I'd say they spend more money on marketing than they do on development.
I wonder if there is evidence to support this, or if it's a shot in the dark. I'm going to assume the latter.
Publishers get discounts or paid by MS to use directx, thus, when bringing up contracts for developers, they require use of directx.
Same here. There are no "contracts" or "discounts" when it comes to releasing games for windows. Even the Games for Windows Logo makes no requirement that the game use DirectX or Direct3D; in fact most games with the "Games For Windows" certification use OpenGL. With Xbox 360, of course, you need to use Direct3D and XInput, but that's just how the console works; arguing that this is some sort of forceful strongarming into the market falls apart when you realize you could easily apply the same logic to things like the PS3. Not to mention we have the issue that if MS had actually gone with OpenGL and OpenAL or some similar framework for their console, that would have told people that DirectX wasn't worth using; the fact that there are a multitude of titles for the system sort of tells us otherwise.
I am not arguing anything, I am stating facts.
Eh. not really. You're citing biased articles and presenting as evidence google result counts. This is like if I was to argue that because searching for 'Chickens are Funny' on youtube gets me 10,700,000 results, that we should make chickens to stand-up comedy.
Actually, it quite does in this respect, as that is how you learn things. You read, and read, and read, things posted by hobbyists, things posted by AAA developers, things posted by startup indies, you read their discussions on these matters, and draw your own conclusion from the data given.
There is nothing preventing a person from learning both. Personally I think they are both ridiculous; DirectX relies heavily on COM interfaces which limits it's viability with non-C++ languages as well as presenting a difficulty to get it ported to other systems, since a COM framework needs to be created first. OpenGL relies on a low-level C API which purports to be language and platform agnostic but relies heavily on the implementation of the spec by the hardware manufacturer as well as developing in a language that allows you to perform native calls; which adds another monkey wrench in the works if you are aiming for platform agnosticism; DX doesn't even purport it as a possibility, OpenGL does but it's still a PITA). This is usually solvable using a wrapper, but in so many ways, OpenGL is already a wrapper around hardware capabilities, which makes it silly.
So I would say you are completely wrong here. How do you think most people here, or most people working in these areas for a living got to where they are? You don't just go out and read books and tutorials, that is only 1/3 of the equation, you need to learn directly from those with experience, and given internships are not exactly handed out like candy, forums and blogs by those industry guys are pretty much the best alternative.
Well, that cited article has a number of fallacies; for example, in terms of sheer numbers far more developers know OpenGL than DirectX. Even if we did a Apples to Apples Comparison between OpenGL and Direct3D, we'd find more have expertise with OpenGL than DirectX. The irony is that more people know OpenGL than DirectX for the same reason that was cited in the article, but for D3D; that is, it was popular and de-facto so it continued to be used, or at least supported. There was a fallback around the time of DX8 because Direct3D was pretty much feature par with OpenGL at the time, and since Windows was pretty much the exclusive target anyway, some dev shops dumped OpenGL and made games in DirectX, and continue to do so, in many cases. Other firms stuck with OpenGL; for example ,id Software stuck with OpenGL until relatively recently, when Carmack took another look at Direct3D and declared it to be better than OpenGL. (I'm inclined to take his word on that rather than some random game developer posting on a blog). The reasons are many and too many to list here, and include both issues with OpenGL implementation and execution, Support, feature-wise, with manufacturers, poor communication about the actual requirements of the specification, etc. Add on that OpenGL is building upon a relatively ancient C library designed originally for Solaris Workstations and we can see that if OpenGL loses popularity, it's not because Microsoft Choked it out of the market with strong-arm monopoly tactics, but rather because it sucked. I doubt, however, that OpenGL is going anywhere; it's ability to work on multiple platforms is huge and is partly why most games use an engine of some sort (developed in-house or otherwise; eg. Need for Speed: High Stakes uses an updated engine based on the same codebase as Need for Speed III); Quake II/III used a 'plugin' style system for video adapters, etc. This was of course because for a time Manufacturers did support Direct3D better than OpenGL; primarily because, as I mentioned, they would have to emulate pretty much everything if they made an OpenGL implementation, whereas with DX they got software emulation for free. All they had to say was "Nope not implemented" and DX did it itself. So for Windows, the 'engine' could use DirectX, and on higher-end systems with OpenGL (or even Glide) it could use that other system; and the game logic wouldn't be the wiser. Usually it's only the Engine developers that need to care about this anyway, and we start to see this house of cards fall apart. You don't need to know the difference between the OpenGL and Direct3D Field of View if you are using an Engine; most games use an engine, particularly Independent developers; Most engines are developed to support or allow support for multiple platforms. Some engines, as described above, allow you to select between OpenGL and Direct3D, but to the game developers behind the actual game logic, the differences don't really matter- they can't see nor do they have to deal with either; they just have to deal with, say, Unity.
IN ADDITION to all this, you are asking for tutorials specifically for DX10 and 11, which no one outside of AAA dev teams uses. Even the indies that use directx never use above DX9. Of course there aren't going to be any tutorials.
There are plenty of tutorials. There is of course the page on MSDN; There is another one here ; There are also Books on the topic, as well. Most of the reason Indie's would be using DX9 is because they are using XNA, which uses DX9. This is mostly because XBox360 only has hardware support for DX9, as far as I recall. Another big reason is simply because the features DX10/11 has really don't come into play when it comes to a small game; things such as GPU computations and advanced Shader support are usually beyond the scope of a game created by a small team; and using DX9 means that the game will be more compatible among systems which don't have DX10/11, so it's really the sensible choice between them.
Why one would choose DirectX over OpenGL would primarily be because DirectX contains a wealth of components; the only direct equivalent to OpenGL is the Direct3D part, but you've also got DirectCompute (for computing on the GPU), DirectSound, DirectMedia, XAudio, DXGI, DirectInput etc etc; it basically means you don't have to go hunting for all these other components. This can be a strong motivating factor to choose DirectX, depending on the target platform.
The biggest downside to DirectX, at least when used directly from C++, is that you need to be familiar with COM. COM can (and does) fill entire books with it's usage. It's not a simple Component Model, and this is mostly because they are trying to provide Binary compatibility between compiled C++ components. the D3D C++ examples better illustrate this, in that some of the first questions a person might ask are... "wtf is QueryInterface? wtf is IUnknown? Why does that class implement IDispatch?" and so on. One could argue that MS used COM to try to push that technology- but at the same time if they hadn't used COM people would be asking why MS wasn't dog-fooding it. Basically, if you don't learn COM, learning to use Any part of DX is going to be struggle where you basically try to learn two things at once.
Unless you intend to write an actual Engine, I don't think you should bother to learn either Direct3D/DirectX or OpenGL; just use a Library that wraps them, such as SlimDX,SDL, OpenTK, etc.
"If you aren't ashamed of what you coded 6 months ago, you aren't progressing as much as you should." - My Website : Altar-Apps,Applications, Libraries, APIs, Code snippets and the Heart of Sin roguelike game!
Many, many, many experienced devs in the industry say the same thing.
Their documentation is very unhelpful, and assumes you already know how to use DirectX, which really is a problem when you are making a tutorial.... I tried these but they were all for Windows Store applications. There was another section for Win32 games, but that section really didn't help all that much because the tutorials were jumbled.
OpenGL is an absolute pain to install and was not installing on my system. DirectX also has a larger range of capabilities than OpenGL, and I know that many developers I know use DirectX.
Wat? Your IDE should come with the OpenGL development stuff (MinGW, Cygwin, and MSVC++ all do) and your graphics card drivers should come with the runtime.
OTOH in my opinion you shouldn't bother with either right now and instead go with an existing graphics engine so you can focus on writing whatever it is you want rather than fighting with low level graphics APIs.
Huh, I don't have MinGw or Cygwin as far as I know..... that's rather odd. xD I may just go with an existing graphics engine, but I do want to learn about DirectX so I understand how the actual graphics work. I ordered a book for $5.00 off of Amazon that's pretty recent, so I might just end up going with that.... any other suggestions?
Noooooooooooo.
This could not be further from the truth.
What do you have to back up your claim? I have done research on the topic and all I see that's better is slightly better optimization and cross-platform compatibility. That, in my opinion, is not that much of a benefit over DirectX's benefits.
Sources:
http://user.xmission...-vs-opengl.html
http://en.wikipedia....GL_and_Direct3D
There is also no reason to be rude when I am simply asking for help on a topic: you posting some ridiculous comment with no evidence to support your claim is unhelpful to me and the topic.
I've done a bit of research, and I've noticed that there really aren't many DirectX tutorials in general out there.... is this just because it's for more advanced users?
Directx is almost universally hated for a reason. I'm actually surprised this is news to you, a quick google gives you tons of results:
https://www.google.c...y directx sucks
I am so sorry you are so easily offended.
People in this field are blunt and to the point. If that hurts your feelings, I would suggest growing thicker skin.
That's a one-sided argument: you simply cannot google something that's totally one-sided and then provide that as proof: that's like saying that one team is better than the other and fixing all of the scores. It doesn't work that way. And, if it is so universally hated, why would it still be used? I don't understand why you try to argue a point that you know that I'm not going to be persuaded on, as the topic clearly states. You don't have to be rude: just because you lurk forums doesn't make you any smarter or more "correct" than anyone else.
Let's try to bring this back on topic: DirectX really doesn't have much of an updated tutorial list: is there some reason why?
Because no one cares much about it.
DirectX > Exclusive to Windows and Windows mobile and Xbox (1, 2, 3).
OpenGL/ES > Exclusive to Windows, OSX, Unix, Android/iOS, Sony Playstation (1, 2, 3, 4), Nintendo gaming devices and w/e else that can use it. I probably missed many on that list for OpenGL/ES.
Edit: To briefly say, it is only worth it to "understand" DirectX if you are doing it for knowledge only. But if you plan anything serious, you pretty much waste your time.
If you are so unwilling to go and do a tiny bit of research on the subject, then that is your problem, not mine.
Money, marketing, contracts, the fact that it is bundled with microsoft's APIs and install bases.
But mostly the first three.
MS pays devs more to use directx exclusively, to push the marketing and to have it be the most used platform. It's been this way since the beginning days of directx, back when you were still a baby, in fact, it's been like this even since before you were born.
Some light reading for you:
http://blog.wolfire....and-not-DirectX
MS markets the hell out of directx to developers and publishers, in fact, I'd say they spend more money on marketing than they do on development.
Publishers get discounts or paid by MS to use directx, thus, when bringing up contracts for developers, they require use of directx.
So in short, money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money,money.
I am not arguing anything, I am stating facts.
If you wish to continue down the road of willful ignorance, you need to re-evaluate your stance on things. And you want to be a programmer? HA!
Being blunt is not being rude. Learn the difference.
I could be rude if I really wanted to, but I don't honestly think you are worth the effort.
Actually, it quite does in this respect, as that is how you learn things. You read, and read, and read, things posted by hobbyists, things posted by AAA developers, things posted by startup indies, you read their discussions on these matters, and draw your own conclusion from the data given.
So I would say you are completely wrong here. How do you think most people here, or most people working in these areas for a living got to where they are? You don't just go out and read books and tutorials, that is only 1/3 of the equation, you need to learn directly from those with experience, and given internships are not exactly handed out like candy, forums and blogs by those industry guys are pretty much the best alternative.
You need to expand your horizons, you seem to have a one-track mind.
I am unsure why you are having issues finding something that was just linked to you earlier?
Look at the bottom of the pages bagger linked:
Those are about as recent as they come.
Oh and on that note, you are trying to pull the "this is off topic" card but that doesn't apply here.
My posts are 100% ON topic.
You asked why there are not many DX tutorials.
This is why. I am giving you the reasons they do not exist.
Heres an example:
https://www.google.c...pengl tutorials
Look how many tutorials are in the results! Pages of them!
Now lets flip the coin:
https://www.google.c...rectx tutorials
Over 80% of the results are forum posts asking the same question you are, "where can i get directx tutorials?".
IN ADDITION to all this, you are asking for tutorials specifically for DX10 and 11, which no one outside of AAA dev teams uses. Even the indies that use directx never use above DX9. Of course there aren't going to be any tutorials.
You've provided no citations for that, except for clearly biased. Additionally, Id say you already lost the argument by evidently- and like the cited blog poster- having no clue what DirectX is. OpenGL and DirectX comparisons are the same as comparing Linux to Windows Explorer; DirectX includes Direct3D, DirectSound, DirectMusic, DirectGraphics, DirectWrite, DirectCompute, DirectPlay, etc. of course support for these particular subsystems varies throughout the versions, but the fact is that DirectX is a complete library that includes Sound,Graphics, Music, and other components, whereas OpenGL is only for Graphics. Most people will never work with OpenGL directly, however; .NET Devs will probably use something like OpenTK, which wraps both OpenGL and OpenAL; C++ devs will likely use SDL or DirectX, depending on their target platform, Java developers will use LWJGL. If you want to actually use "OpenGL" in it's purest forms we're talking about direct native calls to OpenGL32.dll, which is something that is always wrapped by a library by pretty much any sane developer.
It's sort of like asking if there are ActiveX tutorials; it needs to be more specific. There is always sites like DirectX Tutorial, which cover it; MSDN has plenty of material on it's own, as well. (There are similar tutorials covering the other components of DirectX, such as DirectSound/XAudio and DirectGraphics.)
Most Game Developers that choose DirectX don't get money. The latter two could be factored into things such as Microsoft advertising XBox360 Games in various ways to promote them, which of course requires the game to meet certain requirements, not the least of which is, well, running on DirectX, since that is the platform the XBox360 uses. The Playstation 3 uses a separate system as well; I'm not sure if it is based on OpenGL or not. Nonetheless the same thing applies; Sony will advertise via their Sony network various published games, and of course those games need to adhere to specific rules to be published.
big, FAT citation needed. All I can find on this sort of thing is from frothing-at-the-mouth Anti-MS zealots who back up their claims with unsubstantiated rumours and "A friend of a friend of a game developer told me" anecdotes. Of course they can pack it up and pretend the entire thing is under some strict NDA, but then what is the difference between MS and Sony? They both most likely feature that sort of thing.
Actually the main reason DirectX 3 got any traction was because MS themselves released a few games early on that used it, and Developers figured it was better than DOS games, which were the only alternative. Before that, MS's main competitor was not OpenGL, but actually MS-DOS, and the fact that almost every game was being developed with it. They did heavily promote DX as a platform for developers to move their games towards; but it wasn't in opposition to OpenGL; it was in opposition to DOS, and the fact that while DOS provided hardware-level device access, Windows didn't. DX sought to ammend this. The early versions were pretty crappy. NT4 integrated DirectX 2.Crap, as did 95 OSR2. Ironically, before they included DX2, Microsoft actually provided a software implementation of the current OpenGL API on Windows NT. Of course this usually required a high-end workstation, and was primarily oriented towards CAD and drafting type use; Direct3D was supposed to merely supplement it, and be used by games; presenting a simpler API for a simpler purpose. Incidentally, many games that chose to use OpenGL then still used DirectX for Sound Music, or Network support anyway. So by no means are they mutually exclusive.
OpenGL was only available with EXTREMELY high-end systems of the time, and DirectX was a good choice because it integrated a software renderer, so if the consumer didn't have an accelerated graphics card, missing features could be emulated via software (eg. Transform and Lighting, for example). This was WORLDS ahead of OpenGL; which basically required that all the features being used be implemented by the OpenGL implementation or errors occured. There were software implementations such as MESA, however the problem is that meant it was an all or nothing approach (also, MESA didn't work on windows, which was the primary target market of any sane developer). Either everything was emulated via MESA, or you used the hardware. Most games then had to purposely fallback and make sure all the features they used existed. Different card manufacturers added their own special Extensions over the base OpenGL API, which meant games had to explicitly support each specific implementation.
That isn't to say that DirectX/Direct3D was a walk in the park, feature-wise it was usually behind OpenGL, but it's automatic ability to use Software Rendering when necessary was a huge advantage. Otherwise, many games that otherwise went with OpenGL had to essentially create their own "subsystem"; eg. Quake 2's various Graphics "Drivers" which implemented Graphics support for the game via OpenGL, the Software Rasterizer, or Voodoo. This isn't a bad idea but when you just want to make a quick Windows game that can run on any system you don't want to have to create your own driver framework.
A lot of this is not true.
DirectX started to become popular because it worked where OpenGL didn't. This is partly because OpenGL rested on the idea that the Implementation would figure out details, and essentially meant that any game that needed a certain 3-D feature would either have to make bloody sure that feature was available (eg. Occlusion culling) before using it, or crash. Same for features such as Transform and Lighting. And of course if your card's Video Driver didn't include an OpenGL implementation you were pretty much screwed. Why didn't vendors always include OpenGL Implementations in their Windows Drivers? I would imagine primarily because they would have to pretty much write a software renderer for every feature. Many early cards didn't support things like Transform and Lighting, so an OpenGL Driver for those sorts of cards probably wouldn't work for any game anyway, of which most required features like that (or non power of two textures and those sorts of things). So the manufacturers didn't bother to implement an interface that wouldn't be usable anyway. DirectX, however, meant they could implement those features their hardware did support, and DirectX would fill in the blanks; this included DirectMusic,DirectSound,Direct3D, DirectDraw, etc. All of which could be emulated in the software without additional work by the game or application. You ask for Transform and Lighting and you get transform and lighting, basically; it might be emulated and you can inspect whether those features are available in the interest of performance, but the fact that if you asked the framework to do something, it would either get the driver to do it, or if the driver said "nope dunno how to do Transform and Lighting" then it would go "fine, I'll do it myself" and it would perform software emulation of the feature. The fact that it got popular because it was better is not an indication of some conspiracy with vendors (software and hardware) by Microsoft. It just means that the implementation and usage of the API- while Direct3D didn't encompass the entire OpenGL feature set- was very enticing because it basically offloaded machine-specific concerns to the run-time.
I wonder if there is evidence to support this, or if it's a shot in the dark. I'm going to assume the latter.
Same here. There are no "contracts" or "discounts" when it comes to releasing games for windows. Even the Games for Windows Logo makes no requirement that the game use DirectX or Direct3D; in fact most games with the "Games For Windows" certification use OpenGL. With Xbox 360, of course, you need to use Direct3D and XInput, but that's just how the console works; arguing that this is some sort of forceful strongarming into the market falls apart when you realize you could easily apply the same logic to things like the PS3. Not to mention we have the issue that if MS had actually gone with OpenGL and OpenAL or some similar framework for their console, that would have told people that DirectX wasn't worth using; the fact that there are a multitude of titles for the system sort of tells us otherwise.
Eh. not really. You're citing biased articles and presenting as evidence google result counts. This is like if I was to argue that because searching for 'Chickens are Funny' on youtube gets me 10,700,000 results, that we should make chickens to stand-up comedy.
There is nothing preventing a person from learning both. Personally I think they are both ridiculous; DirectX relies heavily on COM interfaces which limits it's viability with non-C++ languages as well as presenting a difficulty to get it ported to other systems, since a COM framework needs to be created first. OpenGL relies on a low-level C API which purports to be language and platform agnostic but relies heavily on the implementation of the spec by the hardware manufacturer as well as developing in a language that allows you to perform native calls; which adds another monkey wrench in the works if you are aiming for platform agnosticism; DX doesn't even purport it as a possibility, OpenGL does but it's still a PITA). This is usually solvable using a wrapper, but in so many ways, OpenGL is already a wrapper around hardware capabilities, which makes it silly.
Well, that cited article has a number of fallacies; for example, in terms of sheer numbers far more developers know OpenGL than DirectX. Even if we did a Apples to Apples Comparison between OpenGL and Direct3D, we'd find more have expertise with OpenGL than DirectX. The irony is that more people know OpenGL than DirectX for the same reason that was cited in the article, but for D3D; that is, it was popular and de-facto so it continued to be used, or at least supported. There was a fallback around the time of DX8 because Direct3D was pretty much feature par with OpenGL at the time, and since Windows was pretty much the exclusive target anyway, some dev shops dumped OpenGL and made games in DirectX, and continue to do so, in many cases. Other firms stuck with OpenGL; for example ,id Software stuck with OpenGL until relatively recently, when Carmack took another look at Direct3D and declared it to be better than OpenGL. (I'm inclined to take his word on that rather than some random game developer posting on a blog). The reasons are many and too many to list here, and include both issues with OpenGL implementation and execution, Support, feature-wise, with manufacturers, poor communication about the actual requirements of the specification, etc. Add on that OpenGL is building upon a relatively ancient C library designed originally for Solaris Workstations and we can see that if OpenGL loses popularity, it's not because Microsoft Choked it out of the market with strong-arm monopoly tactics, but rather because it sucked. I doubt, however, that OpenGL is going anywhere; it's ability to work on multiple platforms is huge and is partly why most games use an engine of some sort (developed in-house or otherwise; eg. Need for Speed: High Stakes uses an updated engine based on the same codebase as Need for Speed III); Quake II/III used a 'plugin' style system for video adapters, etc. This was of course because for a time Manufacturers did support Direct3D better than OpenGL; primarily because, as I mentioned, they would have to emulate pretty much everything if they made an OpenGL implementation, whereas with DX they got software emulation for free. All they had to say was "Nope not implemented" and DX did it itself. So for Windows, the 'engine' could use DirectX, and on higher-end systems with OpenGL (or even Glide) it could use that other system; and the game logic wouldn't be the wiser. Usually it's only the Engine developers that need to care about this anyway, and we start to see this house of cards fall apart. You don't need to know the difference between the OpenGL and Direct3D Field of View if you are using an Engine; most games use an engine, particularly Independent developers; Most engines are developed to support or allow support for multiple platforms. Some engines, as described above, allow you to select between OpenGL and Direct3D, but to the game developers behind the actual game logic, the differences don't really matter- they can't see nor do they have to deal with either; they just have to deal with, say, Unity.
There are plenty of tutorials. There is of course the page on MSDN; There is another one here ; There are also Books on the topic, as well. Most of the reason Indie's would be using DX9 is because they are using XNA, which uses DX9. This is mostly because XBox360 only has hardware support for DX9, as far as I recall. Another big reason is simply because the features DX10/11 has really don't come into play when it comes to a small game; things such as GPU computations and advanced Shader support are usually beyond the scope of a game created by a small team; and using DX9 means that the game will be more compatible among systems which don't have DX10/11, so it's really the sensible choice between them.
Why one would choose DirectX over OpenGL would primarily be because DirectX contains a wealth of components; the only direct equivalent to OpenGL is the Direct3D part, but you've also got DirectCompute (for computing on the GPU), DirectSound, DirectMedia, XAudio, DXGI, DirectInput etc etc; it basically means you don't have to go hunting for all these other components. This can be a strong motivating factor to choose DirectX, depending on the target platform.
The biggest downside to DirectX, at least when used directly from C++, is that you need to be familiar with COM. COM can (and does) fill entire books with it's usage. It's not a simple Component Model, and this is mostly because they are trying to provide Binary compatibility between compiled C++ components. the D3D C++ examples better illustrate this, in that some of the first questions a person might ask are... "wtf is QueryInterface? wtf is IUnknown? Why does that class implement IDispatch?" and so on. One could argue that MS used COM to try to push that technology- but at the same time if they hadn't used COM people would be asking why MS wasn't dog-fooding it. Basically, if you don't learn COM, learning to use Any part of DX is going to be struggle where you basically try to learn two things at once.
Unless you intend to write an actual Engine, I don't think you should bother to learn either Direct3D/DirectX or OpenGL; just use a Library that wraps them, such as SlimDX,SDL, OpenTK, etc.
Oh, i could also enter "why X sucks" and gets a platoon of blog entries about why X sucks, if X is popular enough. Biased source is biased.
- My Website : Altar-Apps, Applications, Libraries, APIs, Code snippets and the Heart of Sin roguelike game!