What does DirectX do that engines don't?

PCunicorn

Active Member
The question should be simple. What does DirectX/OpenGL/Mantle do that the engine (Cryengine, Unreal, Frostbite, etc.) does not?
 
The question should be simple. What does DirectX/OpenGL/Mantle do that the engine (Cryengine, Unreal, Frostbite, etc.) does not?

I believe Direct X is like the instruction set for the engine. The engine has to be written around it or within it (using the SDK). Its an API which would basically mean it would be a sort of software instruction set for other software.

If that makes any sense. It doesnt "do" anything that the engines do not, it just allows them to work on Windows.
 
DirectX is low-level API, and was created to abstract away hardware; two decades ago it was still usual for games to have to be specifically programmed to support a given device - now, with Direct3D for example, it doesn't matter if it's Intel, ATI or NVIDIA chip, DirectX let's you program against a uniform API regardless of what hardware the system has. Engines can be built atop DirectX; Direct3D, for example, only deals with low-level graphics stuff like actually rasterising triangles, which isn't terribly interesting for someone making a game. If you're actually making a game, you want to deal with abstractions like "guy M in position (x,y) heading towards (x', y')", not details like "point p of triangle t in mesh m oriented according to transformation matrix M located inside octtree node n will have primary colour c1 and specular reflection c2". That's what engines are for.
 
DirectX is low-level API, and was created to abstract away hardware; two decades ago it was still usual for games to have to be specifically programmed to support a given device - now, with Direct3D for example, it doesn't matter if it's Intel, ATI or NVIDIA chip, DirectX let's you program against a uniform API regardless of what hardware the system has. Engines can be built atop DirectX; Direct3D, for example, only deals with low-level graphics stuff like actually rasterising triangles, which isn't terribly interesting for someone making a game. If you're actually making a game, you want to deal with abstractions like "guy M in position (x,y) heading towards (x', y')", not details like "point p of triangle t in mesh m oriented according to transformation matrix M located inside octtree node n will have primary colour c1 and specular reflection c2". That's what engines are for.


OpenGL is the exact same thing. Engines are built using them. So, technically, they are both capable of achieving the same goal. Using an engine just makes it easier.

The difference between the two API's is that DirectX is more catered to games, as well as being a Windows only API. OpenGL works on any platform without modification.

There will be people that swear by either, but at the end of the day, you can honestly make a game that looks/run as good on one as the other. AAA devs generally opt for DirectX because, as I said, Microsoft caters it towards games. I guess that makes it easier to work with.
 
Last edited:
I only know OpenGL myself, but in case of OpenGL3, for example, stuff like framebuffer objects were bought in that allow you to do off-screen rendering. This allows you to render stuff in multiple passes, generate textures real-time, render the scene from another point of view for use in reflections and the likes, and so on; these are all things that were really difficult to do with OpenG L2.1 and usually couldn't be used extensively without crippling performance. And of course, the shading language was upgraded too. This is just to give an idea of what they might have done; I don't know Direct3D and have no idea of the feature parity between Direct3D and OpenGL (though OpenGL 2.x is usually considered roughly equivalent to Dx9, OpenGL 3.x Dx10, and OpenGL4 to Dx11.)
 
The easiest way to show why it's better is comparing the same scene in different renderings (9/10/11). http://www.overclock.net/t/597046/dx11-vs-dx10-vs-dx-9-pics

The rooftop shot is the best example. The roof tiles look a lot more realistic than the flat things they were in DX9.

Didnt see really any difference between 9 and 10 in those screens. Which makes sense as from what I hear the reason DX10 had a short life was because developers found out they could achieve the same thing in DX9 DX10 was just better optimized for said features.
 
Nonsense, the only reason that happened is because a lot of games are console ports. Look at company of heros in both and say that. night and day.

DX 9

9b4.jpg



DX10

9b25.jpg
 
Nonsense, the only reason that happened is because a lot of games are console ports. Look at company of heros in both and say that. night and day.

DX 9

9b4.jpg



DX10

9b25.jpg

http://www.computerandvideogames.com/176533/features/directx-10-has-it-delivered/

Im not saying there is NO difference between 10 and 9, obviously there is, however I have not seen anything done in DirectX 10 that cannot be done in DirectX 9. Your screenshots of a game that appears to have been made long before DX9 and DX10 dont exactly display anything also considering they are different locales in the game.

Developers stuck with DX9 because they saw no true advantage to make DX10 mainstream (according to them, I am sure console hardware had something to do with it but Im not the one coding games).

Your DX10 screen shows things that could be done using DX7. Although, Im sure it runs alot faster using DX10.

Also note, developers such as Crytek can disable such features in the different modes. That doesnt mean DX9 cant do it, it just means the developers chose to disable certain features running in DX9 mode.
 
Last edited:
Yes, it does mean they can't do it Direct X works in such a way that each iteration has support for what the previous version had, plus extras, hence why you don't have to download DX9, 10 and 11 seperately, you can just get 11 as it has all of the features of 9 and 10, plus more.

It is because of this that we get DX10 and 11 games now and for years, even though the previous gen consoles out at the time, the 360 and PS3, only supported up to DX9 (though the 360 had a sort of DX10...). Games could be made with DX10 and 11 features that could be cut out for consoles and games that couldn't handle it and retained for the PC's.

As for the life of DX10, it wasn't short at all. From the release of 7 to 8 was two years, from 8 to 9 was two years, from 9 to 10 was just under 4 and from 10 to 11 was just under 3. DX10 was as long as the others were, the only reason you didn't see so much of it was because most games that used it also supported DX9 and you didn't need to toggle between the two, it was just that some graphics settings took advantage of the platform, whereas others worked on technologies introduced in earlier DX versions

=EDIT=

also CoH was released in 2006, the year that DX10 was released. It is an RTS game, RTS games don't have the blinding graphics that FPS games have because they don't have to load a dozen things, they have to load and have hundreds, in some cases thousands of things on screen at once. Try having thousands of beautifully textured, fully animated sprites on screen at once and just see what happens. There is a huge difference between the screenshots there and the settings, just as there is a difference between Crysis in DX9 and 10 and every other game. I am not going to say it is as pronounced as DX10 to 11, but the differences are there and noticable, some games just do not take full advantage
 
Last edited:
Try having thousands of beautifully textured, fully animated sprites on screen at once and just see what happens.

Sprites? I bet we could do BILLIONS! ;) I know what you meant, it's just funnier to purposely misunderstand :P
 
Back
Top