Direct X, Open GL, D3D...?

Joined
Sep 18, 2003
Messages
1,861
Reaction score
0
Why choose one over another? Why isnt there one standard? And what do they all mean?
 
DirectX and D3D are pretty much the same thing, D3D is the graphics part of DirectX and between DirectX and Open GL theres two things to think about when deciding between them (From a developer perspective) DirectX is considered by many (Gabe Newell included) to be more advanced, while Open GL is available on most every platform. So it comes down to features vs. portability.
 
Hopefully though, with the new version of OpenGL things will be equal once more. It's always worth noting that nVidia have famously been a lot better at OpenGL than DirectX (the opposite of ATI). Also remember that serious CAD/CAM applications favour OpenGL.
 
The Terminator said:
Why isnt there one standard?
If there was only one standard, then life would be a lot easier for the GPU developers. Of course, Microsoft will never drop DirectX. But OpenGL is also here to stay, as it's portable, easier to code for and it can support new hardware features faster with the use of extensions.
So it looks like there will be two graphic languages for a loooong time.
 
Yeah, its the portability that OpenGL wins on... But DirectX is a more complete package I beleive. Personally I prefer DirectX, as of version 8. (the ones before where so and so compared to OpenGL).
ALL the games using OpenGL engines have had a tendancy to be terribly slow (except the Quake series), not really qualified for what they render. The latest example is KOTOR. It does have some fancy effects not available in the other OGL games though, so there isnt a comparison on how fast it "could" be. But keep in mind this is also a tuned second generation engine.
 
dawdler said:
Yeah, its the portability that OpenGL wins on... But DirectX is a more complete package I beleive. Personally I prefer DirectX, as of version 8. (the ones before where so and so compared to OpenGL).
ALL the games using OpenGL engines have had a tendancy to be terribly slow (except the Quake series), not really qualified for what they render. The latest example is KOTOR. It does have some fancy effects not available in the other OGL games though, so there isnt a comparison on how fast it "could" be. But keep in mind this is also a tuned second generation engine.

serious sam was fast and if you switch off fast write so is COD and that has pixel shaders.
 
wot is fast write? i just have it enabled but dont know wot it does
 
True there are exceptions. But if I'm not mistaken, Serious Sam isnt exactly high detail? It was designed to show a crapload of enemies on the screen. I've never played it though, not my cup of tea :)

Regarding software mode, yes its cool... But doing it with in realtime with shadows, radiosity, antialias, depth of field, volume lights, reflections, etc is not exactly the fastest thing there is.
I beleive I averaged at around 1.5 fps in 320x240 in the realstorm benchmark :)
 
Fast Writes capability enables the CPU to send data directly to the graphics bus without going through the
system memory. - from Nvidia white paper

Although fast writes in theory should make a big difference in practice it doesn't and just causes instabuility.

Dawdler: serious sam has over 1000 enemys on screen at once without a slow down with detail better than that of HL which is pretty good, besides there's the Doom3 engine which although i'm not a big fan of, you have to admit is pretty good.
 
Although fast writes in theory should make a big difference in practice it doesn't and just causes instabuility.
That's not entirerly true, I've always had fw on and never encountered any stability issues.

Anyway, regarding those OGL engines: maybe if you work REALLY hard on them, they are fast. SS required a crapload of enemies to show on screen, thus had to be fast. Doom3 draws a crapload of polygons on screen with realtime shadows and junk, and thus have to be fast. Quake 3 was the epitome of an engine (at the time) and thus was worked alot on (by the best coder around too)... I might be totally wrong, I've never coded in either OGL or DX, but I just get the feeling its easier to get DX right and fast.

I mean, take NWN. Not a very fast engine on fairly fast cards... Not for what it displays, its very lowpoly if you think on it... Then we go to the second generation NWN engine that KOTOR use. Its an AWFULL performer most of the time, and it STILL cant do smooth shadows on ATI cards! People that go "ooh, its impossible, only Nvidia cards can do this right!" should play Max Payne 2 on an ATI card. Granted, its DirectX 8.1, but it WORKS. And its FAST. Actually DAMN FAST! And keep in mind, the KOTOR engine is NOT NWN+ or something, its just ground based on it (nearly the entire thing is redone). While the MP2 engine IS MP+, just very optimised (darn optimised).
 
I don't think you can conclude that OpenGL is slower then DirectX just by comparing KOTOR with MP2. For example, if I compared the performance of OpenGL Doom3 with DirectX Halo then I would come to an entirely different conclusion. The performance of a game engine is largely dependant on the skills of its developers. Also, clever level design can help the performance of a game greatly. Blocking the players' view with walls or hills at GPU-intensive locations can make a big difference in fps, and that's totally independant of whether OpenGL or DirectX was used.

The question remains what the most developer-friendly graphics language is. From my personal experience I have to say that OpenGL is much easier to get into. Rendering a couple of textured triangles is done more intuitive in OpenGL then in DirectX. I have no idea how it compares when doing more complex things, though.
 
Right now graphically OpenGL can not compare to DX9 simply because of a lack of support for advanced Pixel and Vertex shaders. I think OpenGL only supports PS1.1 right now where as DX9 has PS2.0 and vertex shaders on top of it. But as jonbob already said, once OpenGL2.0 comes out, it should be a different story.
 
I wish there was just one standard. DX. Then the gfx cards would be better, cause they could focus on those, game would be better optimized, and come out faster maybe. It would be better for everyone.
 
I think Mr. Gates needs competition...I don't think the market would be better off with only DirectX or OpenGL. If only one did exist, it would be OpenGL.
 
The Terminator said:
I wish there was just one standard. DX. Then the gfx cards would be better, cause they could focus on those, game would be better optimized, and come out faster maybe. It would be better for everyone.


In theory, sure.


But I prefer the choice.......


why have one standard when you can have two?

we need to force develpers/manufactures to use both .....not have them force us to use one.
 
Anable said:
Right now graphically OpenGL can not compare to DX9 simply because of a lack of support for advanced Pixel and Vertex shaders. I think OpenGL only supports PS1.1 right now where as DX9 has PS2.0 and vertex shaders on top of it. But as jonbob already said, once OpenGL2.0 comes out, it should be a different story.

Although the OpenGl core does not support pixel and vertex shaders, they are available through extensions right now.

edit: I should add that not all extensions are available to all cards. Some are Nvidia specific, and some are ATI specific (although the vertex and pixel shader extensions are available to all cards).
 
Arno said:
I don't think you can conclude that OpenGL is slower then DirectX just by comparing KOTOR with MP2.
I wasnt comparing speed, I was comparing work.

NWN has an OpenGL engine, Aurora or whatever its called, the first by Bioware to my knowledge.
KOTOR also has an OpenGL engine, based on the foundations of Aurora (hence, 2nd generation), but otherwise totally new. They have no doubt tuned it and used all their knowledge from before to make it good. Still it can chug heavily where it really shouldnt.
Bioware is a large, well based company in the US I believe. They have done BG, BG2, and such, really HUGE games.

MP has a DirectX engine (8? Or was it 7? Think its 8). The game was done by a small finnish company.
MP2 has the updated MP engine, not redesigned, updated to DX 8.1 and heavily optimised and tuned (I beleive they noted that something like a map that took like 30 hours to compile on the old engine now takes 3 hours and the like). It is DAMN fast, even with large enviroment with large polycounts. AND it features Havoc physics.

Just think on it for a moment.
 
From what you said I have to conclude that Remedy has more talented coders then Bioware. The size of the company has very little to do with it. Id Software is a small company and yet they make superb game engines. One talented coder is enough to make the difference.
Bungy had a ton of funding and a long development time available, and yet Halo runs poorly. Using DirectX for a gaming engine doesn't guarantee a good performance with a short development time. A talented coder who knows what he's doing is more important.
 
True, but the programmer can only do so much. Personally I'd like to beleive that Bioware has better programmers, since I await many good games from them :)
But maybe its all in my head, its been known to be slightly off :E

Not to mention KOTOR maybe was a bad example... Xbox heritage, need I say more?
 
dawdler, did you say that because they have used DX 8.1 it takes less time to compile a map? Compiling has nothing to do with DX or OpenGL.
 
There's a lot more to graphics programming than what's in the APIs. Visibility determination, for example, is entirely seperate from OpenGL and Direct3D. Collision detection, sound, AI, they all have impact on the effciency of an engine, and consequently, the speed at which things are rendered.

You can't even say that OpenGL is faster than Direct3D, or vice versa. They're just APIs, they let software interact with the hardware. So unless there's some strange software problem, i.e. incompetant programmers (which isn't the case for either), it's on the hardware end. But if you wanted to do any kind of test, you're best off with something like Serious Sam that can use both APIs. But even then, it's a test of Croteam's programming skills. If they wrote their engine well, there shouldn't be much of a speed difference.

While my knowledge of hardware shaders is limited, I do know that they're independant of the API, although I'm under the impression that Direct3D has a lot of the work done for you. And it doesn't help that OpenGL doesn't have many standardized extensions (that aren't slow compared to vendor specific), and hasn't had a high level shading language until version 1.5. Not many developers like coding shaders in assembly, a very good reason to use Direct3D.

And yeah, I've been hearing OpenGL 2.0 will revolutionize graphics programming yet again.
 
Ti133700N said:
dawdler, did you say that because they have used DX 8.1 it takes less time to compile a map? Compiling has nothing to do with DX or OpenGL.
AH!!! When are people going to read what I say? I was comparing the work done on the generations, not factual speed. I wouldnt expect an engine to be fast if its the first 3D engine you do, using either API. But I would expect it to be BLAZING if its the second generation engine (or third, or fourth)! New hardware is available, I assume the programmers actually learn something in the meantime (keep in mind, 3 years between the 1st and 2nd game), and you already got a foundation so you can concentrate on speeding it up and optimizing it.

Oh, I give up... Without any good engine programmer here we arent getting somewhere anyway :)
 
Emon said:
You can't even say that OpenGL is faster than Direct3D, or vice versa. They're just APIs, they let software interact with the hardware.
You say that they are perfectly even in efficiency? You also say it's up to the programmers to make software efficient. Don't these two statements contradict each other? Someone has to code the API so that the software can interact with the hardware. If this layer between the hardware and software is inefficient then two programs that are 100% efficient (for what they are doing) that produce the same result, one using a slow API and one using a fast API, would perform at different speeds.

You can't say that an API doesn't matter in terms of speed anymore than you can say poor programming in the game itself doesn't affect its speed.

We just don't have an effective way to test which API is faster, to my knowledge.
 
Back
Top