View Full Version : OpenGL 2.0 vs. DirectX 9.0
What are the differences between OpenGL 2.0 and DirectX 9.0
What are the disadvanteges and advantages of both APIs?
baldurk
01-31-2003, 02:32 PM
Well, first of all, OpenGL 2.0 only exists as a growing specification. It is not publically available in the way that DX 9.0 is.
DirectX 9.0 has a HLSL whereas OpenGL 2.0 only has a plan for one.
Other than that the advantages/disadvantages of the two are the same as they have always been.
OpenGL is cross-platform
DirectX has better hardware support (I think)
edit: btw, this could easily turn nasty ;). Just a warning
davepermen
02-03-2003, 06:21 AM
best is to know all of them, and love and hate all of them. both have great features, and both have stuff wich is really messy. so what? gl is great, dx is great, c is great, c++ is great, c# is great, too.. tons of other stuff as well..
The gauntlet has been thrown down by baldurk...
OpenGL2.0 is much much MUCH MUCH better while DX9.0 sucks some serious heap overflow...
OGL is crossplatform, it doesnt change much every new version, so old programs will compile ok with a new OGL, while the same cant be said for DX.
Imho OGL syntax is better, DX syntax exaple:
LPTHISHURTSMYEYESALOT->DoSomething();
The fact that OGL is only a graphics library, when developing a game you have far better freedom over which libraries you use for other things such as input, audio, etc, while with DX your basically usually stuch with dinput and dsound and whatever.
OGL is available on almost all languages, while DX is not really even available on C++, its only really available on Visual C++ (a microsoft product, who woulda guessed), althought it can be coaxed into running on other compilers, i have heard people saying that getting it to run on say borland C++ is a bitch (althought they might be just lost)...
And lastly, OpenGL has been around a long time, and thus it is stable, it wont ever disappear (fingers crossed), while if say M$ dies (fingers crossed it happens) then its bye bye DX as i doubt that it would continue to live without M$.
Did i mention that OpenGL is better than DX???
...The above views were expressed by Evil Void, he is dead now...
Oh yer, im fully aware that this may start a huge flamewar, but hey, we need to liven this board up.
davepermen
02-04-2003, 05:31 AM
but not with stupid flamewars.
both are great. if you don't understand one, then you're just plain stupid:D
baldurk
02-04-2003, 11:41 AM
OMG void, that was hilarious!
esp the LPTHISHURTSMYEYESALOT->DoSomething();
oh man, I haven't laughed like that since I was a little girl, thank you.
DarkLight
02-04-2003, 03:09 PM
OGL is available on almost all languages, while DX is not really even available on C++, its only really available on Visual C++ (a microsoft product, who woulda guessed), althought it can be coaxed into running on other compilers, i have heard people saying that getting it to run on say borland C++ is a bitch (althought they might be just lost)...
DirectX is also available on Delphi and Visual Basic... I don't tried at Delphi (but I have books about using DirectX in Delphi) but I have friends, who are writitng game with DirectX 7 and Visual Basic 6
But I prefer OpenGL
donBerto
02-04-2003, 03:21 PM
...doesn't make it suck less. DX sux. opengl rulez.
hehe but seriously - OpenGL is available freely, while DX is available on a term-basis [when you download the sdk it makes you 'sign' an agreement, i don't remember what it says...]
OpenGL: 2
Direct[su]X: 0
this is getting ugly :D
DarkLight
02-04-2003, 03:39 PM
My opinion for Direct X:
1. Very poor documented (as all Microsoft technologies)
2. The worst designed Windows API
3. Bugged
davepermen
02-04-2003, 03:59 PM
microsoft stuff is very well documented (even opengl, but those docs are very old as never got updated:D)
its the best api by far (understand com and you love it)
what bugs? it runs perfectly stable here, and very save. _and_ there are great debugging tools like a full debug-mode dx wich reports all stuff, great..
DarkLight
02-04-2003, 04:10 PM
Yes, I understand COM and I love it
But DirectX is harder to learn that OpenGL
There are Great games, made with DirectX of chource
But I prefer OpenGL - open-source, platform independented and with many tutorials existing on the web
DirectX is much more funcitonal that OpenGL - I admit. But I can agree that it is the best api. It is the worst api, but better is not developed.
donBerto
02-04-2003, 05:44 PM
COM SUX! the interface is flawed! m$ plays too much with pointers and in turn makes it vulnerable [i think it's the #1 cause of all their bugs].
microsoft stuff is very well documented
show us!
DirectX is much more funcitonal that OpenGL
what are you talking about?!? DX sux. sucking does _NOT_ mean it is more functional!
this thread is pumping blood in my veins! i'm starting gain some color - i was wondering why i was so pale...
:lol:
Id like to correct one thing i said, DX is available for not just C++, but maybe for like 3 languages in total... While OGL is available for almost all languages in existence...
BTW, daveperman, i hope you do realise that my post was 1/2 a joke... I may have listed all the OGL adcantages over DX, but at teh same time i also realise that DX has its own advantages over OGL..
donBerto
02-04-2003, 09:17 PM
as much as i like to joke...
I will admit one thing - DX [with it's huge financial support] will probably always show us the first in new techniques.
but OpenGL won't be far behind.
baldurk
02-05-2003, 12:45 PM
I'd say that DirectX will be first with the new techniques is because it doesn't have to pass them through a board. The ARB will always slow OpenGL down in my opinion
donBerto
02-05-2003, 01:34 PM
exactly. it's a shame, really - having multiple companies/organizations have board approval and other beaureaucratic delays... at the same time, I respect the individual companies/organizations protecting their intellectual property rights. I guess it's just one of those ethical dillema's that all of us in the end have to weather out.
davepermen
02-05-2003, 02:38 PM
msdn library, every function with extensive detail, different tutorials, sample code. a real sdk, sdk's from the vendors, etc.. tons of stuff..
com is great. and the pointer issue is a non-issue if you know what you do (you know, smart pointers.. all my dx objects are smart pointers, no bug at all possible anymore).
com runs in much more than 3 languages, it runs in about all windows languages, meaning, too, ports of languages to windows platform, say for example lisp, to bring in a quite .. strange?.. example.
com all the way. i hated them for a long time myself. once i finally understood them, i understand why microsoft uses them. they are really great, and make your stuff save. they actually save most pointers stuff. anyways, windows nt systems normally don't crash anyways if hw works. my one runs over weeks and weeks, while gaming and coding.. and surfing and ripping dvd's and listening online musik and downloading gigabytes, and and and..
if you know what you do, its all very simple. with knowing what you do i mean, you have to learn to teach c++ how it should work with com objects. once it understood you, they are as easy to use as int, float, or any inbuilt variable. pass by value etc. works without _ANY_ bug.
i use myself gl all the way. but dx showed me what save, simple and espencially, clean code actually is. gl isn't. still, i prefer gl myself, hehe. the bonus to be able to still use it iff i will have to move to linux? well.. a nice addon for me.
donBerto
02-05-2003, 05:49 PM
msdn library, every function with extensive detail, different tutorials, sample code. a real sdk, sdk's from the vendors, etc.. tons of stuff..
ok good job. maybe I should be more careful. m$' stuff is well documented, for the most part but I guess what I really meant is ease of navigation [through documentation]. and sensible examples that you don't have to download. msdn's documentation of MFC is a great example of the way you can easily* traverse through the documentation - but that's almost purely due to the nature of MFC. [[ for those that don't know about MFC, it's basically inheritance-oriented and you can just follow down the 'inheritance' lineage. ]]
a bad example about msdn is trying to find examples, you often [all the time?] have to download a sample program that includes too much code, when all you really need is the 'substance' of your query.
a GREAT example is sdl's documentation. I think that is the best all-around documentation model. examples are usually along with the same 'subjects' page.
...but I guess that's just my personal opinion/choice.
com is great. and the pointer issue is a non-issue if you know what you do (you know, smart pointers.. all my dx objects are smart pointers, no bug at all possible anymore).
I said it before and I'll say it again. COM SUX
let me take that back, the idea is noble. uniformity _usually_ leads to efficiency and COM certain does it. the issue isn't knowing pointers that makes it bad. it's the _knowing_ of pointers that make it vulnerable. i don't like the idea of being able to point to any object and then access that object via the pointing pointer [still with me?]
again, maybe that's just my opinion.
com runs in much more than 3 languages, it runs in about all windows languages, meaning, too, ports of languages to windows platform, say for example lisp, to bring in a quite .. strange?.. example.
a ha! that's why it sux - it's not cross-platform!
of course, it won't be cross-platform, it's not in their best interest for it to be cross-platform [or will they benefit...?] you can do all this cool com object stuff but if it's designed for a specific os then it sux. I'm thinking of activeX controls in some websites. of course, linux-users will not be able to use/display them [unless using crossover plugin?]... further adding to its suckiness.
like i said before, i think the idea of COM is great but using heavy use of pointers makes it vulnerable. almost pointless even [no pun intended, really]
donBerto, what you said is TOTALLY wrong. one of the major advatages of opengl is that it exposes new features MUCH quicker than DX. Why? because it does so through extentions... while DX has no extentions, and so the only way a new feature can be exposed is through the next release of DX, which can take up to a year... Now, extentions have their own problems of course, but everything has its price. For example, NVIDIA said that the NV30 has features that can be accessed ONLY through openGL extentions, and cant be accessed AT ALL through DX, well, until the next revision comes along.
BTW, not liking the COm interface because you have a dislike of pointers is naive. Pointers are probably the most powerful feature of languages which have them.
donBerto
02-05-2003, 11:25 PM
:nod: easy... easy... we're all friends in here... right?
I made no comments on OpenGL being at a disadvantage in releases [although somebody else may have]. the only thing I said was that DX would probably come out with better techniques faster than OpenGL would, and I'm basing that on the past releases of DX vs GL.
second, I know pointers are powerful. I imagine most of us use them almost every chance we can. i'm not saying it sux because it's powerful. and maybe I should clarify. I think it's abusive to write everything in pointers and I get the impression mainly in DX, not so much in COM.
I can be a bit passionate sometimes and may skew off-topic. but know that I mean not to insult anybody and if I did, I apologize.
davepermen
02-06-2003, 10:24 AM
ok good job. maybe I should be more careful. m$' stuff is well documented, for the most part but I guess what I really meant is ease of navigation [through documentation]. and sensible examples that you don't have to download. msdn's documentation of MFC is a great example of the way you can easily* traverse through the documentation - but that's almost purely due to the nature of MFC. [[ for those that don't know about MFC, it's basically inheritance-oriented and you can just follow down the 'inheritance' lineage. ]]
to browse documentation you simply use google, hehe:D
sdl doku is great, too..
let me take that back, the idea is noble. uniformity _usually_ leads to efficiency and COM certain does it. the issue isn't knowing pointers that makes it bad. it's the _knowing_ of pointers that make it vulnerable. i don't like the idea of being able to point to any object and then access that object via the pointing pointer [still with me?]
again, maybe that's just my opinion.
well.. whats the problem with it? when ever you do inheritance, you do the same. most the time when you use garbage collected languages, you use the same.
yes, you have a pointer to an object, but no, you cannot access the object through it. you have a pointer to the interface, nothing else.. (i think i had the opinion, i think, too.. dunno:D but its really a non-issue)
a ha! that's why it sux - it's not cross-platform!
of course, it won't be cross-platform, it's not in their best interest for it to be cross-platform [or will they benefit...?] you can do all this cool com object stuff but if it's designed for a specific os then it sux. I'm thinking of activeX controls in some websites. of course, linux-users will not be able to use/display them [unless using crossover plugin?]... further adding to its suckiness.
com is a binary standard. com objects can/could run as well on linux, on mac, or what ever. (compiled for mac, of course). they can even run over network connections etc, very handy. (so your pointer can possibly be to a network object of windows, wich communicates with a mac, wich has itself a com object serving, wich runs the actual functions..
and there is support on other platforms. as far as i know.. and the idea of com objects does not force you to microsoft at all.. as you said, a nobel idea. noble to use everywhere..
actually, espencially for dynamic loading its great. you only need to load one function pointer, say for d3d. the one that creates the main object. and thats it.
com made windows rather save and stable actually. vulnerable? who wants to vulnerate dx? and gl is as vulnerable. easy, not?
anyways, sure its opinion as well. but once you learned something to know, you know its not as bad as people say.
ale_socc
02-14-2003, 10:10 AM
One good thing about DirectX (in my opinion) is that it offers all the tools necessary to make a complete game with any external APIs. It has DirectSound, DirectInput, DirectPlay, Direct3D, etc.... I think this fact makes me consider DirectX more.
Barbokp69
02-14-2003, 10:12 AM
One thing I think DirectX has the advantage is the fact that DirectX was designed specifically for games as opposed to OpenGL where it was designed for graphics in general. Therefore, you may see that games are highly optimized in DirectX.
baldurk
02-14-2003, 11:19 AM
I don't agree with that. Although OpenGL is used more for SGI workstations etc. I wouldn't say that it is less optimal for games than DirectX. It all depends on the code. Look at half-life.
donBerto
02-14-2003, 11:29 AM
I don't agree either - I said this in another thread, i'll say it here:
DirectX is not optimized for games, although it is for Microsoft OSes.
on a more serious note, why would you think it was? could you provide examples as to why you think so?
cheers.
davepermen
02-15-2003, 05:20 AM
dx is optimized for games. that means it only has features useful for games. it can't be faster, because all it does is telling hw to do something, the same gl does as well.
but using dx in code is optimal for developing games. code is short, clean and simple, and provides exactly the functions and objects useable for gamedev. we can argue about that, but its at least what microsoft tries, and they get rather good in it, imho.
gl is a "painting" api. well, it was. but (game-)hw vendors built more and more extensions into it, not for painting, but specifically for game-effects. they don't follow the actual gl design structure at all, and invent stuff gl was never designed to have it. makes gl essencially a gamedev api as well.
vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.