Sign in to follow this  

Starting OpenGL or DirectX soon. But which?

This topic is 3630 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

I'm going to start learning a graphic API soon, but I haven't decided which one yet. From what I've found, people say OpenGL is easier to get started but DirectX is easier in the long run (I'm not sure about that). I've searched on amazon and here for books, and I've found these: They both got great reviews. (the DX one is a lot larger) Open GL: [url]http://www.gamedev.net/columns/books/bookdetails.asp?productid=336&CategoryID=21[/url] DirectX: [url]http://www.amazon.com/Introduction-Game-Programming-Direct-9-0c/dp/1598220160/ref=pd_bbs_1?ie=UTF8&s=books&qid=1199489626&sr=8-1[/url] Which one should I get? Thanks in advance. ps: Why aren't the url tags working?

Share this post


Link to post
Share on other sites
See the Forum FAQ, "Asking Questions", question 8. Have a search on the forums and you'll come up with millions of threads on the subject.

Also, these forums don't use [url] tags, they use HTML anchor tags.


EDIT: Also, you mean Direct3D vs OpenGL. DirectX consists of multiple components for input (eww), networking (Well, it used it), sound, graphics, and video.

Share this post


Link to post
Share on other sites
I'd recommend OpenGL due to DirectX being for windows only. As for one being easier than the other I'd say that since they do the same things they're about equally easy/hard.

Another good book for OpenGL is the Red Book (an old version is available for free online).

As for the url tags this forum uses normal html tags (see the faq).

Share this post


Link to post
Share on other sites
personally i found Direct3D (DirectX Graphics if you wanna split hairs) to be easier to grasp due to the window management issue, as well as the fact that i was more comfortable with the online resources i found for it, although from what i understand, they're pretty much even when it comes to learning curve and ability

Share this post


Link to post
Share on other sites
I'm going to second the vote for OpenGL because of portability, and with SDL the windowing issues are totally taken care of (and totally portable for that matter). So i guess really my vote goes to OpenGL + SDL.

But REALLY the right thing to do would be to try both, I started with Direct3D and tried OpenGL and liked it, and no doubt plenty of people have started with OpenGL and decided they liked Direct3D more, but like i said, if I had to pick one, I'd pick OpenGL hands down.

cheers
-Dan

Share this post


Link to post
Share on other sites
Personally I've always felt that if portability is not a major concern then Direct3D is an easy win. I'm sure some of that is just my personal preference, but the main reason is D3DX. D3DX is a support library included with D3D that includes many functions and interfaces that can handle common graphics-related tasks. It can make your life much easier, especially as a beginner, as it allows you to focus more on the high-level concepts and less about whether your vector class is properly optimized or writing code to load a TGA file as a texture. OpenGL has no such library, and you must instead use third-party offerings or implement things yourself.

I also like D3D because the SDK comes with a suite of samples and tutorials, as well as complete documentation for the API. It also has PIX, which is powerful tool that you can use for debugging the rendering pipeline in your application.

Share this post


Link to post
Share on other sites
Quote:
From what I've found, people say OpenGL is easier to get started but DirectX is easier in the long run (I'm not sure about that).


I'm not going to get into a one-is-better-than-the-other debate, but I can say from experience that this tidbit is true. If you're just getting started, and want to simply create a window and render a fancy spinning triangle, then opengl and SDL are more friendly.

SDL will handle window management and opengl initialisation for you, and immediate mode rendering is more intuitive for beginners than working with a vertex buffer and vertex declarations or flexible vertex formats. Direct3D needs a lot of ugly win32 code to get up and running. (Actually, you can use SDL with Direct3D, but you don't see it very often).

However, once you're doing something more advanced, I've always found Direct3D to be cleaner. The reason: Direct3D's api is revised to cleanly incorporate new technologies. OpenGL however, has new features tacked onto the existing api. The result: a very bloated and complex api.

Anyone who claims that one api is faster or more powerful than the other doesn't know what they're talking about. I've had both positive and negative experiences with both.

Disclaimer: this all applies to c/c++. When using a .net language, I couldn't imagine why someone would want to use opengl over managed direct3d or xna, other than to be crossplatform.

[Edited by - gharen2 on January 5, 2008 2:07:31 AM]

Share this post


Link to post
Share on other sites
If you decide to go with OpenGL, I suggest you give GLFW a try. It's a portable library to handle the window creation, input, and other OS-specific tasks that have little to do with rendering. IMO, it'll make your life a LOT easier compared to writing your own Win32 code or using GLUT, unless you really wanna go that path. GLFW's documentation is excellent, and it's also very straightforward to use. Just look at some samples.

As far as the rendering APIs go, it really doesn't matter. Both are more or less equal, and people usually pick them by preference. Only thing is OpenGL will make it possible for you to make your app run on Linux, Mac, etc. but if you don't care about that, it really doesn't matter much which you start with (first).

Share this post


Link to post
Share on other sites
Quote:

Original post by sheep19
I've found these Open GL video tutorials:
http://www.videotutorialsrock.com/

:)


Those tutorials seem very interesting. Thanks for posting the link.

[Rating++]

Share this post


Link to post
Share on other sites

This topic is 3630 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this