PDA

View Full Version : Difference between OpenGL & DirectX?


jamesdietz
06-23-2008, 03:27 PM
I've been playing this sim for years & don't know the difference..Confusing me even more is that I have an old FX5800 card in my rig which seems to like OpenGL better than DirectX...Now that I am getting updated will it be a good idea to see if I should change settings & keep updated on DirectX? Confused,as stated above.

Thunderbolt56
06-23-2008, 04:28 PM
Definitely keep updated on your DirectX, but use OpenGL for this sim. Even the newer hardware likes it better for this sim.

K_Freddie
06-23-2008, 06:44 PM
The last time I looked sometime ago..
From a software perspective, OpenGL is suited for realtime graphics apps, like games whereas DX although more user friendly, makes it slower and more suitable for non-realtime stuff.

A real life comparison would be Linux and Windoze, each have their uses.
:)

Thunderbolt56
06-23-2008, 07:37 PM
DirectX is actually a simple wrapper for OGL thus using OpenGL for high-demand apps (like games) circumvents a series of processes and resultantly speeds things up.

Feuerfalke
06-23-2008, 10:05 PM
It's not as simple as that. DX may be a wrapper for what is the basis of OpenGL, but it uses a different approach and optimizes rendering for effects and quality.

The outcome is, that with OpenGL you got to program many things manually that you get for free in DX. You can see the effect in IL2, as under DX the textures are smoother and look more real, though the engine was optimized for OpenGL!

So depending on the application you can be faster with OpenGL, leaving out some of the routines of DX, while on other applications and especially when working for games and such renders, it's often more practicable to use DX, as you will more easily see, what you'll get in the end.

OpenGL has just the advantage, that it is widely opensourced, while you make yourself a "slave" to M$ when using DX.

96th_Nightshifter
06-23-2008, 11:44 PM
[QUOTE=Feuerfalke;44553] You can see the effect in IL2, as under DX the textures are smoother and look more real, though the engine was optimized for OpenGL!

QUOTE]

I know nothing about either of them but I do get entirely the opposite effect here; when I use OpenGL my game looks smoother and more real?

I get better fps with DX so I use that when online and I use OpenGL for flying offline and taking screenshots etc. since as far as I know you can only use "perfect" settings under OpenGL.

Feuerfalke
06-24-2008, 08:26 AM
[QUOTE=Feuerfalke;44553] You can see the effect in IL2, as under DX the textures are smoother and look more real, though the engine was optimized for OpenGL!

QUOTE]

I know nothing about either of them but I do get entirely the opposite effect here; when I use OpenGL my game looks smoother and more real?

I get better fps with DX so I use that when online and I use OpenGL for flying offline and taking screenshots etc. since as far as I know you can only use "perfect" settings under OpenGL.


The textures get filtered with DX so you can see the IL2s 8bit-textures with just 256 colors looking much smoother. DX also eliminates microstutters experienced during online-play largely.

That has little to do with FPS, though. You get better FPS because you can only run the game in perfect mode under OpenGL, as you posted correctly, which directly effects rendering-distance for the landscape, for example.

So while the whole game looks better under OpenGL at perfect mode, the TEXTURES look smoother and more realistic under DX.

Codex
06-24-2008, 01:10 PM
DX is a wrapper for OpenGL :confused: Where on earth did you hear that from?

Thunderbolt56
06-24-2008, 03:07 PM
DX is a wrapper for OpenGL :confused: Where on earth did you hear that from?

From an anorexic heroine junky behind the downtown convenience store that was drinking something from a paper bag...

KG26_Alpha
06-24-2008, 05:41 PM
From an anorexic heroine junky behind the downtown convenience store that was drinking something from a paper bag...

Hey that's the v4.09m beta guy .............


Here's a list of popular Open GL games


* America's Army
* Baldur's Gate 2 – Defaults to D3D
* Call of Duty
* City of Heroes
* City of Villains
* CodeRED: Alien Arena
* Counter-Strike (not Counter-Strike: Source)
* Darwinia - Patched to default to D3D
* Doom 3
* Dwarf Fortress
* Earth 2150
* Enemy Territory: Quake Wars
* Far Cry – Defaults to D3D
* Frets On Fire
* FlightGear
* Half-Life (not Half-Life 2)
* Homeworld 2
* IL-2 Sturmovik: 1946
* Neverwinter Nights
* Penumbra: Overture
* Prey
* Quake series
* Rage
* Scorched3D
* Second Life
* Serious Sam
* Serious Sam 2 – Defaults to D3D
* Soldier of Fortune series
* Spring
* Starsiege: Tribes
* Star Wars Jedi Knight: Jedi Academy
* The Chronicles of Riddick: Escape from Butcher Bay
* Trainz - Also runs in D3D
* Tribes 2
* Tux Racer
* Ultima IX: Ascension
* Unreal series
* Warcraft 3 - Defaults to D3D in Windows
* Wolfenstein: Enemy Territory
* World of Warcraft - Defaults to D3D in Windows
* Wurm Online
* X-Plane

Bobb4
06-24-2008, 06:59 PM
Hey that's the v4.09m beta guy .............


Here's a list of popular Open GL games


* America's Army
* Baldur's Gate 2 – Defaults to D3D
* Call of Duty
* City of Heroes
* City of Villains
* CodeRED: Alien Arena
* Counter-Strike (not Counter-Strike: Source)
* Darwinia - Patched to default to D3D
* Doom 3
* Dwarf Fortress
* Earth 2150
* Enemy Territory: Quake Wars
* Far Cry – Defaults to D3D
* Frets On Fire
* FlightGear
* Half-Life (not Half-Life 2)
* Homeworld 2
* IL-2 Sturmovik: 1946
* Neverwinter Nights
* Penumbra: Overture
* Prey
* Quake series
* Rage
* Scorched3D
* Second Life
* Serious Sam
* Serious Sam 2 – Defaults to D3D
* Soldier of Fortune series
* Spring
* Starsiege: Tribes
* Star Wars Jedi Knight: Jedi Academy
* The Chronicles of Riddick: Escape from Butcher Bay
* Trainz - Also runs in D3D
* Tribes 2
* Tux Racer
* Ultima IX: Ascension
* Unreal series
* Warcraft 3 - Defaults to D3D in Windows
* Wolfenstein: Enemy Territory
* World of Warcraft - Defaults to D3D in Windows
* Wurm Online
* X-Plane

I fail to see why this list should impress me. It does not answer what was asked in the original thread
Basically the only real difference between Open GL and DirectX in Il2 is Perfect mode period.
Perfect mode gives you better clouds etc...

But to answer the boader post here in part is the answer


What is the difference between DirectX and OpenGL? The answer to this one is: everything. OpenGL was designed ages ago (pre 1990), while DirectX 1 was build (1994) specifically to draw game developers from DOS onto the new Windows 95 platform. DirectX is (to all intensive purposes) a Windows / Mircrosoft only solution, while OpenGL runs on most desktop operating systems that exist (including a variety of embedded platforms). While DirectX provides strong support for many features outside of 2D and 3D Graphics, OpenGL relies on external systems to provide that functionality (potential systems include: SDL, OpenAL, GLUT (OpenGL Utility Toolkit), or even DirectX).

What does DirectX Compatible mean? When a graphics card is DirectX 9 Compatible, it means that it supports the DirectX 9 specification and can run software built to run on top of DirectX 9. Due to it’s history, each version of DirectX breaks compatibility with the previous version. As a devloper, I see this as a nightmare for Microsoft and the developers that work with DirectX. Mainly for a developer: if you are qualified in DirectX 10, you need to learn how to drive DirectX 11.

Why is there only OpenGL 1 and 2? Considering that OpenGL is the older of the two, these numbers make OpenGL seem way out of date. The simple answer to this question is: Extensions. Where DirectX revises the entire platform with each release to incorporate new features, OpenGL has a system called Extensions. This allowed graphics card vendors to add new functionality without changing OpenGL itself. Those applications and games that needed the Extension can look ask the OpenGL system for the Extension, if it doesn’t exist: the game can work around not having the Extension, or explain to the user that their graphics card cannot support it. Major Extensions in recent years include:

Multitexturing
Normal Mapping
Shaders

Why is there no such thing as an “OpenGL compatible” graphics card? Again the answer is Extensions. Because the core OpenGL specification is so simple, almost any graphics card that is capable of any 3D graphics is OpenGL compatible. For that reason, no-one bothers with the idea of “OpenGL Compatible”.

Why is there no such thing as an “OpenGL compatible” graphics card? Again the answer is Extensions. Because the core OpenGL specification is so simple, almost any graphics card that is capable of any 3D graphics is OpenGL compatible. For that reason, no-one bothers with the idea of “OpenGL Compatible”.

The answer posted above is found by googling the question and is not my own work
http://lemnik.wordpress.com/2007/05/31/what-are-directx-and-opengl-part-2/

KG26_Alpha
06-24-2008, 07:06 PM
Open GL3 has been out since late 2007
For the OP.
Have a read >
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=229374
http://www.winmatrix.com/forums/index.php?showtopic=13647
http://en.wikipedia.org/wiki/Comparison_of_OpenGL_and_Direct3D

Feuerfalke
06-24-2008, 07:46 PM
Hey that's the v4.09m beta guy .............


Here's a list of popular Open GL games


* America's Army
* Baldur's Gate 2 – Defaults to D3D
* Call of Duty
* City of Heroes
* City of Villains
* CodeRED: Alien Arena
* Counter-Strike (not Counter-Strike: Source)
* Darwinia - Patched to default to D3D
* Doom 3
* Dwarf Fortress
* Earth 2150
* Enemy Territory: Quake Wars
* Far Cry – Defaults to D3D
* Frets On Fire
* FlightGear
* Half-Life (not Half-Life 2)
* Homeworld 2
* IL-2 Sturmovik: 1946
* Neverwinter Nights
* Penumbra: Overture
* Prey
* Quake series
* Rage
* Scorched3D
* Second Life
* Serious Sam
* Serious Sam 2 – Defaults to D3D
* Soldier of Fortune series
* Spring
* Starsiege: Tribes
* Star Wars Jedi Knight: Jedi Academy
* The Chronicles of Riddick: Escape from Butcher Bay
* Trainz - Also runs in D3D
* Tribes 2
* Tux Racer
* Ultima IX: Ascension
* Unreal series
* Warcraft 3 - Defaults to D3D in Windows
* Wolfenstein: Enemy Territory
* World of Warcraft - Defaults to D3D in Windows
* Wurm Online
* X-Plane

The funny thing is, that you named several games which are infact based on DX, but can be configured to work under OpenGL, just like IL2 runs under DX. Other than you name game-engines several times. Quake, Wolfenstein, Quakewars, Doom, and some others share the same (upgraded) engine. Others like Half-Life are so old that they were introduced while DX was still non-standard.

Doesn't mean OpenGL is bad, but it also doesn't mean it's more important or better than DX. While Unreal was developed, the strongpoints became pretty clear:
ID-Software claimed OpenGL was the better choice for the Quake-Engine, because it was easily adoptable for other systems and ran on a very wide array of PCs, with and without 3D-acceleration at high framerates.
EPIC decided to go for DX, because it was easier to achieve certain effects.

Today this competition is even worse. While OpenGL is widely supported and can be adopted for other OS, DX is used by consoles and opens possibilities to easily exchange programs to and from these platforms.

KG26_Alpha
06-24-2008, 10:53 PM
The misconception is that alot of people probably don't realise that OGL is being used as opposed to DX without them knowing, as per the list i pasted .

The fact IL2 allows you to choose DX or OGL is just another setting amongst many user are allowed to change in the settings, most modern games wont allow such a vast amount of "direct" adjustments.

The original IL2 was able to run on 8mb graphics and low system spec and with the progression of hardware it soon caught up with the game engine and what IL2 could look like.

Modern games can throw you out of the set up because your graphics/system isnt up to spec (BF2) as happened to my son.

Edit>

After testing IL2 1946 under DX & OGL with IL2 1946 there are many differences with Nvidea cards and drivers, landscape and water being the major ones. "ATI" I cant comment on as I don't use them.

:)

Feuerfalke
06-25-2008, 05:59 AM
The misconception is that alot of people probably don't realise that OGL is being used as opposed to DX without them knowing, as per the list i pasted .

The fact IL2 allows you to choose DX or OGL is just another setting amongst many user are allowed to change in the settings, most modern games wont allow such a vast amount of "direct" adjustments.

The original IL2 was able to run on 8mb graphics and low system spec and with the progression of hardware it soon caught up with the game engine and what IL2 could look like.

Modern games can throw you out of the set up because your graphics/system isnt up to spec (BF2) as happened to my son.

Edit>

After testing IL2 1946 under DX & OGL with IL2 1946 there are many differences with Nvidea cards and drivers, landscape and water being the major ones. "ATI" I cant comment on as I don't use them.

:)

Of course there are, as IL2 was designed for OpenGL! Just to take one title from your list: If you chose to run any game from the Unreal series or any game that uses this engine under OpenGL, you will see a same effect, just the other way around.
Water-reflections will not render correctly, decals will not show, lighting and particle effects are almost completely gone, even some weapons-effects won't show under OpenGL. And of course it is faster because of that. Just like IL2 is faster under DX. That doesn't mean, though, that UT is optimized or built for OpenGL! (And yes, I know what I am talking about, because I modded UT a lot and even gave a course at university to teach others to do so.)

IMHO the main thing about OpenGL is this rebellion-thing again. As the name says, OpenGL is pretty much open, while DX is owned by Microsoft. Bohooo, must be bad, evil, demonic, capitalist crap - how can anybody promote it?

Nonsense. Both have their pros and cons, that's all there is to it. As somebody I know from the gaming industry said to me about the difference between DX and OpenGL: "I cannot imagine why anybody would prefer to use OpenGL from the programmers point of view. You get the same effects in OpenGL for a lot of work, you get in DX with just a short single line of coding."

heloguy
06-25-2008, 09:43 AM
(to all intensive purposes)

It's actually "for all intents and purposes."
http://wiki.answers.com/Q/Is_the_saying_'all_intents_and_purposes'_or_'all_i ntense_purposes'

Bad grammar bothers me.


Bobb, I do realize that wasn't your writing. Nice link, though.

Codex
06-25-2008, 11:38 AM
From an anorexic heroine junky behind the downtown convenience store that was drinking something from a paper bag...

LOL

Seriously though, the main difference b/n the two APIs is slowly becoming a non-issue in terms of graphical feature sets. OpenGL is opened sourced so it is perfectly adaptable to other OS platforms and IMO the code is much more user friendly. The down side is, it only handles graphics. OpenGL 2.1 (I think) is the official version, OpenGL3 is still some time away from being adopted.

DX on the other hand is a real biatch to code in (although DXUT is making things easier) but has follow the complicated COM system, but, it can be used for other devices besides the GPUs. DX makes things less complicated when dealing with things like sound cards and gaming input devices. Although is only available on Windows, it is an API that melds well in to the OS.

nVidia and ATI support both APIs on the cards we mainly use for this sim and I think it's mute to compare em this way. Both have their advantages and disadvantages and their fan boys/girls. I'm having fun learning DXUT at the moment, but the release of XNA 3.0 CTP has now really got my attention. It's a dream to code in but doesn't have joystick support (but there are ways around that :wink: )

Erzeal
05-11-2010, 04:58 AM
Like most have said. Both have their Pro's and Cons...
I prefer to use Opengl when i can...but unfortunately it seems i have to use Directx for IL-2 1946 cause i get severe slow downs in Opengl mode, i'm not sure why. The directx mode runs smooth except for occasional hiccups with large explosions. Probably just some quirk with my GPU.

Qpassa
05-11-2010, 06:03 AM
il2 looks better in OGL

Erzeal
05-14-2010, 05:09 AM
And it seems to run better too...fixed the severe slow down i was having...just had settings turned on that were too high. Runs fantastic now. :D:grin:

JZG_Con
05-28-2011, 12:44 AM
i just get a black background with opengl in perfect mode ..shame

Romanator21
05-28-2011, 07:30 PM
In OpenGL mode it's now impossible for me to use the mouse on the game GUI because the fps is so low - and this is before I've even rendered anything! Once the game starts, things become a literal slide-show. I also cannot run "perfect mode" at all (grey-out option). Lastly, there are numerous artifacts in clouds that would be a big immersion killer.

DX runs smoothly, and quickly on excellent settings...Maybe it's because I have a horrible Intel GPU which is probably designed to handle other drivers poorly and have DX perform the best on any given function. ;)

Mustang
05-28-2011, 11:07 PM
For il2 Open GL looks better, and run fast, you can archive Perfect mode.

With DirectX you can´t go to perfect mode for IL2.

Nvidia graphics card run very good OpenGL.


ATI graphics card run very bad OpenGL, for IL2... maybe a eternal drivers problem.

When an explosion or smoke is showed ...
The FPS going bad in DirectX , OpenGl runs better in those situations and get up the minimun FPS vs DirectX

This is only for IL2

322Sqn_Dusty
05-29-2011, 11:43 AM
OpenGL was my choice for 1946 and mods. I really liked the perfect mode. Currently I can't run the 1946 in OpenGl anymore. The graphics are garbled as the cards would be damaged. Directx is the only mode the game picks up with no problem. Could be an issue with the CAT 11.5.

Altough i've got CloD, 1946 with the mods will remain major for me to fly. Let them sort out CloD first.

(Ridiculous that you can't fly it with quadcore and crossfire cards....)

Porksmuggler
05-29-2011, 03:38 PM
The graphics are garbled as the cards would be damaged.

I'm not sure what this means, but IL-2 works fine in OpenGL with the hardware you have. There have been several threads discussing recent problems with the AMD/ATI 11.5 drivers though.

I'm still on 11.3, and everything works great with these graphics settings:
http://forums.steampowered.com/forums/showthread.php?t=1358851

322Sqn_Dusty
05-29-2011, 09:58 PM
The screen in OpenGl consists of purple pink green blue red stripes and bloks. It's possible to make up what's on the screen. It's the same look i've had years ago with EAW (it seems it didn't like ATI at some point). This sure looks as a driver issue at the moment.

Upped to Cat 11.5 for CloD.