OpenGL and directx relationship

Can somebody explain me why do the games (popular games) that use OpenGL require Directx drivers. I thought that Direct3d is part od directx and that is natural for direct3d games to use directx. But why do some opengl games do that? What is opengl and directx relationship.

This is very important to me be cause i plan to start learning opengl but i am so confused.
Thank you very much!!!

Those games are using DirectSound because OpenGL doesn’t support rendering of sound
( OpenAL does )

And OpenGL uses DirectDraw when used with windows…

In my point of view, games that use openGL (like Quake 3 for example) need DirectX for DirectInput, DirectSound, DirectPlay or even DirectDraw (for changing the resolution at the beginning). If u check the quake 3 console in the menu just after launch, u’ll see the DirectInput and DirectSound initialization. But if you don’t want to use it, you can use OpenAL for sound, socket fo network …

Arath

Also using and directx component limits your application to windows platforms.
OpenAL is a good alternative for sound

OpenGL uses DirectDraw in Windows? That’s news to me.

Not to sound argumentative or anything, but if OpenGL used DirectDraw in Windows, it would be limited to the performance of DirectDraw - an OpenGL application could never get the same performance as a DirectX application. On nVidia cards at least, OpenGL can be faster than DirectX with the use of VAR and other extensions. Which seems to indicate that OpenGL has nothing to do with DirectDraw.

Or maybe I’m wrong…

j

j:

I said that it uses DirectDraw, NOT Direct3D

Try to debug an OpenGL program and you’ll see in the debugger that DDRAW.DLL is loaded…

Originally posted by richardve:
[b]j:

I said that it uses DirectDraw, NOT Direct3D

Try to debug an OpenGL program and you’ll see in the debugger that DDRAW.DLL is loaded…

[/b]

yes…
this is correct …

But if the main advantage of opengl over direct3d is portability then it’s seams ridicilous to use directx-opengl combination. It’s paradox. Somebody said that there is openal, socket and other things that are also portable. Why doesn’t any serious game developer use such things rather than directx.

But if the main advantage of opengl over direct3d is portability then it’s seams ridicilous to use directx-opengl combination. It’s paradox. Somebody said that there is openal, socket and other things that are also portable. Why doesn’t any serious game developer use such things rather than directx.

If you haven’t figured it out yet, most serious game developers don’t use OpenGL. Quite a few of them do, but the majority do not. And most of the ones that do uses OpenGL provide for a Direct3D option as well.

Honestly, most professional game developers don’t really care about portibility. They don’t use OpenGL because it will let them run virtually the same code on a Windows machine as a Sun Workstation. Those who use OpenGL either use it because they like OpenGL’s interface, they hate Microsoft, they hate the D3D interface, or because they aren’t working on a Windows machine.

Those who do develop OpenGL games on Windows platforms use the rest of DirectX because… well, why not? It does an excellent job of supporting old hardware, it has a reasonably decent interface, and it gets updated regularily to support new features (without going through a tedious, bureaucratic process or implementation specific extensions).

Try to debug an OpenGL program and you’ll see in the debugger that DDRAW.DLL is loaded…

I stand corrected.

j

But why serious game developers use direct3d instead of opengl? What are they motive, if all of you said that opengl is much better than direct3d?
Sorry for posting questions about direct3d on opengl forum but i just want to find out some things. )

Most commercial games are developed for Windows exclusively. This is sad but true. So why not use DirectX for 3D Graphics? I think that many programmers would like to use things like OpenGL or OpenAL, but the marketing gurus tell them to use DirectX because it is the standard. I saw a thread on this board about this. DirectX is best-known and accepted amoung the gaming-people. Many of them are addicted to MS and don’t like to care about a different (and in my opinion better) API like OpenGL.

Take care
CoBour

That most game developers use Direct3D may be true, thats why the majority of the games out there are CRA*.

Those who do use OpenGL are the ones with the best talent and the best insight, therefore produce the best games. Coders with alot of experience usually favors OpenGL.

As for those who use D3D and doesn’t care about other platforms, they do have a point. 90% of the market is PC/Windows based, and therefore the effort pays well enough to use only Windows as platform.

The sad truth is that alot of the good programmers have been payed by M$ to use D3D in their games. Its a good marketing strategy, but I think its a close call to bribery.

I may be cynical, but I’d agree with Hull. I think a lot of the reason DirectX is popular is Microsoft’s marketing dept. Unfortunately for us, Microsoft does make good products. They just want to have every product as their own.

Although I use g++ a lot, Visual C++ is a great product that most of us here use. I just don’t like its many non-ISO/ANSI quirks. Soon we’ll have .NET, Microsoft’s answer to a Java Virtual Machine. Time will tell how good it is (from what I’ve read I don’t like the looks of it). Microsoft brought out Visual J++ in response to Java - another non-standard product. I would have liked to see Fahrenheit but Microsoft sank that one (I think because DX was so popular they didn’t need it).

The bottom line is that if Microsoft wants a product to be successful, it usually is. And they want DirectX to be more successful than OpenGL. I believe that if OpenGL wasn’t used in the workstation market so much (where DX doesn’t exist), it wouldn’t be supported at all anymore by Microsoft. I also think that if OpenGL was a Windows only API, it would receive much better support from Microsoft (and maybe DX wouldn’t exist at all).

Of course, all this is just my bigoted opinion I don’t want to start a flame war

[This message has been edited by ffish (edited 05-01-2001).]

Although OpenGL may use DirectDraw on Windows platforms internally, you can write OpenGL programs without any calls to DX in your program. You can even use third party window abstraction libraries that should make your program run completely portably on several platforms.

If all you want to do is learn OpenGL, I’d say go for it. It’s great fun and possibly easier than DirectX and you don’t ever have to learn DirectX if you don’t want to (I promise ) There are lots of great developers on this board that use OpenGL who are always providing answers to your questions. Anyway, if it’s good enough for Carmack, it’s good enough for me

Good luck!

[This message has been edited by ffish (edited 05-01-2001).]

One quirk I’ve heard about Visual J++ was that it supported the Java standard better than Sun’s own virtual machine.

Originally posted by Korval:
One quirk I’ve heard about Visual J++ was that it supported the Java standard better than Sun’s own virtual machine.

Well, it support some M$ defined “java extensions” too that are windows specific, but that simply destroys the whole idea of java in the first place.
Common M$ behaviour, take a industry standard and make it “better” … so as soon some less skilled developers start using it the standard is destroyed and people are getting forced to use windows …

> That most game developers use Direct3D may
> be true, thats why the majority of the
> games out there are CRA*.

Ummm… no.

The rendering API you use may affect performance, and the elegance of your code, but not your overall game design and playability. Typically, those aren’t even developed/tuned by the same people as the core graphics.

The reason Direct3D is more popular is that EVERY graphics card on Windows has reasonably optimized Direct3D drivers (partly because MS does half of the job). Unfortunately, your run-of-the-mill SIS or S3 or i810 chip (or even ATI in the past) might not have as well optimized OpenGL drivers.

Now, the reason I like OpenGL is that IF you do the driver right, you can make it run faster than Direct3D. This probably has something to do with the fact that SGI started figuring these things out about 20 years ago, whereas Microsoft started six or seven years ago – and the very fact that Microsoft does half of the job for a typical D3D card driver. You simply can’t get the ultimate efficiency with the current MS model (though they’re getting closer for each rev).