OpenGL 2.0 vs. DirectX 9.0

E05263ec846eb85da803f56e2917962d
0
Noor 101 Jan 31, 2003 at 21:28

What are the differences between OpenGL 2.0 and DirectX 9.0
What are the disadvanteges and advantages of both APIs?

27 Replies

Please log in or register to post a reply.

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Jan 31, 2003 at 21:32

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

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 03, 2003 at 13:21

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..

D491261d0cdbea6f1f04129ba87f4d09
0
void 101 Feb 04, 2003 at 11:01

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…

D491261d0cdbea6f1f04129ba87f4d09
0
void 101 Feb 04, 2003 at 11:04

Oh yer, im fully aware that this may start a huge flamewar, but hey, we need to liven this board up.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 04, 2003 at 12:31

but not with stupid flamewars.

both are great. if you don’t understand one, then you’re just plain stupid:D

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 04, 2003 at 18:41

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.

49921baa7439fb1e91e02caf0a925cfe
0
DarkLight 101 Feb 04, 2003 at 22:09

@void

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

C24eb7e6aaefba78b94c831ddc7b4d0b
0
donBerto 101 Feb 04, 2003 at 22:21

…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

49921baa7439fb1e91e02caf0a925cfe
0
DarkLight 101 Feb 04, 2003 at 22:39

My opinion for Direct X:
1. Very poor documented (as all Microsoft technologies)
2. The worst designed Windows API
3. Bugged

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 04, 2003 at 22:59

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..

49921baa7439fb1e91e02caf0a925cfe
0
DarkLight 101 Feb 04, 2003 at 23:10

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.

C24eb7e6aaefba78b94c831ddc7b4d0b
0
donBerto 101 Feb 05, 2003 at 00:44

COM SUX! the interface is flawed! m$ plays too much with pointers and in turn makes it vulnerable .

@davepermen

microsoft stuff is very well documented

show us!
@DarkLight

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:

D491261d0cdbea6f1f04129ba87f4d09
0
void 101 Feb 05, 2003 at 03:19

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..

C24eb7e6aaefba78b94c831ddc7b4d0b
0
donBerto 101 Feb 05, 2003 at 04:17

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.

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 05, 2003 at 19:45

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

C24eb7e6aaefba78b94c831ddc7b4d0b
0
donBerto 101 Feb 05, 2003 at 20:34

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.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 05, 2003 at 21:38

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.

C24eb7e6aaefba78b94c831ddc7b4d0b
0
donBerto 101 Feb 06, 2003 at 00:49

@davepermen

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.
@davepermen

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.
@davepermen

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]

D491261d0cdbea6f1f04129ba87f4d09
0
void 101 Feb 06, 2003 at 06:00

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.

D491261d0cdbea6f1f04129ba87f4d09
0
void 101 Feb 06, 2003 at 06:13

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.

C24eb7e6aaefba78b94c831ddc7b4d0b
0
donBerto 101 Feb 06, 2003 at 06:25

: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.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 06, 2003 at 17:24

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.

6eea91fd69bf4d6a6f7c5586cd77b7b7
0
ale_socc 101 Feb 14, 2003 at 17:10

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.

28309d7779e8eaa5c670a48e8f47b4b7
0
Barbokp69 101 Feb 14, 2003 at 17:12

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.

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 14, 2003 at 18:19

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.

C24eb7e6aaefba78b94c831ddc7b4d0b
0
donBerto 101 Feb 14, 2003 at 18:29

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.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 15, 2003 at 12:20

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.