DX or OpenGL?

This is a discussion on DX or OpenGL? within the Game Programming forums, part of the General Programming Boards category; So, I want to eventually learn a graphics API, and I was wondering if I should learn OpenGL or DX? ...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    57

    DX or OpenGL?

    So, I want to eventually learn a graphics API, and I was wondering if I should learn OpenGL or DX?
    What are the pros and cons of each API?
    I know DX supports more than just graphics. But on one forum I'm on, they think that DX is the crappiest API there is, and the Microsoft should die for making it.

    And how would coding with each API be?

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    You could try a search: google.ca/search?q=directx+opengl
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    You could also try a board search, and find things like this or this or this.
    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

  4. #4
    Registered User
    Join Date
    Nov 2007
    Posts
    57
    You forum people and your searching... :P
    Anyways, thanks for the links.

    I'll probably end up using OpenGL with a combination the SDL or OpenAL.

  5. #5
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    1. Microsoft didn't originally make it
    2. OpenGL because it's portable. [1]

    Consider reading http://en.wikipedia.org/wiki/Direct3D_vs._OpenGL

    [1] I'd rather not have someone tell me off about, "omgz DirectX runzezez on my 1337 xbox".
    Last edited by zacs7; 01-02-2008 at 01:56 AM.

  6. #6
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Quote Originally Posted by michaelp View Post
    But on one forum I'm on, they think that DX is the crappiest API there is, and the Microsoft should die for making it.

    A lot of people think a lot of things, that being one of the sillier things to think. A lot of great things have been made in both APIs, OpenGL has the benifit of being able to be ported to every OS, and there's a great book on the subject, "The Complete OpenGL programming Guide" (aka "The Red Book"). It's nice and not too difficult if you accompany it with a multi-platform windowing/sound API like GLFW, SDL, or wxWidgets.
    Last edited by CornedBee; 01-02-2008 at 09:26 AM.

  7. #7
    Registered User
    Join Date
    Nov 2007
    Posts
    57
    :P
    Starting to lean toward DX a little for a couple of reasons now:

    1. I use Windows and don't plan on changing that anytime soon.
    2. Most people don't buy a Mac or get Linux to play games. :P
    3. Most games are coded using DX.
    4. The API can't be as bad as those people think. I hope.
    5. It's more than just a GFX API.

    So, I will probably try and use DX for those reasons. Just need to find the SDK and latest version for XP now.

  8. #8
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Only 1 of your reasons seem to be for what you need. The rest have no effect on your decision.

    Whether or not people use max or linux to buy/play games is not effected by the multiplatform nature of OpenGL. if you make a program for windows, you can very well use it exclusively on windows, someone else who may want it on mac could compile/code it for mac. It's open source friendly in that regard.

    Also most people don't buy mac or linux to play games, but these are GRAPHICS APIs, not Game Development Frameworks. They can be used to make a wide variety of graphics applications, from 2D CAD, to 3D modeling, to image manipulation programs, etc etc. People do buy Macs for that.

    Just make informed decisions, not ones based on other people's opinions.

  9. #9
    Registered User
    Join Date
    Nov 2007
    Posts
    57
    Still, I don't plan on making applications with C++. More games. Still planning to go for DX, even though you proved most of my points wrong.

    Anyone know a tutorial that shows how to set up DX 9.0c for XP? (That is the latest version for XP, right?)

  10. #10
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I'd rethink the "not use C++" - nearly all modern games use C++ because it's a very efficient language for making games.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  11. #11
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    You're using C#?

  12. #12
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,985
    I can think of another argument for DirectX. At least it's my opinion, everyone might not agree, but since DX is privately owned, it means that, unlike OpenGL, the API develops very quickly. If DX was an open standard, it would be at version 2.0 now (like OpenGL!) or even less.
    In the near future, DirectX might just surpass OpenGL in functionality.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #13
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    If it were fully open source that may not be the case, it's not unusually common for closed applications to be as updated as DirectX, but since, as it was addressed, MS licences their technology for commercial use, they have to keep it updated and supported. One thing I like about MS, even with their express editions of their software they provide a lot of support and resources.

    And OpenGL is a bit of an ugly bastad, but It's my ugly bastard.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,985
    The point is, due to Microsoft owning DirectX, it's updated frequently and fast. But OpenGL, not being owned, like C++, progress in the API goes verrrrrrrrrrrrrrrrrrrrry slowly.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Registered User
    Join Date
    Nov 2007
    Posts
    57
    Quote Originally Posted by matsp View Post
    I'd rethink the "not use C++" - nearly all modern games use C++ because it's a very efficient language for making games.

    --
    Mats
    lol, whoops. I meant to type OpenGL, not C++. :P

    One bad thing about it being constantly updated is now the newest version is only available for Vista. Oh well. :P

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM
  2. About DX and OpenGL
    By Lurker in forum Game Programming
    Replies: 9
    Last Post: 07-07-2003, 10:22 PM
  3. A question for those that know opengl and DX
    By EvBladeRunnervE in forum Game Programming
    Replies: 8
    Last Post: 03-07-2003, 02:01 AM
  4. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  5. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 06:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21