Slashdot Mirror


OpenGL vs. Direct3D?

sl3xd asks: "When it comes to 3D graphics, there are two main competitors in the 'Mainstream' computer world: OpenGL, and Direct3D. However, aside from the fact that OpenGL is cross-platform, and has an extension mechanism, in what ways is it different than Direct3D? How does each handle the interfaces between the OS and the hardware? What are the rendering advantages/disadvantages to each? Do they use similar mechanisms - are they somewhat similar to program for? What are the advantages of Direct3D over OpenGL, and vice-versa?" Are there other 3D graphic libraries out there that can complete with OGL and D3D that sl3xd might have missed?

4 of 29 comments (clear)

  1. What a stupid question by ikekrull · · Score: 2

    Direct3D is Microsofts implementation of a polygon-based 3D graphics API.

    OpenGL is SGI's implementation of a polygon-based 3D graphics API

    Direct3D is aimed primarily at the gaming market on the windows family of operating systems, while OpenGL is aimed at cross-platform workstation-class hardware. Both are extensively used in both games and other 3D applications.

    Both APIs offer the developer and end user access to software and hardware based 3D acceleration, as long as appropriate driver support is available from the manufacturer.

    OpenGL is the industry standard in most areas of 3D graphics aside from games, and many games use OpenGL, as well as Direct3D.

    Both APIs are now pretty much comparable with each other in terms of feature support - though Direct3D supports some minor eye-candy functionality that OpenGL doesn't support as part of its core API i think.

    So the choice between the two comes down to platform support and personal preference.

    Direct3D involves total reliance on Windows, while OpenGL apps can conceivably run on any platform there is hardware and drivers for. (i.e. Windows, MacOS, BeOS, Linux,*BSD along with the old-skool workstation-and-server-oriented unix platforms like IRIX, HP-UX, AIX, Solaris etc.

    Both OpenGL and Direct3D are somewhat proprietary APIs, although plenty of documentation is available from their respective owners (SGI & Microsoft) There is even a complete reference implementation of OpenGL available from SGI i believe.

    Personally, i prefer applications and games that use OpenGL, because of the cross-platform nature of the system.

    Also, courtesy of the Perl bindings to OpenGL, i can code 3D apps in Perl with OpenGL which is a big plus :)

    That being said, if your target market is Windows-only, I'm sure Microsoft will bend over backwards to try and make OpenGL as unworkable as possible on future versions of Windows, so you may want to use Direct3D.

    --
    I gots ta ding a ding dang my dang a long ling long
  2. Troll? by roystgnr · · Score: 2

    The next version of Direct3D (v4) will be OpenGL compatible. They (Microsoft) are also working with the OpenGL consortium to generate an improved standard (GL3) that will incorporate many of MSoft's inovations into OpenGL whilst preserving cross-platform compatibility.

    References, please? Maybe I'm just out of the loop, but you'd think either of these announcements would be of a magnitude to be shouted far and wide, on the Slashdot homepage, at least.

    I'm also kind of curious as to why "whois gaming4d.com" and "nslookup www.gaming4d.com", as well as a google search, all come up blank.

    Oh, well. You got an "Informative" so far, so good troll; but you shouldn't have wasted it on a non-front page story where fewer moderators will see it.

    1. Re:Troll? by nellardo · · Score: 2
      The next version of Direct3D (v4) will be OpenGL compatible. They (Microsoft) are also working with the OpenGL consortium to generate an improved standard (GL3) that will incorporate many of MSoft's inovations into OpenGL whilst preserving cross-platform compatibility.
      References, please? Maybe I'm just out of the loop, but you'd think either of these announcements would be of a magnitude to be shouted far and wide, on the Slashdot homepage, at least.
      SGI and Microsoft had committed to merging OpenGL and Direct3D a couple years back. Several of the top engineers from Cosmo Software stayed at SGI rather than go to Platinum Software when Platinum bought Cosmo from SGI. At the time, it was widlely heralded in the gaming community, and to a lesser extent, in the CAD/CAM and FX communities - there would only be one API to program for (this was when even Wired was running stories like the one of the Apple logo wrapped in barbed wire titled "Pray.").

      However, this was also before SGI started to really tank. And before Microsoft got slammed by the DOJ (causing everyone to want to be as far away from Bill as possible, even Bill, who tied Ballmer to the DOJ stake).

      Since then, SGI has open-sourced Performer, Inventor, and, most recently (and most surprisingly) a sample implementation of OpenGL itself. As SGI has never really understood software above the level of microcode, open-sourcing those made sense. But it also would have fairly kiboshed any efforts to unify with Direct3D - Microsoft and open source? Yeah, right.

      There may be more current scuttlebutt than that, but I haven't made the last two SIGGRAPHs, so haven't had a chance to talk to all the geeks that would have been in the thick of this (Paul Strauss, Rikk Carey, Gavin Bell, etc.)

      --
      -----
      Klactovedestene!
  3. Re:erf by Tet · · Score: 2
    Direct3D is definitely ahead of OpenGL. [...] OpenGL is a bit behind, but it's cross platform.

    Erm, no. In what ways do you think D3D is ahead? From a purely personal point of view, coding with OpenGL results in significantly cleaner code than Direct3D. I've tried both, and I liked the OpenGL API, and hated the D3D API. I'm not really qualified to discuss the technical advantages of one or the other, so let hear from someone that is. A few years ago, John Carmack said:

    Direct-3D IM is a horribly broken API. It inflicts great pain and suffering on the programmers using it, without returning any significant advantages. I don't think there is ANY market segment that D3D is apropriate for, OpenGL seems to work just fine for everything from quake to softimage. There is no good technical reason for the existance of D3D.

    He's recently claimed, however (and I can't find a reference, anyone?) that MS have made huge advances, and that people shouldn't judge D3D by previous versions. He claims that the latest version is actually pretty good, although he still prefers, and will continue to use, OpenGL. My take is that if it's good enough for Carmack, it's good enough for me. And of course, OpenGL has the obvious advantage of being available on my preferred platforms.

    --
    "The invisible and the non-existent look very much alike." -- Delos B. McKown