Thread: Open GL v.s Direct X

  1. #1
    Programmer Frantic-'s Avatar
    Join Date
    Dec 2004
    Posts
    114

    Open GL v.s Direct X

    Ok, im going to be putting about $100 into some good books on either Open GL or Direct X. I want to get into game programming. Which (open gl or direct x) will work west for making games?

    Is one better for applications, and the other for games?

    Is one better for FPS and 3d games and the other for 2d games?

    Is one more supported and the other less?

    Any help would be greatly appreciated.

  2. #2
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656
    I will try my best, here we go! *scary face*

    Which (open gl or direct x) will work west for making games? If you're on Linux OpenGL, DirectX for Windows

    Is one better for applications, and the other for games? Both are used directly for gaming mostly I believe. Both are equal in gaming goodiness.

    Is one better for FPS and 3d games and the other for 2d games? I believe they're both equal on 3D/2D

    Is one more supported and the other less? Linux only supports OpenGL *. Windows supports DirectX and OpenGL

    * = I'm sure there are some tricks, but exclusively, I believe not.

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    In my experience, OpenGL has an easier interface (especially when using glut) that can get you started quickly. DX can be a bit tricky but once you get the hang of it it's good. DX also has more buildt in functionality, like image loaders n stuff. Note that OpenGL is just graphics while DX is graphics, user input, network, sound, music, video and more.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Neither one is better unless you are programming for a platform other than windows (in which case openGL is the winner).

    Let's put it this way: The two best games (graphically speaking) out today are Doom3 and Halflife 2. Doom3 was created with OpenGL, and Halflife2 was created with Direct3D. Both libraries can create cutting edge stuff, so you are not missing out on anything when you choose one over the other.

  5. #5
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    well, directX does have the advantage of being more than just a graphics library. It has sound , network etc. built in. but yes, openGL is portable.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    * = I'm sure there are some tricks, but exclusively, I believe not.
    There's WineX, which is a DirectX implementation for Linux, but I believe it's commercial.

    OpenGL's pendant is really Direct3D/DirectDraw. DirectSound/DirectMusic finds its pendant in OpenAL perhaps, or the audio capabilities of the SDL. DirectInput has the input capabilities of SDL as equivalent. DirectPlay has no direct match, but then, I think DirectPlay sucks anyway I wish Blizzard would publish their Net Play libraries.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    And here is my tip, search! This question has been debated countless times!

  8. #8
    Banal internet user
    Join Date
    Aug 2002
    Posts
    1,380
    Most DirectX vs OpenGL arguments are outdated. The later generations of both APIs have significantly improved and I haven't yet found a thorough comparison of them.

    Some modern games use a hybrid of DirectX and OpenGL. I suggest you learn both.
    Last edited by BMJ; 01-28-2005 at 10:17 AM.

  9. #9
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quake3, for example, uses OpenGL for graphics, but on Windows it also uses DirectInput and DirectSound.

    I agree with BMJ. Learn both, then specialize on the one you like more. The hard part of 3D programming is in the principles anyway, not in the names of the functions.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  10. #10
    Programmer Frantic-'s Avatar
    Join Date
    Dec 2004
    Posts
    114
    it seems to me that if i learn open gl, ill probably be wanting to also learn direct x for the sound, networking ect.

    If i learn direct x, i will have almost everything I will need.

    Ill start out with direct x. Thanks for the help guys.

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    it seems to me that if i learn open gl, ill probably be wanting to also learn direct x for the sound, networking ect.
    But you don't learn "DirectX". You learn COM, which DirectX is founded on, and then you learn those components of DirectX you need. And whether you learn Direct3D or OpenGL shouldn't make too much of a difference.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #12
    Programmer Frantic-'s Avatar
    Join Date
    Dec 2004
    Posts
    114
    i think ive found a good book to use.

    http://glbook.gamedev.net/oglgp.asp

    any other suggestions for books?

  13. #13
    Registered User Scribbler's Avatar
    Join Date
    Sep 2004
    Location
    Aurora CO
    Posts
    266
    Quote Originally Posted by Frantic-
    it seems to me that if i learn open gl, ill probably be wanting to also learn direct x for the sound, networking ect.
    There is also OpenAL for sound.

    Additionally, DirectX is also proprietary, intellectual property of Microsoft. With OpenGL, you have the ability to modify the libraries to your particular needs if current libraries like glut, SDL, and many others to choose from, don't provide exactly what you need (which would be a very rare case indeed).

  14. #14
    Registered User
    Join Date
    Jan 2005
    Posts
    8
    Quote Originally Posted by bithub
    Neither one is better unless you are programming for a platform other than windows (in which case openGL is the winner).

    Let's put it this way: The two best games (graphically speaking) out today are Doom3 and Halflife 2. Doom3 was created with OpenGL, and Halflife2 was created with Direct3D. Both libraries can create cutting edge stuff, so you are not missing out on anything when you choose one over the other.


    I agree 100% with you. It all depends on opinion. Like chocolate and vanilla. Either are good but you have to choose.

    P.S. which had the feature where if you hit wood a splinter appears, and when you shoot metal it acually makes a 3d dent, etc.?

  15. #15
    Programmer Frantic-'s Avatar
    Join Date
    Dec 2004
    Posts
    114
    i have no idea, infact i dont know if ur even joking or what.

    But since opengl is for graphics more than anything (or so i think) id say its opengl.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Open GL
    By alexnb185 in forum Game Programming
    Replies: 4
    Last Post: 08-18-2007, 11:52 AM
  2. open gl
    By super_monkey in forum Game Programming
    Replies: 8
    Last Post: 10-20-2001, 05:22 PM
  3. Ghost in the CD Drive
    By Natase in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 10-12-2001, 05:38 PM
  4. open GL
    By super_monkey in forum Game Programming
    Replies: 2
    Last Post: 10-10-2001, 08:31 PM
  5. Direct x, open gl, but wait....what if...whoa, read this!
    By Leeman_s in forum Game Programming
    Replies: 2
    Last Post: 10-08-2001, 03:37 PM