Not exactly D3D vs OGL, but...

Started by
20 comments, last by IndirectX 22 years, 2 months ago
I am relatively new to 3D programming. It happened so that I learned Direct3D instead of OpenGL (I didn''t know about NeHe when I started, and DXSDK''s tutorials were the best source I had). Now as I read D3D vs OGL forums, I get the feeling that I should at least try doing GL instead of D3D. But: If OpenGL is so much better, as people say, why are (many?) games built using Direct3D? Why do many commercial graphics software (games and not games) use Direct3D? Also, as I was running a demo from this forum with debug Direct3D runtime on my WinXP, the debug spew was labeled ''Direct3D8''. The program never loaded d3d.dll or d3d8.dll, but it did load ddraw.dll and (as debug output suggests) created DirectDraw surface, etc. So is OpenGL implemented using DirectDraw on Windows? If so, is it (theoretically) slower than Direct3D which does (I think) not rely on DirectDraw? Thank you for your insights into this.
---visit #directxdev on afternet <- not just for directx, despite the name
Advertisement
Aaaahhh !! Dave, HEEELP !! Where is that FAQ !?
bah......................................................

OK... Lemme see... OpenGL isn''t necessarily better than D3D. They are somewhat different. OpenGL would be better IF Microsoft wasn''t such a beast. But the way things are, new graphics card features work their way into D3D sooner than OpenGL, so that''s a plus.

OpenGL was always much simpler to use than Direct3D, but with D3D8 the difference is more or less negligible.

More graphics cards supposed D3D, but ALL high-end cards, and most slower cards, support both.

BUT... Direct3D is for Windoze only. So, if you wanna programme for multiple OS''s, you need OpenGL.

I''m writing my 3D engine to support both, so that windows users can use Direct3D if they so desire.

I hope this answered some of your questions.
------------------------CRAZY_DUSIK* pCrazyDuSiK = new CRAZY_DUSIK;pCrazyDuSiK->EatMicroshaft(MS_MUNCH_BILL_GATES | MS_CHEW_BILL_GATES);pCrazyDuSiK->WebSiteURL = "http://www.geocities.com/dusik2000";
quote:Original post by dusik
But the way things are, new graphics card features work their way into D3D sooner than OpenGL, so that''s a plus.


That is incorrect. In D3D you need to wait for a new version to get the newer features that graphics cards are supporting. With OpenGL, they are almost immediately available through extensions.

As is said on every single of these threads, try it out, and see if you like it not. If you like it, use it, if you don''t, don''t use it. Period ''.''

If at first you don't succeed, redefine success.
Opengl is not better than direct x , but it is , for sure , much simpler to learn.
The only OS I''ve ever programmed for is Windows, so cross-platform compatibility does not matter to me, at least not in foreseeable future.

I''ve just finished wrapping a few D3D8 interfaces to throw exceptions instead of returning HRESULTs, so I''d hate to do this for GL if I didn''t like it.

Since I already spent quite some time learning D3D, I think learning GL will not be a problem.

As for extensions, I''m just trying to put some triangles on the screen. I guess I have to wait a while before I''m ready to use one of those.

That said, my question still stands: if so many people say D3D is inferior, why do many games and other software (ie, benchmarks) still use it?
---visit #directxdev on afternet <- not just for directx, despite the name
quote:Original post by python_regious
Original post by dusik
But the way things are, new graphics card features work their way into D3D sooner than OpenGL, so that''s a plus.


That is incorrect. In D3D you need to wait for a new version to get the newer features that graphics cards are supporting. With OpenGL, they are almost immediately available through extensions.



Except that OpenGL requires you to own that peice of hardware to expirement with the feature, and the extensions are different on every card. Many GL extensions are quite difficult to use. When you start seeing register diagrams of the internal hardware and commands look suspicously like things which send keywords to certain ports on the card, the argument that this is the nice pretty OpenGL api we love is hard to make.

D3D does not trail hardware features, it moves in tandem with them. It is more likely that D3D supports a feature before the hardware is out, then vice versa. Take matrix palette skinning for example, D3D supported this more then a year before hardware came out that did. (actually, I beleive that the GF4 still doesn''t techinically support it. They expect that you would do this in the vertex shader).

Vertex shaders were an even more pronounced example of this. Developers could proto-type shaders before hardware was available, and could write them for hardware that didn''t even support them.


>>If OpenGL is so much better, as people say, why are (many?) games built using Direct3D? Why do many commercial graphics software (games and not games) use Direct3D? <<

according to this weeks top10 in the usa NPD the number of games that use d3d exclusively are 0. opengl has one exclusive game (at number 1 no less)

>>Also, as I was running a demo from this forum with debug Direct3D runtime on my WinXP, the debug spew was labeled ''Direct3D8''. The program never loaded d3d.dll or d3d8.dll, but it did load ddraw.dll and (as debug output suggests) created DirectDraw surface, etc. So is OpenGL implemented using DirectDraw on Windows? If so, is it (theoretically) slower than Direct3D which does (I think) not rely on DirectDraw?<<

directdraw is used to do the actual drawing this occurs no speed lose. ie the d3d or opengl drivers both do this.
FWIW doing the same stuff.
opengl is usually faster than d3d on nvidia cards
d3d is usually faster than opengl on ati cards.
technically opengl should be slightly faster on all cards but driver writers are sloppy + this is not the case

http://uk.geocities.com/sloppyturds/gotterdammerung.html
> d3d is usually faster than opengl on ati cards.
technically opengl should be slightly faster on all cards but driver > writers are sloppy + this is not the case

Though ATi is getting better. Just look at the number of extensions they brought out the last 4 months, compared on what they did the years before. But no one is going to beat nVidia (yet), when it comes to the quality and speed of OpenGL drivers.
One plus for Direct3D is it is completey object Oriented. OpenGL however isn''t and you usually end up doing your own classes.. eg CTexture ... not that is a bad thing or not...

Oh yeah.. and Quake 2/3 are OpenGl so that''s cool too... :D

This topic is closed to new replies.

Advertisement