Thread: So.. what's the difference between DirectX and OpenGL?

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    752

    So.. what's the difference between DirectX and OpenGL?



    Really I'm just a bit curious about what the basic differences are between them. What they were designed for, what they're used for, etc. In spite of which one is better, I'm sure that there's reasons that people still use both libraries.

    Specifically... I know that DirectX is put out by Microsoft as a way to interface graphics in Windows... so why was OpenGL put out then? Or, With OpenGL, why is DirectX still around? Who put out OpenGL?

    Also, a friend of mine coded a very very neat looking program (rotating, textured, tansparent, zooming, cube) in OpenGL, and said the graphics of it was only about 20 lines of code. Can OpenGL really do stuff like that? Is OpenGL code generally more high-level than DirectX?
    Callou collei we'll code the way
    Of prime numbers and pings!

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    69

    reply

    Well Directx will has alot of features that(i think not 100% sure) opengl can't do.Directx can have multiplayer games,read keyboard and mouse input,joystick draw normal and 3d graphics have sound and maybe more it's basically a set of tools but it only works for windows not any other system(but windows is the most popular). OpenGl on the other hand can be used for any Operating system but can only draw graphics i think opengl is simpler but directx is faster.You can also use allegro to do those extra stuff that directx can but you'll be doing alot. Opengl can be used in any system prolly about the same graphics directx is fast allegro is said to be as fast but it's up to you allegro is for beginners and Justin W said it was easy to use and is still used in professional but it might be like learning 2 different languages + c++. Just incase anything is wrong tell me but that's from what i know.

  3. #3
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    As of version 8.1, DirectX and OpenGL are very similar. The biggest difference is that OpenGL is purely a graphics API and does not even having windowing functions (there are libraries to do this for it though). DirectX is a collection of APIs for all multimedia applications, not just graphics.
    OpenGL is typically used for portability. With each new version of DirectX the graphics API seems to be more and more like OpenGL. Many OpenGL programmers will admit that DirectGraphics is finally a good API (although it took 8 tries). It used to be the case that you'd have to code a large amount of lines just to get the graphics part ready for DirectX but now it's not so bad anymore. I think it's still shorter with OpenGL but it's much closer now.

    Oh and OpenGL was put out by SGI.

  4. #4
    Unregistered
    Guest
    ignoring the two previous posts,

    i will limit this post to discussing Direct-3D(not the rest of the Direct-X API) and OpenGL

    heres a pretty good arguement i had, has some good comparisons in it.

    http://www.cprogramming.com/cboard/s...5&pagenumber=1



    eh..hem,

    OpenGL was/is owned and originally released by SGI it is open source and free for use by anyone though, It Originally began as IrisGL on SGI's high end workstations long Before Direct-3D, SGI then ported it to PC as OpenGL.

    Direct-3D was bought by microsoft about several years ago form some company(i dont know th name)

    API Features/Basic Design Goals:

    OpenGL:

    Design Goal:

    Good Looking, Powerful, Fast, Cross Platform, All Purpose.

    Features:

    Easy to learn, Fast app development, Better loking that Direct-3D,

    !!Supporst Extension!!(eg. other companies can make costom advancements to the API)

    and a HUGE new advancement of the api is about to happen.

    here are some features GL has over Direct-3D

    Two sided polygons,
    Two sided lighting,
    Hardware independant Z buffers,
    Accumulation Buffer,
    Volume Textures,
    Stereo Rendering,
    Point and line sizing,
    Parametric Curves and Surfaces,
    Picking without utilities,

    Direct-X: // have to use direct-X here cause it was virtually developed as a whole and the goals apply to all its parts

    Design Goal:

    Be a fast complete API thats contains everyting need to make games for windows.


    im not to up on Direct-3D features some one could fill in here...

  5. #5
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    previous is mine.

    >Can OpenGL really do stuff like that?

    quite possible.


    >Is OpenGL code generally more high-level than DirectX?

    depends on what your doing.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  6. #6
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    >
    as of what version currently the most used version is 1.2 also no including extainstions.
    <

    1.2

    ARB extensions are perfectly legal since they are considered part of the standard, and supported on virtually all hardware.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  7. #7
    Registered User
    Join Date
    Sep 2001
    Posts
    305
    opengl is portable
    directx is only for windows

    this sounds kinda tacky to lots of people because they see no use for portability because they use no other OS, so they decide on using directx, thats great. opengl is portable, you can take one opengl program, change a little bit of it, and compile it for some other OS like linux.

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. DirectX vrs. OpenGL - Witch one is better?
    By Queatrix in forum Windows Programming
    Replies: 5
    Last Post: 02-23-2006, 03:32 PM
  3. Allegro, OpenGL.. or even DirectX?
    By Zeusbwr in forum C++ Programming
    Replies: 1
    Last Post: 11-14-2004, 08:16 AM
  4. Which is better: OpenGL or DirectX
    By Stan100 in forum Game Programming
    Replies: 2
    Last Post: 05-09-2003, 04:43 PM
  5. OpenGL 2 or DirectX ?
    By alex6852 in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 01-02-2003, 02:31 PM