About OpenGl and Direct3D

About this part, i am almost newbie. Therefore, I need someone answer some questions:
1. OpenGL and Direct3D?
2. The history of these graphic libraries
3. which library the programmer is interested more?

As this is a forum primarily for Mac developers, you're going to find very few people here with an interest in or knowledge of Direct3D, as Direct3D is only available on Windows; OpenGL however is cross-platform and available on Mac OS X, Windows, Linux, and many, many more.

torqueb2g Wrote:About this part, i am almost newbie. Therefore, I need someone answer some questions:
1. OpenGL and Direct3D?
2. The history of these graphic libraries
3. which library the programmer is interested more?

If you're interested in making games for Windows XP or Vista, I would highly recommend that you look into XNA, which uses DirectX (Direct3D) and C#. DirectX is pretty complicated to jump into all on its own. XNA was designed specifically for beginning game developers, but also for professionals to some extent.

For making games on the Mac, like sealfin said, OpenGL is the only one available.

As to the history? That's long. The short version is that basically OpenGL was made available by SGI to the industry at large through a standards committee. Many companies were on that committee, including Microsoft. Microsoft later decided that they preferred to have their own proprietary graphics API to squash OpenGL with, so they developed their own, called Direct3D, and later renamed the collection of technologies around it to DirectX. It is another one of their monopolistic ploys to rule the world, and they are doing very well at it -- thus it will *never* be available for any other platform than M$ branded products.

I've recently started cross-developing using Direct3D 9 (after a long and continuing love-affair with OpenGL) and I have to say that most OpenGL constructs have direct analogies in Direct3D. When you think about this it makes sense because the underlying hardware is the same.

That being said, I can't deny that OpenGL is the superior of the two. It's API is simple, elegant and consistent. And though it is slow to progress because new extensions have to go through an open review process, it is much more of a joy to program.

Direct3D takes some getting used to after the elegance of OpenGL. It's API is clunky (it has stupid long function and constant identifiers) and requires more code to do the same stuff as OpenGL. But if you're developing for Windows, Direct3D is probably the way to go. You just have to accept that M$ doesn't do elegant.