SGI: Computer Graphics

OpenGL versus DirectX

Hi, I am up to hears of read that OpenGL totally sucks versus the M$ DirectX APIs, mainly said by the bunch of pc users, -cough- pc gamers. Since Mac OS X is all about OpenGL and OpenGL is all about SGI, I would love to hear from OpenGL guys here about that. To be honest, I am not a 3D dude.

Thanks.
We are here on Earth to do good to others. What the others are here for, I don't know.
themacosxflies wrote: said by the bunch of pc users, -cough- pc gamers


Don't listen to them, they have no clue whatsoever.

Here are the some of the differences between OpenGL and DirectX:
OpenGL is portable, DirectX is only available on M$ Windblows.
OpenGL can emulate the features that are not available in hardware, while DirectX cannot.
OpenGL has accumulation buffers, DirectX doesn't.

OpenGL is easier to learn than DirectX and the code is much easier to read and understand.

John Carmack (a programmer at id software) said this:
I have been using OpenGL for about six months now, and I have been very impressed by the design of the API, and especially it's ease of use. A month ago, I ported Quake to OpenGL. It was an extremely pleasant experience. It didn't take long, the code was clean and simple, and it gave me a great testbed to rapidly try out new research ideas.

I started porting glquake to Direct-3D IM with the intent of learning the API and doing a fair comparison.

Well, I have learned enough about it. I'm not going to finish the port. I have better things to do with my time.

[...]

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.


Though that was a long time ago (1996), but I think that some of the points he makes are still valid.

I'm sure that DirectX has it's own good points, but claiming that OpenGL totally sucks is just plain stupid and the person who said that obviously hasn't used it and is just trying to "defend" M$ products or start a flame war.
Thanks for the input 'ShadeOfBlue', sure you are right, gamers that have no clue and just giving support to M$, let me write the last one, the dude that wrote the following is a 'switcher', that is, a dude that now has a Mac and previously a pc, to be honest I suspect he actually has also the pc and just bought the Mac to say 'hey, I also have a Mac' (plus, he has, not one!, but three xbox) :lol: read 'carefully' :x

"you go anywhere with a 32 MB GPU, the optimization of the game does not care, put it on 1024*768 and see the textures, the game load the textures on the GPU, same goes with the game levels, they are loaded into the accelerator RAM, therefore Carmack (the Doom 3 dude) says the minimum amount actually to play games is 128 MB video RAM."

Later he says... "yes, you can create a game with only 32MB videoRAM, if the game is optimized, but, the graphics´ll be a piece of cr*p (Doom 3, Half Life 2, Far Cry)...

Now the great news... "Peecees use directX, Macs 'still' OpenGL, if there are games cancelled on the Mac is because OpenGL, if they port them to Mac, OpenGL sucks versus DirectX, so the game´ll look horrendous, and if they do the Mac game from zero, the game´ll totally sucks due to OpenGL."

The fact: OpenGL totally sucks... Give me a break!

Guess why the games I have on my Nintendo look so beatiful :lol:
We are here on Earth to do good to others. What the others are here for, I don't know.
:lol:

I wonder why does SGI use OpenGL on all their workstations and their high-end visualization systems if it totally sucks ;)

The amount of video ram has nothing to do with OpenGL or DirectX.
As for the "crappy graphics", that's the designer's and graphics card's problem, not OpenGL's.
sure my friend, but you know, windows and pcs are the best thing out there, so people on Apple, SGI, Sun... have nothing to do, they are so intelligent and we kinda morons. :D
We are here on Earth to do good to others. What the others are here for, I don't know.
themacosxflies wrote: sure my friend, but you know, windows and pcs are the best thing out there, so people on Apple, SGI, Sun... have nothing to do, they are so intelligent and we kinda morons. :D


Indeed, if your computer isn't the latest and greatest 3 GHz overclocked PeeCee with Windoze, water cooling and neon lighting installed in the translucent plastic case, you're absolutely brainless :)

It's kind of sad, though, seeing all those people supporting M$/Intel without even trying the better alternatives first...
Oh well...
I think you can best sum up your friends comments to the usual ramblings of a fanboy. So what if someone choses to use one graphics library over another, the important factor is what you end up with. I dont think I have ever heard any reviewere or end users giving the reason for a game/application sucking because it uses one API over another.

The choice of the API is usually down to capability, DirectX is now apparently a very nice set of libraries that are easy to program for and with a company such as Microsoft putting a lot of weight behind it, it does make a lot of sense to find out if it does what you need. OpenGL in the past has always been generally considered faster as OpenGL support in hardware has always been strong but in the 'fast' pc world of games the hardware technology seems to be driven by DirectX, new cards are out every 6 months with the lastest and greatest DirectX features in hardware.

What amazes me is that with all this computational power they still cant manage to improve physics technology past being able to run faster when running diagonally and jumping constantly. Instead it is being spent on making a lensflare look nicer when apparently looking through a 'persons' eyes. When was the last time you looked at the sun and thought "oh what a loverly lens effect"? 8)

Fanboys are everywhere and everyone has something they favour over another, just some are so passionate about it they believe its their reason in life to convince others that their believe is better. OpenGL, DirectX, AMD, Intel, SGI, Sun, Nvidia, ATI, Quake, Unreal, Halflife.. blah blah, the list is endless. Who cares if in the end if it does what you want?

Its a graphics API not a way of life.

/rant
Good points Mare, that fanboy is not a friend of mine, that is, I even do not know how old he is, so figure. As you says, it makes sense that the pc world uses the -cough- M$ APIs, are there another real option?, we all know how M$ manages to do this and that. But, to discredit OpenGL without knowledge is not fair.


Mare wrote: I think you can best sum up your friends comments to the usual ramblings of a fanboy.

...

I dont think I have ever heard any reviewere or end users giving the reason for a game/application sucking because it uses one API over another.

...

What amazes me is that with all this computational power they still cant manage to improve physics technology past being able to run faster when running diagonally and jumping constantly. Instead it is being spent on making a lensflare look nicer when apparently looking through a 'persons' eyes. When was the last time you looked at the sun and thought "oh what a loverly lens effect"? 8)

Fanboys are everywhere ...

Its a graphics API not a way of life.

/rant
We are here on Earth to do good to others. What the others are here for, I don't know.
From my experience I've always preffered openGL. Partly because of it's heritage but mostly because of it's elegant design.

I dunno if you have ever tried to program using Direct3D but let me teel you it's unesseceraly difficult. Even getting a simple triangle on the screen can be difficult. In the end I gave up trying to learn D3D and moved to OpenGL, and boy am I glad I did. I had a simple Asteroids clone up and running within a few days, admitidly with the help of Glut.
OpenGL 2 will RULE!
The Bandito wrote: In a few years, no doubt, you'll be able to buy a computer,
software and operating system that will match the capabilities
of your current Amiga at about the price you paid for the
Amiga way back when. But you can smile to yourself, knowing
that you were touching the future years before the rest of
the world. And that other computers and operating systems
will do with brute force what the Amiga did years before with
grace, elegance and style.


Eroteme.ch - my end of the internet...
Well now, I'll be approaching this topic mostly as a game developer...

OpenGL and DirectX (well, Direct3d) aren't really that different these days...

GL has glEnable(GL_WHATEVER), direct3d has pD3D->SetRenderState(DRS_WHATEVER, TRUE)

Both are just ways to render polygons on screen. In fact in terms of game development it's even more moot than it used to be, because a lot of work is now done in shaders (vertex and pixel) which both translate pretty much 1:1 between the 2 apis.

Personally, I prefer OpenGL because I like it's syntax and I'm more accustomed to it, but Direct3d 8 and 9 are both very useable too. It largely depends on if you're working from a current codebase which you'd choose.

To correct some mistakes in this thread:
Direct3d emulates just as well missing features as OpenGL, only difference is in direct3d, 1 company making it means that emulation is the same everywhere...you don't see OpenGL emulating multitexturing on our sgis do you? Nope...

Direct3d generally has a more powerful feature-set than base OpenGL, but OpenGL has a nice extension mechanism that allows card manufacturers the ability to support new functionality immediately (which allows programmers to start using that functionality immediately instead of waiting for a new direct3d revision). This is good and bad as the standardization of these features often takes time and the api for the features will often change a bit...

Taking directX as a whole now, it's more than a 3d api, it offers directdraw (which I don't think ANYONE uses...), but also a central set of apis for sound, input, etc. which OpenGL doesn't have (and shouldn't, it's a fricken graphics api).

For the Carmack quote, that was referring to Direct3d 5 (I think) back when there was Immediate mode and retained mode, and neither was good for everything...since then direct3d's structure has become infinitely nicer.

And well, to finish this off simply: As a game developer, it doesn't matter what API I'm using, nor does it matter what language I'm programming in, they all work the same in the end, they all have benefits and drawbacks, and if people are wasting time worrying about language and api, who's worrying about the game?
vegac wrote: For the Carmack quote, that was referring to Direct3d 5 (I think) back when there was Immediate mode and retained mode, and neither was good for everything...since then direct3d's structure has become infinitely nicer.


I've googled up some sample code, for both D3D 5 and 8, and I must say, that the code written for D3D 8 is much cleaner, but still more complex than OpenGL's (for some things), though that's probably because I'm more used to OpenGL.

And well, to finish this off simply: As a game developer, it doesn't matter what API I'm using, nor does it matter what language I'm programming in, they all work the same in the end, they all have benefits and drawbacks, and if people are wasting time worrying about language and api, who's worrying about the game?


Indeed. It doesn't matter what you use, as long as the final result is what you (and the customers) want. :)
Direct3D is just one of many libraries available in DirectX. For game developers it makes sense to support a certain version of DirectX and leave compatibility up the the sound/graphics card makers.

Direct3D, like the rest of the Win32 development world is fine... if you like object oriented orgies. C++ hell. But some people enjoy that.

A couple of the Mac (and Linux) game porting houses have written development-time Direct3D->OpenGL wrappers. The result is good but not perfect. You get something that's slower and more difficult to tune/optimize.
OpenGL is portable, Direct3D is not. If you want a (potential) portable application OpenGL should be your choice since Direct3D is only available for Win32/x86-32. IMO, portability is _extremely_ important (even for proprietary software). On the contrary, Microsoft appears to disagree .
$ cat TODO
Learn Inner Sanctuary; Act Autonomous; Forge Future; Experience Enthean Enlightenment.