OpenGL vs. Direct3D? 29
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?
Re:erf (Score:1)
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...
Re:opengl, just an opinion. (Score:1)
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
Depends on which video card you use (Score:1)
=================================
What a stupid question (Score:2)
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.
Re:Well, duh (Score:1)
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.
Re:Depends on which video card you use (Score:1)
Are you insane? They have what is probably the most mature and complete Win32 OpenGL driver on the planet, and currently their hardware has the best bang for the buck on the Win32 OpenGL desktop.
OpenGL from a learning perspective (Score:1)
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.
Arrghh, Old Question (Score:1)
(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 [deja.com] 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 [faq.org] repository and look for comp.graphics.api.opengl (or was it graphics.programming.api.opengl?).
Troll? (Score:2)
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.
OpenGL is better. (Score:1)
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
Stuff (Score:1)
But, since you've asked, we're all gonna answer.
A quick search [google.com] on Google gets us some answers.
Historically intersting is this commentary [directx.com] on this very topic from John Carmack from December 1996. This article [gamecenter.com] 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 [gamedev.net], where there is a discussion [gamedev.net] on this very topic between people who actually use the APIs in question.
There is PEX (Score:1)
Ack, wrong link (Score:1)
In addition... (Score:1)
(but you knew that)
Re:Troll? (Score:1)
Re:Stuff (Score:1)
D3D v7 is very much different, with some clear inspiration from OpenGL. To draw a list of triangles, you just need to call the drawPrimitives function, with an array of points (plus a few other parameters). Its still not as simple as OpenGL. OpenGL is very a very simple Logo like language. However, its not significantly more complicated than most other API's (Although Windows itself seems to have a huge wodge of horrible legacy stuff)
One small issue with OpenGL is that Microsoft isn't too fussy about keeping up to date versions available for Windows. This has the effect of making Direct3D more feature rich under Windows at times.
Re:Troll? (Score:1)
Re:Arrghh, Old Question (Score:1)
Seems to me if your user number is over, say, 50, your chances of getting an article posted here are slim to none. Unless of course you're submitting a question to Ask Slashdot whose answer can easily be found (or at least have some light shed on it) by running a simple Google search. Or you're submitting a thinly-veiled piece of flamebait. I think perhaps I'll try submitting "What's the best Linux distribution?" or "Should I turn my boss in for distributing one (1) licensed font on a floppy?" or even "Where is the power button on an NEC Direction 300L?" and see what happens.
erf (Score:1)
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
opengl, just an opinion. (Score:1)
Re:In addition... (Score:1)
That's ok, we've got Mesa.
Re:Troll? (Score:1)
It reminds me of a very similar styled troll called 'Steve Woston of JJJJ-JJJJJ-JJJJJ-JJulius games'. He'd say that he's been in talks with microsoft about something, or some major vendor, and talk crap while being unable to source anything.
Amusing, and goes to show how shoddy moderators are.
Re:OpenGL is better. (Score:1)
In my (and many other people's) opinion, OpenGL is a much simpler API. It uses a state machine with a fairly simple set of commands (Along th elines of
glBegin();
glVertex3f(x1, y1, z1);
glVertex3f(x2, y2, z2);
glVertex3f(x3, y3, z3);
glEnd();
to draw a triangle, whereas D3D insists on you setting up an array of structs containing the parameters (e.g. colour, specular, texturing modes) you want and telling the drawprimitives() function which are used. (I make this sound horrible, but it isn't too bad really). D3D is probably a little more efficient, although clever driver coding can improve performance in OpenGL.
Re:erf (Score:2)
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 [directx.com]:
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.
Re:Troll? (Score:2)
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.)
Re:Troll? (Score:1)
Note that this article appears to be from 1997, even though the stupid web designer puts today's date at the top of the page...
I really hate undated web pages.
Tom
Re:opengl, just an opinion. (Score:1)
Oh, and Quake3Arena was more fun that Unreal Tournament.
Re:opengl, just an opinion. (Score:1)
But, this can still shed a little light on the subject. The two big games now that really tax your 3D hardware (Quake III and UT) prefer to use OpenGL. Thare has got to be good reason for doing so, or they wouldn't both do it. The only reason may be portability - as it was for Quake - but I don't think that's the case for Unreal. It was first realeased for Windows and released for MacOS a while later. The thing is, OpenGL wasn't even part of the original Unreal. So the MacOS version used RAVE (the MacOS standard) instead.
The fact thaqt Epic added OpenGL support later, and spent more time optimising it, tells me that they obviously see good reason to do so. I just don't know what that reason would be.
-Smitty
Re:erf (Score:1)