Thread: OpenGL or DirectX ??

  1. #16
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    I started using OpenGL but I have to admit the procedural nature of the API bugs me, being a heavy OOP person. While it's easy enough to find the functions you need, since they are all named accurately to what they do, the convoluted state machine that you end up having to manipulate is difficult to reference for me. I started XNA recently and like the approach it gives, I may move to DirectX hopefully without too much effort. Personally I don't mind it not being portable though I've played some great games that are done in OpenGL.

    The main difference is if you need tools that do something like load textures, load 3d models, in OpenGL you merely need to find a library that does it and include it in your project. Most of that "basic" functionality as far as gaming goes is already implemented. I think that's what Elysia means by more evolved, it just has more tools that one would need when using a 3D programming framework.

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Evolves means that it has more functionality. Look at the release date of DX11 vs OpenGL Next-gen.
    Functionality is added and the API is refined more often than OpenGL.
    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.

  3. #18
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    > Look at the release date of DX11 vs OpenGL Next-gen.
    And does it run on my platform of choice? No. That makes it 100% useless to me.

    OpenGL is not supposed to be a rival to DX at all. It does however provide similar functionality as D3D. If you want some big-ass toolkit with sound, networking, etc and OpenGL as a renderer they do exist.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Does it run on the platform of my choice? Yes
    Anyway, it is not supposed to be a rival, but I like faster evolving APIs.
    But pick the API you think if best with the facts provided. That probably is a good answer.
    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.

  5. #20
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    OpenGL on XP and Vista is implimented using DirectX calls. So realistically it doesnt matter which one you use, the are both nearly equal in speed. OpenGL does have the advantage of being (more) multi-platform than DirectX, although that is changing as more platforms support DirectX.

  6. #21
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by abachler View Post
    OpenGL on XP and Vista is implimented using DirectX calls.
    The Vista built-in OpenGL is, but that one is useless anyway, since it's completely outdated. (OpenGL 1.1 or something like that.)

    The hardware vendor OpenGL is not. ATI and nVidia supply their own OpenGL implementations.
    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. #22
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Using OpenGL or Direct3D is a moot point. Pick your poison and move on. If you have no clue about 2D/3D graphics fundamentals then you will be equally as stuck in both APIs. And since you are asking this very simple question that can only be decided when/if you understand what each API brings to the table I would say you are not ready to make the call yet.

    Read some books about graphics. Some of them use OGL and some use D3D. Some of them do not use any API. My favorite books are books that concentrate on concept rather than implementation. I would rather read an entire graphics book with very little source code than some hard-coded tutorial that you run through in the book. Most books have gotten away from piling on reams of source code and instead have a website or CD that comes with the book that contains the source.

    You will need to check multiple sources before coming close to being able to create a game. Remember in English when your professor said you need at least 10 to 15 sources for your paper? No different here. You will need many sources to get the information you need. One book may say a certain topic is beyond the scope of the book while others may dive into it headfirst. Do some research, for goodness sake get some code working, and then wash, rinse, and repeat about a million times.
    Last edited by VirtualAce; 01-03-2009 at 10:51 AM.

  8. #23
    Or working on it anyways mramazing's Avatar
    Join Date
    Dec 2005
    Location
    Lehi, UT
    Posts
    121
    Quote Originally Posted by Elysia View Post
    DirectX. I cannot stand slow-evolving APIs that are falling behind time
    Besides, it also has APIs for other things than just graphics - input, sound (or was this deprecated?), etc.
    To be fair opengl has alot more ppl to go through, an entire board of people with different objectives in life, to be updated. Where directx is a microsoft thing ONLY. Im not saying that opengl isnt slow moving but that is has to go through more ppl with different objectives before it gets updated.
    -- Will you show me how to c++?

  9. #24
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I would say DirectX has to go through more red tape before getting updated. It is far more difficult to get something updated in a large company like Microsoft than it is for an API that isn't really maintained by one large company.

    As it stands there really isn't an excuse for the current state of the OpenGL API.

  10. #25
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I would dearly love to see OpenGL picking up speed, reforming & all that. It seems OpenGL is in a pinch right now and they need to solve it. But until they do, I will favor DirectX instead.
    I would also dearly love to see OOP out of OpenGL. Currently, it's just C, no?
    At least DX is built upon Microsoft's stupid COM which works in both C and C++ in an OO way.
    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.

  11. #26
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Well, OpenGL 3 was supposed to be object-oriented (on a conceptual level - but it would have been easy to wrap in a few classes). Of course, that was postponed.
    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. #27
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Don't bother learning low level 3d graphics programming until you've used a high level graphics library such as SDL, Irrlicht, OGRE, Flash API, etc. Create your own little wrappers. Write something useful. Eventually go back and replace the core with your own OGL or D3D implementation if you're actually up to it.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Going from DirectX to OpenGL
    By Wraithan in forum Game Programming
    Replies: 19
    Last Post: 02-24-2006, 11:07 AM
  2. Allegro, OpenGL.. or even DirectX?
    By Zeusbwr in forum C++ Programming
    Replies: 1
    Last Post: 11-14-2004, 08:16 AM
  3. Which is better: OpenGL or DirectX
    By Stan100 in forum Game Programming
    Replies: 2
    Last Post: 05-09-2003, 04:43 PM
  4. OpenGL 2 or DirectX ?
    By alex6852 in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 01-02-2003, 02:31 PM
  5. So.. what's the difference between DirectX and OpenGL?
    By QuestionC in forum Game Programming
    Replies: 6
    Last Post: 01-19-2002, 06:18 PM