OpenGL or Direct3D ?

AgentXen

Newbie
Joined
Jul 7, 2003
Messages
853
Reaction score
0
Witch one is better?
And Why?
Does Direct 3D have something to do with DirectX ??
 
/me expects a flame thread

I don't know which one is better, I'm sure both id and Valve had their reasons to choose either Direct3D or OpenGL.

Direct3D is the graphics part of DirectX, you also have DirectSound that handles the sound, DirectDraw and DirectInput.
 
i heard both are out of HL2. but it would need to it support older computers so who knows?!
 
Witch one is better? And Why?

OpenGL (OGL) is cross platform and is thus available on Linux, Mac, PC and Unix.
DirectX is Windows only (natively)

OpenGL is created by a group of hardware and software manuafacturers called ARB.
DirectX is designed and maintained by Microsoft only.

OpenGL is much slower to keep up with current technology - because there is no single controller
DirectX updates its capabilities more often

Hardware manufacturers have to support DirectX as is to obtain certification.
OpenGL can be implemented with extra functions called extensions which extend and make the API easier/more powerful

------

Conclusion. If you want a cross-platform app go OpenGL. Other than that, it really comes done to choice
 
Actualy even if you use OpenGL you will need to use DirectX also. OpenGL is only a graphics API, it does not come with an API for getting user input, playing back audio, networking or any of the other vital features that DirectX supplies as standard. Most games who's graphics are written exclusively in OpenGL but for the windows platform still use DirectX for everything else that is just as important.

Also, with the advent of Managed DirectX, it is technicaly possible for DirectX to become a crossplatform API. Managed DirectX runs on the .NET Framework and allows any language besides C# and VB.NET to be used in writing DirectX applications. For instance you can write DirectX applications using Delphi, J#, and any other language that has been ported to use the .NET Common Language Runtime. All that is required is that Microsoft creates a .NET Virtual Machine for the Unix, Solaris, etc systems and your DX9 application no matter what language would logicaly work for them. This is something that the Java language was famous for, and is the reason Microsoft created the .NET Framework with so many Java liknesses. (For instance the JIT compiler, GC and others)

Personaly I prefer using DirectX when I write 3d applications. Everything I need is already there, it is fast, and always updated with the latest technologys.
 
AgentXen said:
Witch one is better?
And Why?
Does Direct 3D have something to do with DirectX ??
We allready basically had this discussion in another thread. Neither is "better" depending on your needs.

OpenGL is good for when you MUST maintain cross-compatability with other Operating systems. It can do everything Direct 3D can, with one caveat, it takes a lot longer to do it the OpenGL way right now, since the core hasn't been upated in eons. Due to this you have to program all newer features with what are called vendor specific extensions, these mean basically reprogramming the effect the same time for each video card or card brand.

OGL's also still unable to use a unified high level shading language, GSlang's ATI only and CGI's nVidia only, and ATI's GSlang compiler is very lacking right now. So it's either those or use the ARB shading program, which basically means programming all your shaders in assembly.

Direct3D's easier to use and takes less time to work with, however as pointed out, it's microsoft specific, so you'd only use it if you were doing a windows only program. Generally most game makers don't have a problem with that since windows accounts for over 90% of the desktop market, hobbiests and other free/open programmers however are usually best to make cross-platform capable software, since they don't have to worry about budgets.
 
DirectX is the best right now, not many people use linux or mac to play game (cept for running servers)

Windows is the best os for gaming and dx is much more feature ful then ogl at this point, ogl use to be the best around the time that hl1 was released but it has not really evolved since then and has fallen far behind dx

People that say ogl is better right now are either ignorant or have some nerdy beef with microsoft
 
People that say ogl is better right now are either ignorant or have some nerdy beef with microsof

That itself is a highly ignorant statement.

Is John Carmack ignorant? Does he have "some nerdy beef" with Microsoft?
 
Most games ive ran run on Direct3D, theres only HalfLife that I can think of that uses OpenGL. nVidia card btw.
 
]SK[ said:
Most games ive ran run on Direct3D, theres only HalfLife that I can think of that uses OpenGL. nVidia card btw.

heh, every quake 3 engine based game uses ogl. and there are a lot...
 
PiMuRho said:
That itself is a highly ignorant statement.

Is John Carmack ignorant? Does he have "some nerdy beef" with Microsoft?
I agree the statement wasn't the right one to make, however, yes, Carmack has demonstrated himself to have an anti-microsoft sentiment that defies logic, so I'd say he qualifies into that category. Though that doesn't make the statement you were quoting true.
 
Please provide examples of Carmack's anti-Microsoft stance.
 
All I know is that OpenGL runs a lot better on Linux than any Windows OS, based on my experience.
But I wouldn't be able to give you a solid answer as to which is better, because I wouldnt know if D3D is better than OGL, and vice-versa
 
Fallout2man said:
I agree the statement wasn't the right one to make, however, yes, Carmack has demonstrated himself to have an anti-microsoft sentiment that defies logic, so I'd say he qualifies into that category. Though that doesn't make the statement you were quoting true.

Doom 3 looks brilliant though and has taken the same amount of time to make as most games made in DX. So why would he want to swap to DX when he has been proggraming in OGL for years and OGL is still capable of creating great graphics. not only that but in refuseing to use a microsoft product that only works with another microsoft product he is incourageing competition and getting himself into the anti M$ peoples good books.
 
Carmack chose OpenGL because he felt it was the best technology choice. If he had some kind of bizarre anti-MS stance, then why are id porting Doom3 to the Xbox?
 
Right, at this moment in time OpenGL and D3D are as good as equal, there is nuffin you can do in one which you cant do with the other.

OpenGL is infact updated FASTER than D3D as venders can add extensions to the API at any time to access new functions of the cards, however this is a mixed blessing as it does create some card dependancy issues, however some people would argue that this is no that difference to checking caps in D3D so *shrugs*

The core API for OpenGL has been updated once a year since around 1999 and infact is now on the 1.5 revision of the spec, the opengl header and dll hasnt been updated for windows since version 1.1 but this is down to MS to update and they have shown no intrest in it (and infact left the ARB some time ago) thus as was said everything post 1.1 has to be accessed via extension (for which there are a few librarys avalible to basicaly do the job for you so its really a non-issue).

The updates to 1.5 have brought numerous extension which means you dont have to write code with vender specific extensions, for example the VBO extension has brought cross card vertex buffers (where as before ATI and Nvidia has two different ways of doing it) and this is true for a number of other points, there are stil places I admit where you have to use vender specific things (pre-2.0 shaders for example as there is no unified way to do fragment shaders/register combiners) but on the whole there is very little which has to be rewritten.

The GLSlang isnt ATI only, it is the ARB approved HLSL for OpenGL, currently only ATI have a version out there which they know has bugs but it does let the programmer get their hands 'dirty' with it, however given there have only been 3 driver revisions with it in they are doing well imo. Nvidia will also be bring out a GLSlang backend at some point 'soon', however as to when this will be who knows :)

However, Cg WILL work on cards other than Nvidia's, even if it requires some mild massaging to get working with ATI cards as they havent done a backend for it, and this even takes card of the pre-PS2.0 shader issue as iirc it can generate fragment shader/register combiner code for older cards.
I'll go out on a limb here and say that you will NEVER see D3D (or DX) appear on a system other than windows or the XBox simply because MS has no intrest in helpping other OSes run games, so even with the advent of .Net and Managed DX I dont see it becoming crossplatform any time.. errm... ever.

So, as to which one is better, the answer is a flat 'neither', it comes down to personal preference as to which coding style you prefer (MS's COM-everything-is-an-object or OpenGL's C interface) as both APIs have the facilities to do what you want.

As a side note, you dont have to use DirectSound for Audio, there is the alternative of OpenAL, which on creative cards talks directly to the hardware or on non-creative cards goes via DirectSound (so you dont avoid it completly, but you get some abstraction).

Also, non-windows gaming on PCs is starting to rise, UT2K4, Savage and NWN are just 3 recent games i can name with an OpenGL renderer and work on Linux and/or Macs (and their are others i cant remeber atm) and anything OpenGL based could well be ported across.

So ends tonites lecture :)
 
bobvodka said:
So ends tonites lecture :)

I'm sure what you just said was very interesting but there's no way I'm attempting to read it(all of it), untill you put it in paragraphs and give it some sort of punctuation.
 
/me applauds bobvodka

MrChimp: are you always this obnoxious?
I can see several clearly-defined paragraphs, and plenty of punctuation.

Let he who is without sin....
 
very well said bobvodka, I actually took the time to read it ;x
 
This debate is pointless because you people are missing things right in front of you. The fact is that a 5 year old game called HALF LIFE supported both D3D and OGL. So if you think one is better than the other pick that one. I don't care if you think one is better, because it doesn't matter. Don't let your ignorance give you tunnle vision, it would do most people some good to see the whole picture.
 
Wonkers:

The results of Valve's last hardware survey are here: http://hlsdk.valve-erc.com/

Which graphics API was most used? Interesting, no? Then look at second place.
 
I saw that yesterday and was blown out of the water by some of the results. It blew my mind that any self-respecting gamer would use software instead of OGL or D3d. They don't have a 3d accelerator ? What the hell. Also it's funny that most people used the Nvidia Gforce 2 Mx. That was the card I used in my old comp.

I was also wondering when this servey was made because most people used win98. ouch. Other than that though I am still right. Why wouldn't Valve include all the options. They did in Half life ,why not in the sequel?
 
Firstly, the survey is slightly skewed. The data is taken when you apply the 1.1.1.0 patch to Half-Life. In a large amount of cases, this will be people reinstalling HL and applying the patch before they even run it, in which case it'll be in software mode.

Also bear in mind that HL was written on top of the core of the Quake engine, which used OpenGL for hardware rendering. Valve effectively hacked in their own D3D renderer, which was never as good or as popular as the OpenGL one. Obviously, when they started work on Source, they made the decision to go with D3D for reasons that we're not privy to (I've written to Gabe and asked him)
 
I'm sure there is a email in the valve information thread from one of the engine programmers slandering OpenGL. It's about a paragraph long though (as I remember it) so it can't say much.

bobvodka: Isn't there a problem with VBO's, I heard that people were wondering just which way they should implement them.
 
I'm guessing the reason they went with D3D over opengl was because, at the time the project started, OpenGL was lacking some things such as vbo and other features d3d had, however times have changed since then (remember, we are talking a fair few years ago now)

re:vbos
The only problems i've seen thus far have been people not not helpping the drivers by not aligning data sanely (using 3bytes for example and wondering why it goes slow as its not aligned properly) and some flakeyness with early versions and some early cards on ATIs side (however, this was a few months back, so who knows what has changed).
If people dont understand how to impliment them then they should learn to read the specs, the VBO spec is one of the few where examples are given with how to use it :)
 
40% of people using a software renderer? There are certainly a lot of people out there who probably don't know what they're missing...
 
Gabe said somthing about how a large amount of people are using software and they probably don't even know they can change it.
 
OMG....that's pathetic. almost 50 % of them are morons then. How do they even get the game started if they don't know they can switch from software to OGL or D3d? YOWZERS...look out! , these people could be anywhere. (even in your own home)
 
Back
Top