Jump to content
  • Advertisement
Sign in to follow this  
CodeMachine

OpenGL or DirectX?

This topic is 4047 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello mates If I want to start programming 3D-games, which enging is to prefer then? OpenGL or DirectX? And maybe anyone can recommend one or several GOOD books? Thanks

Share this post


Link to post
Share on other sites
Advertisement
I'm pretty sure an FAQ around here answers this question in detail. It might be the For Beginner's one. Anyhow, the answer is that it doesn't really matter unless you plan on programming for Linux or Mac, in which case use OpenGL. otherwise, it's pretty arbitrary. OpenGL is generally considered a tad easier to learn, but overall they're going to be roughly the same amount of work for the same amount of results. And they both have plenty of good information regarding them, so that's pretty fair too. It comes down to choice or platforms.

Oh, and about the books. Beginning OpenGL Game Programming is excellent. This is assuming that you already have a firm grip on C++. If not, work on that first (or work on the language of your choice, all major languages have OpenGL bindings).

Share this post


Link to post
Share on other sites
I would recommend OpenGL, if only because of it's universality (compared to DirectX) and it's open-source nature. I am personally a big fan of open-source programs and APIs, and I love OpenGL.

And if you're looking for OpenGL help, try the Redbook. It's available at http://www.glprogramming.com/red/ .

Share this post


Link to post
Share on other sites
Quote:

I would recommend OpenGL, if only because of ... it's open-source nature.

OpenGL is not open source. It's a standard, which is freely available, however to claim that OpenGL is open source implies that the source code to the implementation must be available. It's not.

That said, to the OP: Look at them both, pick the one you like best. They both do the same thing, in the end, there is really little difference that you need to be worried about at this point in your career.

Quote:

And maybe anyone can recommend one or several GOOD books?

Avoid books that cater to specific APIs (unless they're free, like the OpenGL Red Book) as they become outdated quickly and aren't worth the money. Avoid books that claim to teach you "beginning game programming" in a specific API.

I generally recommend people acquire "Fundamentals of Computer Graphics, 2nd Ed." and possibly also "The Geometry Toolbox" (understanding the math is critical to writing nontrivial 3D applications) to get a solid understand of the API-agnostic theory. That theory can be supplemented with the excellent online documentation available for either OpenGL or D3D.

Share this post


Link to post
Share on other sites
In my opinion I think DirectX is more complex than OpenGL. DirectX have many different versions(I mean that there is 7.x, 8.x or 9.x, etc...) and it's built upon you have to create object devices (tag struct's). But in OpenGL there's just one main version of it, it's basically just global function calls except for some objects.

Share this post


Link to post
Share on other sites
Quote:
Original post by CodeMachine
Hello mates

If I want to start programming 3D-games, which enging
is to prefer then? OpenGL or DirectX?

And maybe anyone can recommend one or several GOOD books?

Thanks


I might add that it's not entirely necessary to even make this decision, if you go with the option of using an already-heavily-developed graphics library like CrystalSpace, Irrlicht, or my own personal favorite, Ogre3D, you can bypass much of the 'graphics engine' development part of your game's progress (as well as some other components which those libraries offer you), in the name of focusing on game elements instead.

Best of luck,




Share this post


Link to post
Share on other sites
Quote:
Original post by jpetrie
Quote:

I would recommend OpenGL, if only because of ... it's open-source nature.

OpenGL is not open source. It's a standard, which is freely available, however to claim that OpenGL is open source implies that the source code to the implementation must be available. It's not.


Let me correct you:

- Mesa 3d - linux opengl implementation of opengl is opensource..
- SGI offers a opengl reference software implementation under opensource license as well.

Share this post


Link to post
Share on other sites
Quote:

Let me correct you:

- Mesa 3d - linux opengl implementation of opengl is opensource..
- SGI offers a opengl reference software implementation under opensource license as well.


That's worth mentioning, of course, but that isn't a "correction" to what I said. Those are implementations of OpenGL. Not OpenGL itself. I can write an implementation that conforms to the Direct3D interface and make that open source, but that does not make Direct3D itself open source.

OpenGL is a standard, and that standard does not stipulate that an OpenGL implementation must be open source. Consequently, OpenGL is not open source. You won't find the source to Microsoft's implementation, for example. When people talk about OpenGL, they usually mean any or all implementations of the OpenGL standard (it's kind of nonsensical to call a standard "open source," after all). But there is no stipulation that all implementations must be open source (many are not) and it is therefore inaccurate to claim that OpenGL is open source. I never said anything about particular implementations, after all (although the implementations that will be used by the majority of the game-playing market will be closed source).

Share this post


Link to post
Share on other sites

This topic is 4047 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!