I've search what through the forum and found a lot of post about directx and OpenGL but not one with the exact difference between them.

My question: What are the difference between the to libraries?
Posted on 2004-12-31 08:09:49 by Bolle
i was wondering the same question...
but no 1 answered you... :(

no one can help us ?
Posted on 2005-01-02 21:15:54 by GR33d
In practical terms - not much :)
Posted on 2005-01-02 22:07:25 by Homer
not much? but which is quicker, better etc? i mean i see some game using opengl and some directx why choose one ? why not go for the easiest
?
Posted on 2005-01-03 06:53:39 by Bolle
I also dont know the difference but i also have no experience with neither of them.
Fromout my gamer point of view i can say that in my eye's in most games settings on OpenGL will result in the best graphics but i dont know if this is becouse of OpenGL is better or that it's just coded that way.
Posted on 2005-01-03 07:59:44 by Scorpie
form my experience i find opengl to be 1% faster, but just an average value got from FPS calculation.

opengl is easier for beginners IMHO, since you don't have to play with objects, but instead just call its functions like winapi's (simply: "call functionname, param1, param2" etc.). ...well you CAN use the same calling technique in DX (after you get methods' addresses you can normallly 'call' them), but that's even more complicated stuff for a beginner i think :P

so: i recommend playing with opengl first. then -if you like- you can use some directx to find out which is better for you.

good luck :)
Posted on 2005-01-04 00:00:09 by ti_mo_n
I'd agree with that :)
OpenGL is definitely easier at first glance, especially due to it not being object-oriented.

Faster? Well, that really depends on both the gpu you are using and the driver you are using... I don't think there's much between them at the base level both are simply hardware abstraction layers.
Posted on 2005-01-05 05:20:54 by Homer
well i have been using directx for a while now so i'll stick to that if there isn't a real big difference
Posted on 2005-01-05 05:24:35 by Bolle
I started out with DirectX because I had heard rumours it was harder , closer to the bone, etc. I figured that if it was closer to the hardware that it was for me. It turned out not to be true :)

If you are comfortable with DirectX and can happily use one of the standard oop helper modules to give you a means to call methods, then by all means stick to it.

If you get tripped up by the oop aspect of DX and you can't seem to find any help out there, OpenGL is certainly worth a look - its purely a bunch of user-callable procedures.
Posted on 2005-01-05 07:31:05 by Homer
Yes that is exactly what i heard, that directx is better because it directly talks to the hardware and OpenGL not, but that isn't the case i presume.

but still, if OpenGL is quicker and easier why do people use directx?
Posted on 2005-01-05 08:32:44 by Bolle
i really don't think it's faster. that 1% i mentioned earlier was on RIVA TNT2 (with some old nvidia detonators). the test was calculating average fps from same rendering (first using ogl, then another ine using DX)

Faster? Well, that really depends on both the gpu you are using and the driver you are using... I don't think there's much between them at the base level both are simply hardware abstraction layers.


i, too, doubt that any of them is faster significantly...? i think that it mostly depends on the gfx-engine code itself, then on the drivers used.

opengl is easier for beginners - that's its main '+' :)

it's also more portable (?) i heard, but i'm not certain of that, since my only coding experience is on win32 platform.
Posted on 2005-01-05 08:44:15 by ti_mo_n
Well yes - OpenGL itself is cross platform, but that only means that the same functions have the same names and do the same things on say a Mac as they do on a PC.. you'll still need to port all the MAIN part of your application (anything that uses os-dependant api for example) , reformat your source for some new compiler for some new platform, then rebuild your binary... how portable does it sound now?

Unless it provides ALL THE IO stuff like keyboard, audio, reading joysticks and other controllers, right down to basic api for things like sprintf, it's just a shiny building block.
Posted on 2005-01-05 10:17:57 by Homer