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?
If you read my post, you'll see that I wrote "a few years ago". That tends to imply at least 3, so I think it covers 1996 (i.e. 4 years ago) pretty well...
"The invisible and the non-existent look very much alike." -- Delos B. McKown
Oh, and Quake3Arena was more fun that Unreal Tournament. ;),br>
I don't know...I think UT wins hands-down for out-of-box experience, but Q3 mods like Q3F pick up some slack.
-Smitty
± 29 dB
As the title of this post says, the OpenGL v. D3D battle depends largely on the video card used. For example, 3dfx cards do quite well with OpenGL, but are somewhat lacking in their D3D performance. OTOH, nVidia cards aren't all that great with OpenGL, but shine in the area of D3D.
=================================
I pledge allegiance to the flag...
of the Corporate States of America...
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
Windows 2000 is "pretty obsolete", "obscure" and "nearly dead"?
Here's a point... WinXX is the most popular OS on the planet, like it or not. It is NOT "obscure".
I think I'm feeding a troll, though.
Open Source. Closed Minds. We are Slashdot.
I thought i'd add to the comparison by giving an account of my experiences learning the OpenGL API...just for reference, i'm a computer science major still in school (although don't ask me why..).
I've been studying/working with OpenGL for only about a year now, but my experience with it has been awesome. Previous to it, I had only a done a -very- small amount of coding with Allegro (which is a 2D only API, IIRC). The learning curve of OpenGL, to me, was almost non-existant. It's structure makes sense, the API functions are pretty straightforward, and there is sooo much help out on the web, it's insane (although I imagine that goes for Direct3D as well). And even if you're starting with the very basics of computer visualization and light (how colors work, mathematics of intensity, reflection/refraction), you can use OpenGL as a learning and teaching tool every step of the way.
Another thing I like about OpenGL, is that it doesn't seem to want to obscure what's going on mathematically; this is one of the things that allows it to be used for things like the Q3A engine. For instance, you have easy, direct access to all the matrices, -if you want it-. Or, you can let the API do the work. good stuff.
As for the cross-platform thing, the one awesome thing that i've personally noticed about it is that when you learn the OpenGL API, you aren't forced to learn a specific GUI API in the process. I've seen Direct3D code, and mixed in with Win32/MFC code, it can get really really atrocious.
Overall, OpenGL is fun to work with, and satisfying as well. If yer just breakin' into the computer graphics programming world, i definitely suggest you give it a try.
Christ, who the heck monitors ask slashdot for articles to post?
(And who's idea was it for the lameness filter to look at the subject for "First ever slashdot rant"? Why don't you go for the penis birds or something. Of course, you could just have the lameness filter automoderate down a post rather than just disallow it all-together. Nah, we all want to be small dictators telling everyone else what is "cool")
I've submitted what I would consider very valid questions that get rejected (I REALLY wish there was a reason line for why an article was rejected, something to think about as a needed feature IMHO) while a question that is very similar, but is almost worthless to me because of the slight differences, gets posted less than a week later.
Of course, then we have crap like this. This is an extremely old chestnut on usenet and all sorts of websites have been put up addressing it. Even a slight amount of actual work to research the issues would have turned up a few dozen articles that are much better than any of the responses given so far.
I know, why don't you go to Deja News and look for usenet articles with the title D3D vs OpenGL (Or opengl vs d3d) that constantly get regurtitated every 2-3 weeks from someone new asking this exact same question without _looking_ to see if it is answered anywhere. I'd be willing to even bet this is in the opengl faq (Though I'm not looking in it to find out, I just think it's a safe bet.) Go to the faq repository and look for comp.graphics.api.opengl (or was it graphics.programming.api.opengl?).
"Tax preparation software eliminates errors your[SIC] may make...." From IRS home page.
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.
I guess I was always under the impression that OGL was a superior API, but that Direct3D was simply easier to program for and better supported. *shrug*
-Degenerate
But, since you've asked, we're all gonna answer.
A quick search on Google gets us some answers.
Historically intersting is this commentary on this very topic from John Carmack from December 1996. This article at Gamecenter rehashes Carmack's comments and adds some other game programmer's comments.
Another spoon-fed link will be GameDev.net's 3D API forum, where there is a discussion on this very topic between people who actually use the APIs in question.
Bleh!
There is PEX, which was a 3D extension to X. Seems quite dead now... Or I may be totally wrong...
That last link should've been to here instead of that stupid advertising page. Chances of posting a mistake is directly proportional to how critical your post is of something.
"Tax preparation software eliminates errors your[SIC] may make...." From IRS home page.
(but you knew that)
Direct3D is definitely ahead of OpenGL. Hardware manufacturers like MS' roadmap so they know when they have to implement hardware, and when they do, they know that it'll be supported by an OS (windows whatever). OpenGL is a bit behind, but it's cross platform.
If you know for a fact that your program is only going to be run on Windows, you're a fool if you use anything but Direct3D. If there's the possibility that it's cross platform, fuck it, use a little bit of abstraction, write the other OSes' stuff in OpenGL and write the Windows stuff in D3D.
If there are other 3d libraries and such, I'm pretty sure they're just abstraction layers for one API or the other.
--
Peace,
Lord Omlette
ICQ# 77863057
[o]_O
imho opengl performs better than direct 3d. unreal sucks with direct3d, max resolution being 1024x768 32bit and not being very playable - on the contrary, with opengl i can run it 1600x1200 32 bit, without any performance loss. i have 733 MHz pIII (256 megabytes ram) and nvidia's GeForce 256 with 32 megabytes sdram). most other games also perform superior on opengl when compared to direct3d and opengl looks by far better also.
ound the message used repetitively over and over still nothing grows silen