What are the major Differences between OpenGL and DirectX ?

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
Originally posted by: chcarnage
OpenGL runs on Windows, Linux, FreeBSD and MacOS.
DirectX runs on Windows.

(/trivia)


that I know , I am talking the way you code in open gl/direct X which gets an adavantage of being easier to code , and which is generally prefered by developers?
The issue came to mind once i read an article that says Microsoft is dropping support for openGL in Windows Vista , so openGL on Windows will not be possibel.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
DirectX is much more comprehensive then OpenGL.

OpenGL is _just_ for 3d graphics. That's it. It's a API that's designed for creating 3d graphics that are practically accelerated by hardware.

DirectX is deals with 3d stuff, but also mouse and keyboard stuff, windowing, and all sorts of other little details.

They realy are directly applicable... A bit like Apple's and Oranges.

A much better comparision would be between Direct3d vs OpenGL in terms of performance and programming ease.

From what I understand, although I've never used this stuff, is that OpenGL is easier to program for, but Direct3d/DirectX adds new features quicker.

Which is one of the big deals about OpenGL being locked in at version 1.4 on Windows... you see with OpenGL release 2.0 you got improvements in texture handling and got texture shading programming languages and whatnot, just like what DirectX 9.0 got. So if you try to run a OpenGL 2.0 thing on Areo it's going to look like @ss, if run at all. Fortunately when you run full screen, like in a game, your going to use whatever vendor-supplied OpenGL implimentation that you get from your vid card manufacturer, which are all very up to date since Nvidia and freinds are part of the people that decide OpenGL specifications. In the larger sceme of things only supporting 1.4 means that Microsoft only choose to support a very obsolete version of opengl in areo.

The other major difference between OpenGL and Direct3d is that direct3d is a closed propriatory API. OpenGL is open standards, decided by a industry standards group.

OpenGL runs on most platforms.. Unix, Windows, OS X, Linux, etc.. and there is a excelent free software rendering library that is called Mesa so that it works fairly well on systems that dont' have hardware acceleration capabilities . Stuff like that is why DirectX is only realy used for games and such. For 3d apps, scientific imagine, medical imaging, and stuff like that everybody uses OpenGL.

However most games are written for DirectX since most games are targetted at Windows and that's what windows supports best.

Aside from that most of the game logic in games is completely seperate from what 3d API they design it for.

For isntance Halflife 2 uses Quake 1 code. Quake 1 was obviously a early OpenGL-based (sorta, it use glide and all that, too), but Halflife2 is a state-of-the-art Directx 9 game. Far cry and a few other games have the ability to run in either DirectX mode or OpenGL mode.

If you want a Apples to Apples comparison between a cross-platform API that uses OpenGL vs what DirectX is look at LibSDL.

It's full name is "Simple Direct Media Layer"

LibSDL is a cross-platform API that runs in Linux, OS X, and Windows. For the 3d portion if it it uses a thin wrapper around OpenGL, but also takes care of joysticks, windowing, keyboard/mouse, sound, etc etc.

It's open standards and open source. Any game maker can incorpate it into their game and it won't cost them anything.

From what I understand it's MUCH simplier to program for LibSDL then it is for DirectX. LibSDL has a much higher form of abstraction for the programmer to use then what DirectX supplies and I don't think has any serious performance hit.

For example combined with the recent OpenGL release Unreal Tournament that runs natively in Linux (using the nvidia drivers) run just as well in Linux as Windows and gets very similar performance with the same graphics.

It's a port from DirectX to LibSDL... and I think it was mostly done by one individual.

(which btw had native 64bit version in Linux long before Windows XP-64 even came out)

While LibSDL isn't commonly used by big-name game manufacturers it is often used by Indie and non-commercial makers.

I think that now OS X is comming out on x86 and is possibly attracting more users then ever before if your a game maker libsdl should be very attractive because it has it's own file system and OS abstraction layers making making cross-platform games a relative breeze.
 

bersl2

Golden Member
Aug 2, 2004
1,617
0
0
Originally posted by: drag
Which is one of the big deals about OpenGL being locked in at version 1.4 on Windows... you see with OpenGL release 2.0 you got improvements in texture handling and got texture shading programming languages and whatnot, just like what DirectX 9.0 got. So if you try to run a OpenGL 2.0 thing on Areo it's going to look like @ss, if run at all. Fortunately when you run full screen, like in a game, your going to use whatever vendor-supplied OpenGL implimentation that you get from your vid card manufacturer, which are all very up to date since Nvidia and freinds are part of the people that decide OpenGL specifications. In the larger sceme of things only supporting 1.4 means that Microsoft only choose to support a very obsolete version of opengl in areo.

Oh, there's no conflict of interest there. No, not at all...