Why is OpenGL better than Direct3D?

:: the Microsoft DirectX TEAM had to
:: worry about all different parts of the
:: API.

Then they should have allocated more resources (it’s not like they couldn’t afford it), or recognized their limits and stuck to doing one thing well instead of ten things badly.

:: the ARB will too pretty soon because
:: they are going to be creating the OpenML

OpenML isn’t being created by the ARB.

:: If you had a corporation,wouldn’t you
:: be doing ALL that you can to see to it
:: that you remain on top?

Maybe, though I like to think I’d stay within the law. But this argument is silly. If I was a shark, I’d do ALL I could to eat swimmers, but as a swimmer that doesn’t mean I have to tie a raw steak around my neck and jump in the sharkpool. Just because the shareholders are happy doesn’t mean the users have to line up meekly and take whatever they’re given.

BTW this isn’t a Linux vs Windows thread. I program using MSVC on Windows, and on the whole I quite like it. (Dismal STL support being the exception.)

Oh,the ARB isn’t moderating this? Hmm…must’ve been misinformed. My bad

Anyway,thank you all for your replies. It was nice that no flame wars happened here. One thing that I did diduce was that the whole Miscrosoft/Linux DirectX/OpenGL thing is mostly opinions and nothing more.Like what John Carmak wrote in his plan file (thanx for that link to that article MikeC) that there is less than a 10% performance between the 2 api’s.But I do agree with him that a “cleaner” API is better than a messy one.

And to skdir,there are many articles on the net that state the Microsoft (and Mac) are not going away anytime soon.Check out this CNN article http://www.cnn.com/2000/TECH/computing/01/13/linux.reasons.idg/index.html
Besides.If you think of it logically,a half-trillion dollar company (or whatever they’re worth right now ) isn’t going to disappear.Not for a VERY long time.

Before I leave you all,I wanted to ask this one more thing.If Microsoft played by the rules (which I think they do in a buisness sense) and they were less “ruthless” and had a cleaner DirectX API,would you like them then?

If microsoft prioritized the customers over thier profit (or at least as much) i would certainly have no problem seeing them being a market leader.

Too much control of Microsoft resulted in the legal risk. Except that, I am open. I will use API if I am comfortable to use it.

Agree with Humus. I want to see them competing on quality, rather than on inertia (FUD), marketing and bully tactics. And more than anything else I want them to comply with good, solid, mature industry standards.

If somebody can get Bill out of the driver’s seat, and tone down the pathologically macho culture that pervades MS, I can certainly see them becoming a “good” company in a few years’ time. Just look at IBM, who were in a similar position not so long ago.

Just thought I’d add my experiences to this discussion although most of what I have to say has already been covered.

I worked on a commercial 3D application last year. Because we wanted good performance in software as well as hardware we decided to go with Direct3D as the 3D-API. I had no experience with either D3D or OpenGL prior to this. I used Microsoft’s DX6 SDK and found the documentation good. Soon I was away. Even though I found the API a lot of work to use and long-winded I finally managed to get a full lightmapping 3D engine working from it.

I always intended to learn OpenGL just to know what all the hoopla was about but it was only last month when I decided to port the 3D-editor portion of the project over to OpenGL just to see what it was like.

I have no idea how fast OpenGL is compared to D3D but one thing I can say, it is a DAMN site easier to use and faster to produce results with than D3D. I spent a lot more time coding the meat of the program than dealing with the API. Even a simple task of setting the video-mode and getting a Z-Buffer takes several pages of code in D3D - in OpenGL it is only a few lines. Texture-allocation was also several pages of code, all of which was replaced with OpenGL’s BindTexture, glTexImage2D, gluBuildmipmaps calls.

Even ALT-TAB support was painless in OpenGL, something I never managed to get working properly in my D3D app. Already I have implemented things in my OpenGL version I never had the chance to with the D3D version because I spend a lot less time wrestling with the API and more time concentrating on producing cool routines.

Cross-platform compatibility is just the icing on the cake. I have no interest in going back to Direct3D. Faster or not, I am MILES more productive with OpenGL and the importance of that can not be overstated.

Ciao…
SHAYDE

That’s nice to see someone working for the industry here.
Most of us (I think) are students or 3D lovers, and we tend to forget that in the industry, money rule.
So if OpenGL takes less time to master and write apps, then it cost less money and is a good choice.
Portability is nice if you’ve already plan to support another OS than windows.

I’ve to say that MS windows is not as bad as we are all saying, the proof : we’re almost all using it !

If you really dislike a product or if the products really (excuse me) sucks, you’ll probably not use it.

I’ve to say that I use BeOS @ home and windows @ work.
This is why I prefer OpenGL (and OpenML), because my apps run on my favorite system & the most sold one.

Windows is ‘the’ PC OS so you’re building Apps for it, it’s a market matter.
You’re making apps to get money, not to spend money.

That’s all

To Ingenu:I think nobody of us uses MS-Windows ´cause he thinks it is a good OS.
The fact is:Even with Linux(which is far superior if one can use it)and many other
OS,you HAVE to use Windows ´cause due to Gates Domination of the market all good apps and especially Games run under Windows only.

The really bad thing about MS is,that they don´t accept any technologies or apps from other companies,only ´cause they aren´t from MS,even if they are far superior.If some Company has a new technologie which is good,MS trys to buy it and if this isn´t possible they try to bully and destroy these companys.
You can see easily what happens to all the firms which don´t act like Gates wants them to act and which Gates cannot buy for money.(Netscape!!,Symantec,…);

Hi there!

First of all, I have not read the hole thread, and therefore I am sorry.

I have done an actually selling product that uses DirectX as well as OpenGL.

Due to my research on both API’s I figured out the following:

  1. You can actually archive the same quality with D3D as OpenGL as with OpenGL (at almost the same speed, but that is driver dependend).
  2. You can get the same speed with OpenGL as in D3D with the equaly quality settings (driver dependend).

In general, I agree that OpenGL is the “cleaner” API, but it is the older API as well. That means OpenGL is a “structed API” that dosen’t really take new hardware inovations into account (there is NO support for phong shading at all).

Once you got familiar with DirectX its a piece of cake to write hardware accelarated 3d applications with it.

To make things clear, I love OpenGL. But if you do your homework Direct3D isn’t THAT bad eighter (almost I am thinking).

There are a lot of “blinded” MS hatred’s out there (no offens intended). But sometimes DX is great and sometimes it’s stupid (like OpenGL).

This is at least I am thinking!

Blame me if you want (I don’t care, because I have a couple of years 3D programming background, so have you?)

With kind reagrds,

LG

and may the vector be with you!

Hi there!

First of all, I have not read the hole thread, and therefore I am sorry.

I have done an actually selling product that uses DirectX as well as OpenGL.

Due to my research on both API’s I figured out the following:

  1. You can actually archive the same quality with D3D as OpenGL as with OpenGL (at almost the same speed, but that is driver dependend).
  2. You can get the same speed with OpenGL as in D3D with the equaly quality settings (driver dependend).

In general, I agree that OpenGL is the “cleaner” API, but it is the older API as well. That means OpenGL is a “structed API” that dosen’t really take new hardware inovations into account (there is NO support for phong shading at all).

Once you got familiar with DirectX its a piece of cake to write hardware accelarated 3d applications with it.

To make things clear, I love OpenGL. But if you do your homework Direct3D isn’t THAT bad eighter (almost I am thinking).

There are a lot of “blinded” MS hatred’s out there (no offens intended). But sometimes DX is great and sometimes it’s stupid (like OpenGL).

This is at least I am thinking!

Blame me if you want (I don’t care, because I have a couple of years 3D programming background, so have you?)

With kind reagrds,

LG

and may the vector be with you!

There have been a lot of great points brought up about why OpenGL is better than DX and vice-versa. I am an OpenGL lover, so let me add to why I think OpenGL is better…yes this is an opinion, but most are true.

  1. Yes, DX may be faster than OpenGL, and vice-versa, but the fact is, which ever one is faster only has a little bit of an edge. If you have a half-way decent system, your not going to feel the difference in a game written in DX and in OpenGL. Theres a lot in your system which can affect the speeds of wheather OpenGL runs faster, or DX does; and, with DirectX, even if you do get a little bit of an edge on performance, are you really willing to sacrifice clean code, easy learning curve, and less time to make the 3D app just so the app runs a little faster? I can almost promise you the end-user won’t feel the difference, so you have to think with yourself in mind: the programmer, what do you want? If you want the development of whatever your making be a painful experience with a lot of reference books handy…go with DirectX. If you want the experience to be smooth sailing…go with OpenGL.

  2. Microsoft’s death = DirectX’s death. Now I know Microsoft is going to be around forever, even if they aren’t a monopoly far in the future, they will still be there. However, you never know: what if some freak accident happens and Microsoft loses a lot of money, well, if you were working on a DX app at the time and Microsoft goes out of business…your pretty much screwed. Now I know this will never happen, especially since Gates himself can fund his company if it ever even comes close to dying; but, its just the thought in the back of your mind, the fate of your DX 3D app depends on the fate of one company…not cool. Someone said earlier that Microsoft’s hold on the PC’s desktop is starting to crack. This is definetly true. Microsoft can still compete with the compition, just not on the level they would like to. There are a lot of other great operating systems coming out. I know theres a lot of anti-Mac people out there, but I think with the release of MacOS X, it will bring in big sales, and will just be another problem for Microsoft (especially with its great developer support now). I have always stayed away from Macs, but when OS X comes out, I am actually thinking about picking up a copy (and by the way: in case you didn’t know, OS X’s graphics is going to be completely built on OpenGL, and its core is based on UNIX…very stable). Also, look at Linux. And I know, Linux isn’t going to be on the average PC user’s computer within the next 10 or 20 years, but Linux is very powerful, and is popping up in the corporate workplace, schools, etc. Linux combined with OS X are going to attract some people. Microsoft will still be in the game, but they might not have their OS on 92% of all computers or whatever it is, I promise you that number will drop serverely within our lives.

  3. Everyone is giving reasons as to why Microsoft keeps having to come out with newer versions of DirectX every so often. Well, many people blame this on their structure, and because they have to deal with DirectInput, DirectMusic, DirectSound, etc. One person said they should concentrate on making one good thing instead of 10 bad things. I think this is true; DirectX is a product, and if they have to constantly come out with newer versions with the same messy code, then they have made a bad product, and should consider redisigning it, but knowing Microsoft, they never will. Just because you like Microsoft or you like DirectX, you can’t make up crap in the defense of Microsoft because you don’t want to admit they make a bad product in comparision to OpenGL. On a side note, I’m not too big a fan of COM in the first place. OpenGL is all one API. In OpenGL, you can use glu and glut, but thats nothing like COM, those are just libraries which add to OpenGL. However, in DirectX, COM gets confusing, and is part of the problem with it that makes it harder to learn and harder to read.

  4. All these DirectX people keep throwing performance and UT in the face of OpenGL programmers. However, even if DX is slightly faster…think about what your giving up in DX that you could have in OpenGL:
    -OpenGL has portability to any operating system, DX doesn’t
    -OpenGL is much easier to learn, DX can be very complex and confusing
    -OpenGL can be…and often is…a LOT less lines of code than directx

Now I’d like to share with you my personal experience with both of the APIs. Yes, this is just an experience and I know a lot of people have given their experience of why they like one API vs. the other…but Microsoft’s DX is still in compition with OpenGL, and if I have a better experience with OpenGL than I do with DX, it means Microsoft has produced a bad product. Experience and opinions are really what matter here because Microsoft has to produce a good product to change my opinion and my experience.

I have been programming with 3D graphics for about a year now, and I have been programming for almost 7 years (No, I’m not in college, I started when I was 9, I’m a few months away from being 16). When I decided I wanted to go into the world of 3D graphics development, I looked at three APIs: Glide, OpenGL and DirectX. Glide I threw out immediately because 3dfx isn’t the biggest grahpics card company, and is far from it…so I knew Glide wouldn’t be popular in the future. I looked into DirectX first. I thought OpenGL would be messy and hard to understand since it doesn’t have one official company its produced by. I tried learning DX and I picked up a few books. After months of reading, I was still lost. I thought it was just me and kept on going. I finally blamed the API. It was hard to understand, had messy code, and other examples of basic things that I found online were hard to comprehend and just didn’t make any sense to me. I went into this for the fun of it, but I soon found DX to be no fun at all. Then, I looked into OpenGL. I was a little uneasy going into it since I’ve been programming in Windows all my life; but, I fell in love with it right away. OpenGL was easy to understand, and produced complex things from very simple code. I picked up two books: OpenGL Superbible and OpenGL Programming Guide, and they were both able to explain code much better. I was amazed that in OpenGL, all you have to do is call a few functions with different values and arugments and boom—you have a very nice, very cool 3D app! After a few weeks of reading into OpenGL, not only did I know how to draw very cool and interactive scenes, but I also knew about general computer graphics and how they work on any system…not just a windows system. I am very satisfied with OpenGL, and you may say, “Well DX is faster”, and sure…maybe it is faster, but OpenGL offers things I wouldn’t sacrifice for speed…and for the DX programmers out there: I suggest you pick up a book on OpenGL, you won’t be dissapointed.

One last point I’d like to make: You can say, “DX is the future” and “OpenGL is the future”, but what it really boils down to is this: OpenGL isn’t necessarily the future, but its guaranteed to be there; in addition, DirectX isn’t necessarily the future either, and is not guaranteed to be there.

You can battle all you want about how Microsoft is always going to be with us, but what I just said above is true and there is no denying that. If your still not convinced, read my points above about Microsoft’s future, and other points that were made on this message board…bottom line is their monopoly is starting to crack, and we’re seeing other operating systems emerge.

[This message has been edited by Alan W (edited 04-20-2000).]

Originally posted by TheGecko:
[b]This has been the starting point of countless flame wars on many message boards. But I have still found no answer to this very questiong.No one has given me one good reason why OpenGL is better than Direct3D.

To start off,I can honestly say that DirectX FAR surpasses OpenGL in terms of 2D graphics.That has already been established. But why is OpenGL better than Direct3D? From what I can tell,they both do the same thing on the same grphics cards and both of them have great API’s (totally based on my opinion)The only thing going for OpenGL that I see is that it is platform independant. However,to those programming their 3D applications for Windows,I can’t see why they won’t use DirectX.What better API to use for windows?

I am not trying to start a flame war mind you.I’m just seeking answers [/b]

=============================================

Hello !
Forgive my English !

I Have a little problem to solve :

I’m developing a program to perform
several 2D distortions (warping) on
medical Images.
Speed is very critical
for me , because I want to make this at
a 20 frames per second rate.

Thank you very much !
DirectX can help me in this case ?

Is Possible to make this with OpenGL?

U can use both OpenGL and DX
but I think for your case DX is better
for you…

about openGL vs Direct3D

OpenGL FOR EVER…

only the fact that it is procedural and
D3D is Object Oriented… gives openGL
an advantage…

OOP is a revolution in programming but
not the best thing for every application…
to draw a triangle I dont need to create 10 objects… and write 400 lines of code…

Phew what a discussion… 8P

OpenGL is easy to write, portable, fast, has Nurbs - which I can’t say I remember seeing in DX7 and Runs under NT.

DX is NOT easy to write, NOT portable, IS fast (lets face it they probably both use something like Glide anyway…), will change COMPLETELY from one version to another (what the h**l happened with V7?). BUT, it does give you a really nice set of API’s for accessing sound, networking, Force feedback etc.

I would think (a bit of speculation) that that is why Q3A uses BOTH.

As for Microsoft, they SUCK. (Bring it on…) I recently read a quote where “Poor” ol’ bill was stating that splitting the company would mean a decrease in the productivity of the company. Boo hoo. He stated that “we couldn’t have made Windows if the Windows team and the Office team didn’t work together…” which is just a statement of how “back-door-ish” office is. Remember those pretty blended title bars in Office 95 that you couldn’t do as standard in Win95?

Perhaps splitting the company would make Windows a truly “open” system. And who cares if it takes them longer to rebadge Win2000 as Win2001 so we can have a transparent cursor? Windows is 10years behind the rest of the OSes anyway…

Personally I liked the “release the code” idea - maybe then we can all work on fixing some BUGS.

BTW - Anyone know how to get rid of the 3dfx logo when OpenGL starts up?

OpenGL is having/going to have a HUGE impact on graphics programming as a whole. Here R my reasons why:

  1. OpenGL is literally 10 times easier that DirectDraw/Direct3D
  2. OpenGL offers the same functionality as DirectDraw/Direct3D.

Now these are two simple FACTS that mean a hell of a lot. Why? Think about this… As programmers both new and old start the enevitable search for a graphics API, they will be faced with the following choice.
DirectX
or
OpenGL

Now just to make things clear, In professional games development(for example) many companies will have to deal with some way of accessing the hardware directly for things other that graphics, ie. Sound ,Networking, input etc.
This means that many of them at this stage are using both API’s. Why would any company(or person at that) choose to follow a path of graphics programming which takes TEN TIMES longer and is more complicated, when they have deadlines to meet? It is for this reason that OpenGL WILL end up being the dominant graphics API. But Direct X will still be used for audio input etc…
UNTIL a new API dealing with these things emerges. And by the sounds of it’s already in the pipeline in the form of OpenML. When this is released I feel, it will be BYE BYE for DirectX…
Davior

A lot of people, including the last poster, seem to have the idea that OpenML is going to render DX obsolete. As far as I can make out, this just isn’t true. OpenML is aimed at merging video and audio streams together with realtime graphics; the main emphasis appears to be on synchronization problems and managing concurrent access to things like the framebuffer. It’s not aimed at game-style dynamic 3D audio, and AFAIK it doesn’t even touch on input.

If you want a clean crossplatform audio API, OpenAL is the obvious choice for OpenGL afficionados. Input is trickier, because everyone seems to feel the need to integrate their XP input code into all-singing all-dancing gfx/audio/whatever APIs, rather than creating a focussed, standalone, reusable input library. SDL is looking promising though.

OpenGL is literally 10 times easier that DirectDraw/Direct3D

I’m glad you were able to quantify the ease of use factor, as no one else is. I’ve never considered DirectX “hard”. It’s just another library. And it’s not necessarily messy, it’s just pseudo-conforming to the COM interface. That in itself is a bit different, but allows some neat binary upgradability stuff.

Besides, “real” programmers don’t think DX is hard. =)

OpenGL offers the same functionality as DirectDraw/Direct3D

Not exactly. If you plan on doing any 2D stuff in OpenGL, you’re digging your own grave. You’re practically asking for sub-1 FPS, as damn near zero drivers have any acceleration on this…this bastard child aspect of OpenGL.

There are issues with OGL when determining what all features will be accelerated and which wont… since OpenGL “guarantees” results, you risk having low FPS due to some quirk in the driver. This guarantee has it’s merits – but not in realtime applications, where if it’s done slowly, it might as well not be done at all.

Well said Revolver.

I do not know where you got your info from davior but OpenGL does NOT (I repeat,does NOT) come even close to the same functionality as DirectDraw.No way! That’s the thing that pisses me off about OpenGL is that it can’t handle the 2D aspect of games (or applications).That’s why I switched to DirectX.

And what you said about DirectX being harder,well,Revolver took the words right out of my mouth so to speak.I don’t find DirectX (including Direct3D) hard at all.Yes it’s messy but I understand what I’m doing,just as I understand what I’m doing with OpenGL.This is just an opinion thing once again.

As for the OpenML,well I’m curious to see how that turns out. I personally like programming in DirectX for my input/audio/music/2D so this is going to be interesting.

(As for the whole Bye bye DirectX,that isn’t going to happen anytime soon with the release of the X-Box.Because of that,DirectX will be around for a LONG time to come.My only with is that they clean up the API a little so people new to the DirectX API can get into it a lot faster)

why is 2d hard in opengl? i’ve written gui’s with buttons and menus and all that kind of stuff purely in opengl. 2d is jsut 3d without the depth… i want a bitmap “here”. i put this raster position where i want it, and coyh across the pixels… no sweat. (for example). I really don’t understand why people think opengl 2d is hard. I’m sure you THINK there is a reason; I just want to know what it is. I am genuinely perplexed!

cheers
John