OpenGL or Direct X?
What is the difference between opengl and directx?
i know they are both used to make 3D and all, but which one is better?
in directx there''s directdraw, direct3d which i assume can be done in opengl, and there''s directplay and directsound, which i''m not sure at all in opengl
Is there things that one can do and the other cannot?
Which is simplier?
Which one should i use for a 2d rpg game, and which one for a 3d shooter game?
woo! thanks for your time
-ErayMan
Direct3d "in" opengl? What are you talking about? Opengl is a lot easier than direct3d, but direct3d seems to handle hardware features a bit better. So, learn both
, oh and directx has directdraw for 2d, directplay for networking, direct input for, well, input, and direct3d for 3d. So, you can use directplay and directinput, but OGL in place of direct3d.
-~-The Cow of Darkness-~-

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
That''s really a matter of opinion. OpenGL is designed to be hardware independent, so you could easily port from windows to mac to Xwindows, while DirectX is locked into a windows platform. That has no real bearing for most people though (like myself). It really just comes down to which one you''re most comfortable with using. I can''t really speak for DirectX since I''ve only had a brief look at it, but from what I''ve heard the syntax of OpenGL is on a lower level. That makes OpenGL more flexable, but harder for some to work with.
As for sound issues, there''s a compainion to OpenGL called OpenAL (there''s also OpenIL for input). I could be wrong, but I believe these extensions are locked into the windows platform.
As for sound issues, there''s a compainion to OpenGL called OpenAL (there''s also OpenIL for input). I could be wrong, but I believe these extensions are locked into the windows platform.
OK, instead of closing this (OGL vs. D3D threads are pretty much against the forum rules), I feel the need to clear a few things up, that people seem to be confused about.
DirectX is a collection of APIs. One of those APIs happen to be a 3D graphics API: Direct3D. OpenGL, one the other hand, is a pure graphics API (OpenGraphicsLibrary). It cannot be compared to DirectX, only to Direct3D.
OpenGL has a set of helper APIs that emerged over time. OpenAL is about sound and music, OpenNL (now NawkNL) is about networking, etc. All those APIs are 100% portable, and comparable to their DirectX counterparts.
Any combination of the above APIs are possible: you can eg. use OpenGL for graphics, and OpenAL and co. for the rest. That way, your program stays portable. Or, you can use OpenGL for graphics, and DirectInput/Sound/etc for the rest. No problem. You can also use Direct3D for graphics, but OpenAL for sound. All those are independent sub-modules, and can be combined in various ways. But note, that you can''t use OpenGL and Direct3D at the same time. Nor DirectSound/Music and OpenAL.
The differences between OpenGL and Direct3D are almost pure semantics, nowadays. The noteable exceptions are few:
* OpenGL is portable, DirectX is Windows only. Your choice. If you only develop for Windows, this doesn''t matter.
* OpenGL can typically support new hardware features a lot earlier than D3D (extension mechanism). If you get a new 3D chip, you typically have to wait until the next DX release, before you can fully exploit it''s new features under Direct3D. Under OpenGL, you can do it right now (as soon as the extension is available). The downside is, that you will have to write different codepaths for different vendors, as extensions often differ.
* "direct3d seems to handle hardware features a bit better". That statement is not true. For established features, handling is pretty much the same (not the API dictates the limits, but the hardware does). For new features, OpenGL has an advance (see above).
All in all, it''s 99% preference and personal taste, and 1% technical considerations. Unless you want to be portable (eg. develop for Linux or Mac), in this case DirectX is ruled out.
For more information, you should take a look at the article.
DirectX is a collection of APIs. One of those APIs happen to be a 3D graphics API: Direct3D. OpenGL, one the other hand, is a pure graphics API (OpenGraphicsLibrary). It cannot be compared to DirectX, only to Direct3D.
OpenGL has a set of helper APIs that emerged over time. OpenAL is about sound and music, OpenNL (now NawkNL) is about networking, etc. All those APIs are 100% portable, and comparable to their DirectX counterparts.
Any combination of the above APIs are possible: you can eg. use OpenGL for graphics, and OpenAL and co. for the rest. That way, your program stays portable. Or, you can use OpenGL for graphics, and DirectInput/Sound/etc for the rest. No problem. You can also use Direct3D for graphics, but OpenAL for sound. All those are independent sub-modules, and can be combined in various ways. But note, that you can''t use OpenGL and Direct3D at the same time. Nor DirectSound/Music and OpenAL.
The differences between OpenGL and Direct3D are almost pure semantics, nowadays. The noteable exceptions are few:
* OpenGL is portable, DirectX is Windows only. Your choice. If you only develop for Windows, this doesn''t matter.
* OpenGL can typically support new hardware features a lot earlier than D3D (extension mechanism). If you get a new 3D chip, you typically have to wait until the next DX release, before you can fully exploit it''s new features under Direct3D. Under OpenGL, you can do it right now (as soon as the extension is available). The downside is, that you will have to write different codepaths for different vendors, as extensions often differ.
* "direct3d seems to handle hardware features a bit better". That statement is not true. For established features, handling is pretty much the same (not the API dictates the limits, but the hardware does). For new features, OpenGL has an advance (see above).
All in all, it''s 99% preference and personal taste, and 1% technical considerations. Unless you want to be portable (eg. develop for Linux or Mac), in this case DirectX is ruled out.
For more information, you should take a look at the article.
Is a good idea to think that OpenGL is better if later you want to program on hardware like playstation 2 or GameCube ?
quote:
Is a good idea to think that OpenGL is better if later you want to program on hardware like playstation 2 or GameCube ?
Definitely, yes. Although the PS2 uses a totally proprietary lowlevel API, an OpenGL implementation is available to developers. The GC uses an API that is not OpenGL strictly speaking, but very similar.
But keep in mind, that XBox is DirectX.
[edited by - Yann L on March 11, 2003 2:46:22 AM]
What answers did you really expect to get, when posting it in an OpenGL forum?

well hehe good point
Thanks all for your help, i guess i''ll do as cowsarenotevil suggest, and learn both of them hehe
btw, sorry ''bout this topic, i didn''t know it was forbidden, eh, i''ll be more careful
''Nice day,
-ErayMan

Thanks all for your help, i guess i''ll do as cowsarenotevil suggest, and learn both of them hehe
btw, sorry ''bout this topic, i didn''t know it was forbidden, eh, i''ll be more careful
''Nice day,
-ErayMan
quote:
Original post by ErayMan
btw, sorry ''bout this topic, i didn''t know it was forbidden, eh, i''ll be more careful
Read the faq

quote:
Original post by James Trotter
What answers did you really expect to get, when posting it in an OpenGL forum?
LOL

PM
times change
Excuse my poor english!
PM Times change...
Excuse my poor english!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement