Jump to content
  • Advertisement
Sign in to follow this  
bmburditt

OpenGL vs Directx

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

Good Afternoon Ladies and Gentlemen: A new member here. I have been reading through the gamedev.net website for about a year now and have just embarked on the long journey of game programming/development. I have always enjoyed playing games and have been fascinated by software development especially with respect to games. I am just at the tail end of reviewing my C programming skills. IE a beginners level understanding. I have purchased and read 7 or 8 books recently on game programming and development of software. Please understand I have not worked thru the books I have read thru them to get an overview. my question is this ... After bringing my C/C++ skills up to snuff, what do you think I should look into first OpenGL or Directx? Or maybe I should be asking which book to work through first, Beginning OpenGL Game Programming or Tricks of the Windows Game Programming Gurus, 2nd Ed?

Share this post


Link to post
Share on other sites
Advertisement
I have been wondering the same thing. I'm actually trying to find some good, current OpenGL coding examples, but I haven't really found any that I can understand.

Share this post


Link to post
Share on other sites
Quote:
Original post by SippyCup
I have been wondering the same thing. I'm actually trying to find some good, current OpenGL coding examples, but I haven't really found any that I can understand.


You have visited NeHe, havent't you?

To the OP: I find OpenGL easier to begin with, because you don't need to setup vertex arrays like in D3D, but you just do glBegin/glVertex/glEnd calls.
But Direct3D isn't really harder, just more interfaces to remember (and it doesn't have an extension mechanism).
Once you are comfortable with either API, learning the other should be a piece of caek.

Share this post


Link to post
Share on other sites
Quote:

After bringing my C/C++ skills up to snuff, what do you think I should look into first?


More C++. Getting from beginners knowledge to a level where you can effectively make games is a long long time. Moving to either API before you're ready to actually make games will only hurt in the long run.

Share this post


Link to post
Share on other sites
Quote:
Original post by bmburditt
More C++ knowledge gotcha. Having said that, which path do you suggest?


Honestly, the APIs are so likely to change in the year or two [conservatively] that it's going to take, I wouldn't hazard a guess. It mostly doesn't matter though. I'd avoid the 'Tricks' book though.

Share this post


Link to post
Share on other sites
I'd recommend you take a look at SDL - a free cross-platform 2D API to get started with. SDL not only will handle all your graphics, but your input handeling, networking, etc. Its a pretty neat, expansive library. I'd recommend Focus On SDL if you're interested in books.

The great thing about SDL is that it can be used alongside OGL to get a render context, load textures, getting input, etc. Which makes it the logical precursor to learning OGL.

You can also use SDL to bypass learning any win32 stuff to use D3D (in essentially the same way you'd do it with OGL).

<3 SDL.

Share this post


Link to post
Share on other sites
I highly recommend using NeHe as a starting point. OpenGL just seemed so much more newbie-friendly than DirectX. Drawing a red triangle in OpenGL (for the most part) is just doing something as simple as:

[source=cpp]
glBegin(GL_TRIANGLES)

glColor3f(1.0f, 0, 0);

glVertex3f(-1.0f, 0, 0);
glVertex3f(0, 1.0f, 0);
glVertex3f(1.0f, 0, 0);

glEnd();





In DirectX you have to deal with creating a vertex array/buffer and IMO there were just too many places to get lost. It basically comes down to whatever you can find a clear tutorial for. NeHe is one of the best and clearest tutorial sites I've ever found for OpenGL, while Drunken Hyena and www.andypike.com are good for DirectX.

Share this post


Link to post
Share on other sites
No Tricks book? I have read mixed reviews on the net and on this site. Not to mention he has my sense of humour. Any other book suggestions.

Share this post


Link to post
Share on other sites
Personally, I liked Tricks vol 1, it helped alot with DirectX(specifically DirectDraw).

But I started learning OpenGL before learning DirectX, I think OpenGL is a little easier for the 'newbie' DirectX is kinda odd, but I like it a little more than OpenGL. But NeHe is a great place to learn OpenGL.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!