Why use Direct3D?

This is a discussion on Why use Direct3D? within the Tech Board forums, part of the Community Boards category; Why not use OpenGL? Why there are many Direct3D powered games? I heard that OpenGL can do everything what Direct3D ...

  1. #1
    Registered User
    Join Date
    Dec 2008
    Location
    California
    Posts
    37

    Why use Direct3D?

    Why not use OpenGL? Why there are many Direct3D powered games? I heard that OpenGL can do everything what Direct3D do. But Direct3D are only for Micro$oft, so why they didn't use OpenGL for the additional cross platform feature. If you want to program in windows only, the cross platform feature will not really hurt in your project so why use Direct3D?

  2. #2
    Registered User BuzzBuzz's Avatar
    Join Date
    Feb 2009
    Posts
    89
    Going by what I've read here the main reasons you may choose Direct3D over OpenGL are:

    Direct3D has a better API and documentation
    There are less conflicts and bugs due to reduced scope of hardware

    There are more, but I can't remember them right now.

    But that doesn't mean that it is better than OpenGL, or vice versa - horses for courses indeed.
    Any help I give may be classified as:
    The Blind leading the Blind...
    Currently working through:
    "C++ Primer Plus"

  3. #3
    Making mistakes
    Join Date
    Dec 2008
    Posts
    476
    Microsoft has terrible support for OpenGL. It's drivers let games run @ about 3 FPS, so everyone will use Direct3D instead. But you can install the newer drivers and another OpenGL implementation.

    BTW: OpenGL has also its benefits:

    Cross-Platform
    (IMO) much better programming style, much easier to write and understand
    SDL or GLUT take care of windows creation etc.

  4. #4
    Registered User
    Join Date
    May 2007
    Posts
    147
    Most modern games are made in C++, and the graphics API is abstracted such that the developer can choose between OpenGL or DirectX (and, quite often among various versions of each, including OpenGLES) at compile time, very rarely also at runtime. Most of the game's application level coding does not directly consider what backend API is used, and it really shouldn't. Portability is all too important, but you don't gain portability just by using OpenGL - the various releases going forward impose incompatibilities between versions, both for DirectX and OpenGL, and likely will again in the future.

    As such, most competent engineers choose to abstract so as to remain flexible.

  5. #5
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    Good question - I use linux.

  6. #6
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by JVene View Post
    As such, most competent engineers choose to abstract so as to remain flexible.
    I imagine they could also kill you with a slide rule from a hundred yards
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  7. #7
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    Microsoft hasn't made DirectX cross-platform 'cause they like laughing at you peeps who whine about it (this is prolly not true, but you don't need to know more)

    Also, as long as this rubbish propaganda that Microsoft are more money grubbers than other buisness' goes on, there won't be any progress on Microsoft's motivation to go cross-platform.

    My advice. Stop whining about it and go for what you want. And do NEVER tell someone that he/she is wrong for going for what he/she likes/wants/loves...
    Currently research OpenGL

  8. #8
    Making mistakes
    Join Date
    Dec 2008
    Posts
    476
    I don't blame Microsoft. Anyone wants to make money. So why would they worry about portability except between Vista/XP?

  9. #9
    Registered User
    Join Date
    May 2007
    Posts
    147
    So why would they worry about portability except between Vista/XP?
    ..and Xbox

    Your right, they don't.

    MS has a history of developing exclusivity with a business goal. They're worked themselves into a bind with XP ( what else did we really need unless they kill it to make us buy something else? ).

    So, and this is to your point about Vista/XP - they cropped DirectX at version 9 on XP, making sure the 'latest and greatest' also requires their newer OS.

    It is in the interest of developers to incorporate portability in their designs, and in all our interests that applications of all types are available on multiple platforms. Our choices are limited otherwise.

    And that wraps to the original inquiry, why develop in DirectX at all?

    Well, there are some features that may be useful, and certainly there is potential for enhanced performance on Windows targets. OpenGL 3.0 isn't quite out in the field yet, but it may 'strike back' at the feature set differences, and it is in Apple's interest for that to grow (Apple may release a console soon, and that will be OpenGL).

  10. #10
    Making mistakes
    Join Date
    Dec 2008
    Posts
    476
    Right. Why did they develop DirectX when there is OpenGL? Or is DirectX older?

  11. #11
    Registered User
    Join Date
    May 2007
    Posts
    147
    I don't recall precisely, but I think OpenGL is older.

    They made DirectX for their own proprietary business reasons, and to open the potential of providing features not available in OpenGL. OpenGL was originally developed for workstation interfaces (professional applications), DirectX was originally developed for consumer oriented graphics (games for example) - the two have overlapped since their creation and are increasing in parity all the time.

  12. #12
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    Right. Why did they develop DirectX when there is OpenGL? Or is DirectX older?
    I don't know the history behind this particular issue, but it's nothing new that MS tries to make up "standards" that do the same thing as existing standards, or purposely make their products not standard compliant. Both to achieve vendor lock-in.

    A few examples -
    Silverlight - what's wrong with Flash and Java? well, I guess the problem, for M$, is that they have pretty good cross-platform support.
    J++ - slightly modified Java that runs only on Windows. Good thing Sun won the lawsuit and killed it.
    IE - it claims to adhere to XHTML and CSS standards, yet interpreting many things incorrectly (and many aren't fixed for a few releases... I smell conspiracy) and omits support for many standard features, while adding their own "extensions". An unsuspecting newbie web developer testing with IE will probably end up with a site that only works in IE, which is obviously M$'s goal (they might even think it's not big deal since IE had >95% marketshare). Fortunately we don't get many sites like that nowadays, since Firefox has won significant marketshare now that web developers can no longer ignore it (and other standard-compliant browsers).
    OpenDocument - Microsoft Office 2007 will support OpenDocument, yet, they managed to create an implementation that isn't compatible with ANY other existing implementation. Come on, they GOT to be TRYING. (An Antic Disposition: Update on ODF Spreadsheet Interoperability)

    http://en.wikipedia.org/wiki/Embrace...guish#Examples

    Whether this practice is fair or not is up to interpretation. I personally believe this is a very dirty business tactic.

    There are cleaner ways to make money. They could have actually made better products than their competitors, and make people voluntarily use their products, instead of FORCING people to pay arms and legs to use their inferior products with their power of monoply.

    The list goes on and on...
    Last edited by cyberfish; 05-16-2009 at 10:44 AM.

  13. #13
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    Basicly, OpenGL is better for movies and such, and DirectX is better for games, or so does wikipedia say...

    Also, OpenGL was before DirectX and was developed by some company which name I have forgotten, still, DirectX had no chance against OpenGL, just like Windows had no chance against whatever people used back then (again forgot names) but still, Windows and DirectX are no most popular, well Windows is, DirectX can be debated about...

    Now, the reason DirectX 10 didn't come for XP was because DirectX 10 was built for the Vista architecture, or so I heard. Just like DirectX 9 has too seperate version, or many but I'm talking about DirectX9 and DirectX 9 Vista

    DirectX 11 is the Windows 7 DirectX and I believe Win7 will get just as popular of not more popular than WinXP, as it's faster ( at some areas ) and not slower at any areas (can be debated), so if you want to go for DirectX, I'd say choose eather DirectX 9 or if you want to take the long shot, go for DirectX 11
    Currently research OpenGL

  14. #14
    Registered User
    Join Date
    May 2007
    Posts
    147
    I'd say choose eather DirectX 9 or if you want to take the long shot, go for DirectX 11
    This has been the problem since Unix split into several commercial versions in the late 70's.

    There's the current version, the next version and the previous version that 60% are still using. It doesn't matter what tech you're talking about, that 3 part division is always there, and is the reason no good engineer and businessman (combination) would choose to devote application code to a particular path, if it can be avoided.

    Portability is also about portability among versions, and that's best achieved through indirection - abstraction.

  15. #15
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,597
    These 'why use X' threads really belong on the GD forum. Unless I see some specific game programming question in the next few posts I will be moving it there.
    Last edited by VirtualAce; 05-16-2009 at 01:31 PM.

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with getting DirectX 9.0 initilization
    By DarkMortar in forum Windows Programming
    Replies: 7
    Last Post: 05-09-2006, 09:58 PM
  2. Creating a 2D GUI using Direct3D
    By codec in forum Game Programming
    Replies: 8
    Last Post: 09-23-2004, 12:57 PM
  3. Problem with Direct3D
    By frenchfry164 in forum Tech Board
    Replies: 1
    Last Post: 11-27-2003, 04:28 PM
  4. DIRECTDRAW DIRECT3d
    By samsam1 in forum Game Programming
    Replies: 3
    Last Post: 01-14-2003, 07:28 PM
  5. Direct3D vs. OpenGL
    By PorkyChop in forum Game Programming
    Replies: 22
    Last Post: 12-08-2002, 12:41 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21