|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic Page: 1 2 3 4 5 »» |
Last Thread Next Thread ![]() |
| Direct3D vs. OpenGL: Which API to Use When, Where, and Why |
|
![]() byrd Member since: 2/24/2002 |
||||
|
|
||||
| Great article, now I know what API to learn and how much incorrect crap i've been reading about the two. If ever (heh of course it will) a flameware starts again on this subject a link to this article ought to help extinguish it. Thanks for the writeup. |
||||
|
||||
![]() compr0 Member since: 12/13/2001 |
||||
|
|
||||
| Sense I first start with Direct3D with the release of DirectX 5.0, I had many difficulties starting and getting it to work. Then I moved to the OpenGL when a friend told me about it a few weeks latter. It was much simpler and I could get it to compile and run with out a problem. I thought that Direct3D would die off after a while, but I guess not. They really improved many aspects of it, and it’s getting closer and closer to the interface to the OpenGL, which makes it easier to program in. After reading the OpenGL 2.0 proposals I’m wondering how long it will take Direct3D to go that way too. I would be surprised if it doesn’t. But 2.0 seems very powerful and has a huge advantage over Direct3D that comes with DirectX 8.1. Anyways, the article here was a pleasure to read, and the author’s opinions were very nicely said. |
||||
|
||||
![]() CGameProgrammer Member since: 7/30/1999 From: San Diego, CA, United States |
||||
|
|
||||
One error: Although I never used DirectX with C (only with C++), I'm pretty sure the C syntax for using it is like this:D3DDevice->lpVtbl->DoSomething(D3DDevice, Params) // as opposed to what you wrote, which is this: D3DDevice->lpVtbl->DoSomething(Params) ~CGameProgrammer( ); |
||||
|
||||
![]() ed9er Member since: 2/8/2001 From: China |
||||
|
|
||||
| anyway, this is always true, even after these years: "There is no good technical reason for the existance of D3D. " |
||||
|
||||
![]() dword2002 Member since: 2/22/2002 From: France |
||||
|
|
||||
quote: Hmm, is there any good technical reason to your existence? The question is pointless, unless you are involved in theology. One thing is missing in this interesting article. Direct3D is not a stand alone GL. It is a part of libraries called DirectX, witch provide network, sound, music, video, input device support (what else do you need?). All those libraries are based on the COM model, that means very structured and OO compliant. If you understand how it works, you know the "grammar" for all other libraries. You only need to learn "vocabulary" as you need it. As long as I know, OpenGL is a GL only. When you have learnt it, then you will have to learn how to use sockets, sound hardware access, etc… Good luck. DworD |
||||
|
||||
![]() chr1701 Member since: 1/23/2000 From: Germany |
||||
|
|
||||
quote: When you have learned Direct3D, then you have to learn how to use DirectPlay, DirectSound, DirectInput etc... Good luck. Chris. PS: libraries like libSDL, OpenAL, HawkNL are your friends. |
||||
|
||||
![]() tifkagh Member since: 11/7/2001 From: Ireland |
||||
|
|
||||
| The article mentions that anything that can be done in DirectDraw can easily be done in D3D. Have there not been articles and forum postings showing that D3D can corrupt bitmaps when transferring them to the screeen? |
||||
|
||||
![]() Arild Fines Member since: 8/20/2001 From: Oslo, Norway |
||||
|
|
||||
| I believe John Carmack's original rant was about D3D v3, not v5. |
||||
|
||||
![]() dword2002 Member since: 2/22/2002 From: France |
||||
|
|
||||
quote: Mostly rhetorical indeed. Because all the DirectX have a unified architecture and mechanisms, it is easy to bring your knowledge of one part to another. Do you think it is easiest to learn 6 different languages or to learn 5 dialects based on a well known language? DworD |
||||
|
||||
![]() ed9er Member since: 2/8/2001 From: China |
||||
|
|
||||
| to dword2002: you are so wrong! the point is: the bad api interface design is not a must of COM. they can "borrow" some idea, and make a "DirectGL" but they didn't quote: you haven't even read the article, through. btw: there's no such thing can make you learn-one-thing-and-do-the-other-thing, gl! Edited by - ed9er on February 25, 2002 7:26:45 AM |
||||
|
||||
![]() Scheermesje Member since: 10/27/2001 From: Netherlands |
||||
|
|
||||
| I think it's a good article. I started 2 years ago with OpenGL but lately I started wondering if I shouldn't learn DirectX because I mostly want to program games. This article clearly sayes that DirectX is nowadays the best for games. SO I think I'm going to learn DirectX and OpenGL, witch is the best solution. |
||||
|
||||
![]() dword2002 Member since: 2/22/2002 From: France |
||||
|
|
||||
quote: Wow… that’s quite a definitive argument: it is bad. Oh, I know what to answer: you are wrong, it is good! quote: What would have been the "technical reason"(sic) of a duplicated OpenGL? quote: I’m still impressed by such brilliant argumentation… quote: Great. What do you think about this one : Claiming a thing is, does not make that thing exist. DworD Edited by - dword2002 on February 25, 2002 8:17:40 AM |
||||
|
||||
![]() ed9er Member since: 2/8/2001 From: China |
||||
|
|
||||
quote: use COM, conform to the other part of DirectX and provide a GOOD api interface and please stop those non-thread-related (and brilliant) crap |
||||
|
||||
![]() Smurfwow Member since: 2/19/2002 From: Sydney, Australia |
||||
|
|
||||
| just incase this hasn't been brought up... windows NT has a different naming convention for DirectX. it is not, infact, 5 versions behind. It's more like 2. |
||||
|
||||
![]() Pactuul Member since: 2/20/2001 From: USA |
||||
|
|
||||
| As any one used directx 8.1 sdk with the appwizard for vc++? it rocks! I got a networked "teapot" up and running in less than one minute. It's only taken me 3 days to produce a tetris clone with multiplayer support and sound and music, with action mapping (which I like to use a gamepad with tetris)...I don't see opengl providing me that easyness with it self. Besides I can't stand using other people's libraries in opengl due to the fact that everybody uses a different standard of code, and I have to mix them. -Pac "The thing I like about friends in my classes is that they can't access my private members directly." "When listening to some one tell about their problem (whether it's code or not), don't listen to what went right or wrong, but what they assumed....." |
||||
|
||||
![]() Machaira Moderator Member since: 9/30/1999 From: Abingdon, MD, United States |
||||
|
|
||||
quote: Yeah, like an article will stop the flamewars! My opinion - use whatever you feel most comfortable with and let others do the same. It might be worth looking at what the majority of the industry uses for its games, as well as consider the sources of most of the people that are doing the flaming. How many of them are actually in the industry? Breakaway Games |
||||
|
||||
![]() d9930380 Member since: 7/25/2001 From: Ireland |
||||
|
|
||||
| An unbiased article :-) His first sentence on D3D was: "Direct3D has drawn criticism from a number of sources." His first sentence on OGL was: "A lot of people like OpenGL, and for good reason." Allthough I agree with most of what he said, a few points. 1. D3D is easily the "standard" Win32 game API. What's the percentage of games that use OGL that don't use the Quake engine. Had Carmack supported D3D, OGL would be long dead in the games industry. 2. The drivers for non nvidia cards are usually inferior for OGL. 3. Using D3D allows games to be ported to the X-Box easily, no consoles support OGL "out of the box" which means paying for licenses to use OGL. 4. Extensions don't just produce messy code (and it's really messy), they require the programmer to have each card he wants to write for as your effectively using each card's own API. This isn't just a final testing issue, but you actually need them during development ( otherwise your programming blind ). 5. D3D's method is better as they provide the functionality and then let the cards catch up. This means as new cards are released the game scales up to take advantage of the advanced features e.g. Vertex and Pixel Shaders. |
||||
|
||||
![]() dword2002 Member since: 2/22/2002 From: France |
||||
|
|
||||
quote: hmm. I lost in an abysm of perplexity. Anyway I'm sorry if I offended you in any way. That was not my goal. I just intend to give my arguments, not for or against (the love/hate debate would be a bit puerile, isn’t it?), but to try to completed what is said in this interesting article. As Machaira said : quote: I don’t want to convince anyone, as I don’t own any stock options nor in DirectX, neither in OpenGL. |
||||
|
||||
![]() Oluseyi Staff Member since: 5/14/2001 From: New York, NY, United States |
||||
|
|
||||
| I find it ridiculously funny that the response to an article written to quell the API flamewars has another brewing in it! dword2002 and ed9er, stop it. And no more "rectally extracted" facts, okay? [ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ] Thanks to Kylotan for the idea! |
||||
|
||||
![]() Wreakon Member since: 7/14/2001 From: Washington, USA |
||||
|
|
||||
| [DirectX] "Because of its focus on games, it's not well suited to high end graphics applications." ... What are you smoking? I suspect that was a typo? ------- Happy Coding! Homepage: www.pcwebvia.f2s.com |
||||
|
||||
![]() Promit Moderator - Graphics Programming and Theory Member since: 7/29/2001 From: Baltimore, MD, United States |
||||
|
|
||||
quote: Hmm, yeah I did forget to include the pointer after dereferencing the VTable. In any case, it's a minor error and has little to do with the content of the article; the point is made nonetheless. I'll let it slide by. For the next couple of posts, I'll be honest. It looks to me like some biased ppl cannot deal with an unbiased article. DworD, did you read the whole article? I say quite explicitly that the article is on Direct3D vs. OpenGL, not DirectX vs. OpenGL. I also note that DirectX provides other libraries, as well as noting several other libs, including SDL and OpenAL(thks Dave). quote: Did you look at the "Great Games" section? Notice that only one game didn't provide an OpenGL renderer, but one written by Microsoft... quote: PlayStation 2 does. quote: That sentence didn't come out phrased exactly right, but the point stands. I challenge you to find one high end graphics app that recommends using the D3D renderer over the OpenGL renderer when both are working. Anywayz, The article seems to be getting a good response, and I did spend a lot of time on it. I would like to prod the moderators a bit to add a link in the forum FAQs... PS Oluseyi did YOU like the article? Because there is an opinion i cna really count on... |
||||
|
||||
![]() TheFez Member since: 10/30/2001 |
||||
|
|
||||
| No offence promit but it was a biased document. You tried hard, but there are a few comments here and there that makes it seem aimed as a pro OGL article. And also there are a few graphics programs out there that are only D3D (all free, done as side projects by people, but still count |
||||
|
||||
![]() grasshopa55 Member since: 8/15/2000 From: Bridgewater, USA |
||||
|
|
||||
| Now I have to say it was a noble attempt at covering a very heated topic, though the tone of the article still seemed a bit off. But as d9930380 pointed out, and as any English teacher will say, the first sentence sets the tone for what is to come. There is clearly a bias towards C and OpenGL. Opinion Time: I attribute some of the biased tone toward inexpeirence. It seems to me that the author's main expierience has been with C, possibly some Unix/Linux. This explains his attitude towards COM and how DirectX is tightly integrated with COM and Windows. With more expierence with C++, the author will understand more about the methodology behind COM as well as the syntax. DirectX is designed to be used in a C++ application. OpenGL, with its orgin in Unix/Linux, lends itself more towards C, because of the nature of Unix/Linux. The author also, is a proponent of open standards, which again shows his bias towards OpenGL. Seeing Direct3D's closed nature as an weakness it clearly an opinion. Open Source and Open Standards definitely have their advantages, but software not build along these lines in not at a disadvantage. The author also shows his dislike for Microsoft in general, this again changes the tone of the article. Now with OpenGL being the standard outside of the gaming world, we need to take a look at 3D software's past. When software programs like 3D Studio, AutoCad were orginally built, OpenGL was the only API available. The reason many of these still use it today is for that reason, the software was orignally built using OpenGL. By not re-writing the rendering engine, the developers behind these tools can focus more on new program features. Simple business practice, why fix what isn't broken. I would like to see someone who has had worked with both APIs and been in the field take a stab at this article. I think a more seasoned developer would provide a more complete article. ----------------------------- kevin@mayday-anime.com http://games.mayday-anime.com -- edit: spelling Edited by - grasshopa55 on February 25, 2002 3:07:08 PM |
||||
|
||||
![]() grasshopa55 Member since: 8/15/2000 From: Bridgewater, USA |
||||
|
|
||||
quote: This can also be turned in the other direction, showing that you are biased toward OpenGL by presenting those titles. quote: Not directly, but through a proprietary interface specifically for the PS2. quote: see my previous post quote: Let's wait on see on this one. ----------------------------- kevin@mayday-anime.com http://games.mayday-anime.com |
||||
|
||||
|
Page: 1 2 3 4 5 »» All times are ET (US) ![]() |
Last Thread Next Thread ![]() |
|