• Advertisement
Sign in to follow this  

C++ beginner to OpenGL

This topic is 1511 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 am a C#/PHP guy so I don't need to learn from scratch as I know how to do a lot of the loops/conditionals and all of the "basic" stuff thats reasonably common across languages.

What I am looking to do is learn C++ from (almost) scratch right up to using OpenGL with the ultimate aim of making a Game (starting small with something like a pong/tetris/mario clone).

I am looking for some advice from the good people here about what they would recomend is needed to be known of C++ before moving on to learning OpenGL and also some recomendations of tutorials/books/videos etc...

I know "The New Boston" does some good C++ videos and I have been following his videos. I also heard of NeHe but know that a lot if not all of the staff there is outdated.
I've also got a copy of the "C++ Through Game Programming" by Michal Dawson.

Many Thanks in advance,

Ben

Share this post


Link to post
Share on other sites
Advertisement

I think NeHe is still worth taking a look at. http://nehe.gamedev.net/ one of the first announcements references http://www.opengl-tutorial.org/ which should also prove useful even though the post is over a  year old.

 

To go from basic C++ to more advanced, I recommend learning about pointers and memory management. C# is an awesome language, but it lets you get away without thinking too much about newing up and deleting memory. With the garbage collection C# does for you automagically, programmers tend to get lazy and hand wave away any memory concerns. That being said, I can't count the number of times I've had to track down memory leaks in other people's C# code. >.<

 

C++ Templates are very similar to C# generics. You might convert some C# code using generics over to C++ just to get the syntax down.

 

And C++ function pointers are very similar to C# delegates.

 

And in general you might gain a lot of mileage out of converting an entire C# project over to C++. You'll learn what you can and can't do. And when you encounter a tough problem on "how the heck do I do this in C++" you can ask the GameDev community for help.

 

- Eck

Share this post


Link to post
Share on other sites

Thank you to everyone so far for the amazing and detailed replies.

@Eck: Funny you mention trying to convert an entire C# project over to C++ as at my job as a software engineer I'm doing the opposite (C++ to C#) which is part of the initial spur to learn C++ so that I can understand better what the existing code is doing and how it's doing it. Mostly at the moment I've been looking up individual functions and learning what they do but in isolation.

 

 

Ben

Share this post


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

  • Advertisement