• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Why You Should Use OpenGL Instead Of DirectX

OpenGL is often used today for developement tools like character modeling, map design, and the like. I think it is because it is easier to code and (not positive on this) they may do final compiling on Linux multi-processor servers. Linux can run the OGL code for final verification the compile is good.
 
well all i care about is the games i can play and the speed i can play them at the problem with open soure at least in the case with OpenGL is it relies on those using it to update it and improve it problem is no is using it no ones updating it thus it cannot improve i agree in many cases opengl is and still is faster but in terms of support open gl has gone the way of the dodo in terms of 3d yes open gl is faster but i get a few frames more here but suffer more on the back end to due incompatibiliies and crappy drivers so i stick with DX rendering
 
directx is just a marketing tool. i bet there are strong incentives for game developers to skip opengl alltogether.
platform independent means profit loss. now thats EVIL.

last time i checked (some years) opengl was alot faster than dx, unfortunately these days
its only one of them, so comparisons are not possible anymore.

does it really matter how fast the graphiccard is ? look at ati .. their 5770 offers only 20 fps
in stalker. thats an old game.

marketing .. makes you want to:nutkick: ms, ati, all of them :laugh:

thing is no one took the bait of open GL, everyone went with a API that MS was using, sort of like how IE 8 Still dominates the market for useage.
 
thing is no one took the bait of open GL, everyone went with a API that MS was using, sort of like how IE 8 Still dominates the market for useage.

That's actually incorrect, Firefox is now the most popular browser...

Nordic Hardware's Andreas Galistel said:
On January 5th we posted news that Internet Explorer was losing ground and that Firefox kept gaining ground. On December 21st Firefox 3.5 became the most commonly used browser in the world. It is safe to say that Firefox is here to stay, and in some weird way Firefox actually managed to achieve this thanks to Microsoft starting to update Internet Explorer. Microsoft has failed when it comes to usability and speed, and when it comes to security IE is still more commonly used for exploits than Firefox.

... as long as my games look sweet I couldn't give a rats what API is used.
 
Quake is DirectX but there was a "GL Quake" engine spawned off of it with an OpenGL core.

All the Quakes have been OpenGL and none has been Direct3D AFAIK (have doubts with Doom3 engine). They used DirectX only because of DirectInput and DirectSound, but the graphics have always been OpenGL.

Another example is the Unreal Engine which only in it's third iteration became Direct3D.

The truth is that until DirectX 9 OpenGL has been superior and most game engines used it, at least the best ones. It's not been until DX9 that all the developers moved to D3D and they did so mostly because it was good enough, not better, just good enough so that using 2 libraries didn't make a lot of sense anymore. DirectX had to be used for it's DirectInput and DirectSound as I said earlier.
 
All the Quakes have been OpenGL and none has been Direct3D AFAIK (have doubts with Doom3 engine). They used DirectX only because of DirectInput and DirectSound, but the graphics have always been OpenGL.

Another example is the Unreal Engine which only in it's third iteration became Direct3D.

The truth is that until DirectX 9 OpenGL has been superior and most game engines used it, at least the best ones. It's not been until DX9 that all the developers moved to D3D and they did so mostly because it was good enough, not better, just good enough so that using 2 libraries didn't make a lot of sense anymore. DirectX had to be used for it's DirectInput and DirectSound as I said earlier.

Unreal 1 Engine used Glide, not Open GL, UT however had the support for DirectX aswell.
 
Well, the Unigine has OpenGL support. They will release a linux version of the engine shortly (soon as AMD works out some tesselation and other issues with the Linux driver). Also, I wouldn't be surprised to see Rage support OpenGL.

I really want OpenGL to thrive, and I don't understand why it doesn't. OpenGL can be run on the PS3/360/PC. DirectX on the PS3 doesn't happen, so going strictly DirectX is not a valid argument. Also, with OpenGL, you have Linux and Mac capabilities as well.
 
Unreal 1 Engine used Glide, not Open GL, UT however had the support for DirectX aswell.

Glide was a cut down, improved for real time rendering on a graphics card version of OpenGL...

First Quake which was the first game to be hardware accelerated was Glide too, both engines were ported to OpenGL later (because it was so easy) although the games themselves weren't OpenGL, they were Glide, the cut down version (for example 16 bit texture limitation).
 
Well, I can tell you that OpenGL is at least more powerful than DX7.

The hardware:

Compaq D510 SFF PC with

P4 2.4GHz (no HT)
nvidia GF6200 128MB AGP graphics card
512MB RAM

Quite weak by modern standards and note how low end that graphics card is...

Now, running Half-Life (the original 1998 game) in something like 1024x768 (I can't remember exactly the res now) was buttery smooth, easily hitting something like 80FPS on the training level. Lock it to vsync and there was no judder at all. Awesome. :rockout:

Try the same thing in DX7 and you got a juddery 30-40FPS. Crap. :nutkick: I had a Voodoo 3000 too and I remember seeing how fast that went in GLIDE in Unreal Tournament.

This means you have to spend on expensive hardware upgrades just to get over Microsoft's inefficiency. So, whenever I see a judder while using my powerful GTX 285, I wonder how much of that is caused by crappy DirectX. :shadedshu

I believe that the same situation exists today and I would compare with more modern games, but they don't have dual API support to my knowledge. Let me know and I might give them a go.
 
OpenGL is often used today for developement tools like character modeling, map design, and the like. I think it is because it is easier to code and (not positive on this) they may do final compiling on Linux multi-processor servers. Linux can run the OGL code for final verification the compile is good.

From what I understand Glide is harder to program for and the API can be different for different hardware. Though I have 0 experience with programming for either so I can't be positive either. Some actual guru will have to lay down the facts :)
 
Theres one main reason DX is winning out, simplicity.

In DX, every generation comes out - OS and cards, followed by games.

you need a DX9/10/11 card/system to play X game.


With openGL, they can patch in features willy nilly - but theres no easy way to tell if customers can support it "oh your card just needs vertex shader 2.1, pixel shader 3.0 and hardware TnL" doesnt bode well with average joe, whereas one overwhelming "you need DX9" does
 
All the Quakes have been OpenGL and none has been Direct3D AFAIK (have doubts with Doom3 engine). They used DirectX only because of DirectInput and DirectSound, but the graphics have always been OpenGL.
I don't know about all but I checked Quake 3 and it is OpenGL. There's only one mention of DirectX in the source and it is commented out.


Two interesting bits I noticed:
Code:
typedef enum {
	GLDRV_ICD,				// driver is integrated with window system
						// WARNING: there are tests that check for
						// > GLDRV_ICD for minidriverness, so this
						// should always be the lowest value in this
						// enum set
	GLDRV_STANDALONE,			// driver is a non-3Dfx standalone driver
	GLDRV_VOODOO				// driver is a 3Dfx standalone driver
} glDriverType_t;

typedef enum {
	GLHW_GENERIC,				// where everthing works the way it should
	GLHW_3DFX_2D3D,				// Voodoo Banshee or Voodoo3, relevant since if this is
						// the hardware type then there can NOT exist a secondary
						// display adapter
	GLHW_RIVA128,				// where you can't interpolate alpha
	GLHW_RAGEPRO,				// where you can't modulate alpha on alpha textures
	GLHW_PERMEDIA2				// where you don't have src*dst
} glHardwareType_t;
They had optimizations in there for several cards because they are incapable of performing some operations.


The source for Quake and Quake II isn't publically available (probably is, but I couldn't find it).
 
I don't know about all but I checked Quake 3 and it is OpenGL. There's only one mention of DirectX in the source and it is commented out.


Two interesting bits I noticed:
Code:
typedef enum {
	GLDRV_ICD,				// driver is integrated with window system
						// WARNING: there are tests that check for
						// > GLDRV_ICD for minidriverness, so this
						// should always be the lowest value in this
						// enum set
	GLDRV_STANDALONE,			// driver is a non-3Dfx standalone driver
	GLDRV_VOODOO				// driver is a 3Dfx standalone driver
} glDriverType_t;

typedef enum {
	GLHW_GENERIC,				// where everthing works the way it should
	GLHW_3DFX_2D3D,				// Voodoo Banshee or Voodoo3, relevant since if this is
						// the hardware type then there can NOT exist a secondary
						// display adapter
	GLHW_RIVA128,				// where you can't interpolate alpha
	GLHW_RAGEPRO,				// where you can't modulate alpha on alpha textures
	GLHW_PERMEDIA2				// where you don't have src*dst
} glHardwareType_t;
They had optimizations in there for several cards because they are incapable of performing some operations.


The source for Quake and Quake II isn't publically available (probably is, but I couldn't find it).


Quake 1 wasnt openGL. afaik, it was software or glide, with openGL being modded in.

Not sure if Quake II was the same, it was too long ago.


your findings back up what i said earlier: unlike DX with its rigid standards, if you release an openGL title you have to manually code support for just about every card out there. They all have mismatched features, with no global easy way to tell what works and what doesnt.
 
does it really matter how fast the graphiccard is ? look at ati .. their 5770 offers only 20 fps
in stalker. thats an old game.

marketing .. makes you want to:nutkick: ms, ati, all of them :laugh:

WTH??? My Nvidia gets 30 fps in stalker (in directX 9)?????
 
your findings back up what i said earlier: unlike DX with its rigid standards, if you release an openGL title you have to manually code support for just about every card out there. They all have mismatched features, with no global easy way to tell what works and what doesnt.

I have to agree, this would put OpenGL at a significant disadvantage, even if performance is better. It's much better to know that you have only one target standard to aim at and DX <version> gives you just that.
 
I have Quake and Quake II source on my server...

I found, and attached glqwcl-readme.txt, which goes into to detail about 3DFX, Glide, and OpenGL.

Quake also has the DirectX SDK. It appears that qwcl.exe would use DirectX and glqwcl.exe would use OpenGL; thusly, both are supported.


Quake II appears to be OpenGL.


So...
  • Quake - OpenGL and DirectX
  • Quake II - OpenGL
  • Quake III - OpenGL

Why was DirectX support dropped? Probably because the lead programmer (John Carmack) is a die hard Linux fan and DirectX means no playing the game on Linux. ID Software is, however, the exception, not the norm.
 

Attachments

thats the GLquake readme. thats not the original quake, but an addon/mod

in that readme they mention quite clearly the original quake was software - while it may have used directX, it did NOT use direct3D - it was directdraw (software/CPU powered)
 
You are correct. d3d.h is there but WinQuake itself does not reference it. It does reference DirectInput, DirectSound, and DirectDraw (it may use others but those are the only ones I checked).


These files came directly from ID Software's site a year or two ago.
 
Theres one main reason DX is winning out, simplicity.

In DX, every generation comes out - OS and cards, followed by games.

you need a DX9/10/11 card/system to play X game.


With openGL, they can patch in features willy nilly - but theres no easy way to tell if customers can support it "oh your card just needs vertex shader 2.1, pixel shader 3.0 and hardware TnL" doesnt bode well with average joe, whereas one overwhelming "you need DX9" does

But average Joe could understand "You need geforce 6 series/radeon X1000 series or later models." no problems on this side:D
 
Hmm... only getting 1180 fps in GLQuake (demo1). Time to tweak!
 
For myself, O|GL always ran better for me at the time.

Cards at the time" Tridet 8mb, 9200SE, 9600 Pro, 9800XT

I never owned a Voodoo card.
None of you are professional coders. (There might be an exception but you will see my point if you are, bare with me.) I am not a professional coder, I once made a platformer with C++ and GLUT (The OpenGL Utility Toolkit) I had no issues rendering across different systems, but I did not use any particle effects. Simply Vertices and Color Gradients, I have never made a Direct X based game.

For current games, iD software (as said by others) seem to be the only ones who seem to be spitting out O|GL still. I'm a big fan of Open|GL but I don't make games. (I speculate most games for PC are also released on the 360, and other platforms and therefore, are Direct X/XNA competent, so if your making the game for a proprietary platform (and if your not why not?) in addition to PC you might as well make all versions of it in that rendering platform. I am thinking of Oblivion specifically right now, it was created with Direct X for the 360, and was released for PC as well. They made an economical choice.

I guess im asking whats it to you how hard it was to code? Which ever one runs the content smoothly should be good enough for the end user. Also the Sound standard associated with O|GL is O|AL. I'm a web designer not a graphics coder, I prefer Drupal for a CMS because of its flexibility but most sites I visit use Wordpress, there is not anything wrong with it. Its probably even easier for most tasks. I think its the same thing in the end and most users don't know the difference.
 
Last edited:
Back
Top