Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

IndirectX

Not exactly D3D vs OGL, but...

This topic is 6082 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Aaaahhh !! Dave, HEEELP !! Where is that FAQ !?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 ''.''

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by python_regious
[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.



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.


Share this post


Link to post
Share on other sites
>>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

Share this post


Link to post
Share on other sites
> 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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!