C++/OpenGL/SDL/Cmake where to Start?

Hi my name is divine, and this is my first time in this forum. I just want to ask for an advise in here, I just dont know where to start. hopefully you can understand and help me. I want to start with a small game project using c++ and opengl,. I already did mention this on a post a year ago on where people told me what are the options to follow along. I want it to be crossplatform so thats where they advised me to study Cmake. I havent started yet becoz of financial difficulties, but now I think I'm back in track. Of course Im also havin discussion with other several forums. And a lot of them was actually advising me to learn and use these with my projects if I want to make a crossplatform application.

*C++ // Intermediate
*Opengl // just starting to learn
*SDL// lookin forward on it
*Cmake// a few from this forum advise me to learn this ;D so I'm also lookin forward on it.

Ok so now heres my problem, I dont know where to start. I already know C++ but ofcourse I'm still learning. and I'm also looking forward to have a good understanding of Opengl with books and tutorials. But I havent really seen a lot of tutorials or articles online about SDL and Cmake/ or books perhaps. and on how I can use that along with c++/Opengl on starting a simple project.
Is there any books or reference you can recommend me to read regarding these?
I'm also quite confused/curious how to associate all of these to work with each other.
And what are the requirements/prerequisite to start learning these?

Maybe the question is too broad, and I'm really sorry for that. I just really hope you understand my point, and I would be more than happy to hear any advise from you. Thank you in advance! 
Last edited on
I would advise you to learn 2D graphics before you learn 3D graphics.

The easiest library to start learning 2D graphics is Allegro 4. This tutorial will explain how to begin:

http://www.programming4beginners.com/tutorial/allegro

After you are comfortable with Allegro 4, move on to some 2D graphics library which uses events. The choices are: Allegro 5, SDL, SFML.

When you are comfortable with it and when you can use events, try learning old OpenGL (version 1 and 2).

You can go to youtube and look for SDL/OpenGL tutorials . There is also a library called FLTK .
B.Stroustrup recommand it.
Simply take a well-known game source code like snake or pacman and give a try .

Once that done , you can try to integrate libraries like FMOD API for audio , Box2D for physic like Angry Bird use , etc. Maybe also an Input library so you can play around with a joystick , etc.

After it , look at design patterns.

Have fun !
Thank you so much for your warm replies! I will add all of those advises into consideration, continuing learning in game development.
What you can do also is download a free open-source code or project or exe . That way you can launch it and analyze the code and do some modifications . Make sure to give credits to the original owner though .
After you are comfortable with Allegro 4, move on to some 2D graphics library which uses events. The choices are: Allegro 5, SDL, SFML.


If you are going to learn how to use Allegro might as well use the newest version there is. There is no reason to learn a old API specially when the newer version includes some major design changes (Like Events in this case).

When you are comfortable with it and when you can use events, try learning old OpenGL (version 1 and 2).


Now this comment really really bothers me. DO NOT LEARN these old versions of OpenGL, there is absolutely no point in learning them because

A) No one uses these old version of OpenGL anymore.

B) The newer versions of OpenGL are drastically different then version 1/2 because of the graphics pipeline. So pretty much none of the knowledge you just spent months learning will be transitioned to the newer versions of OpenGL.

There is almost no gain in this learn the old frameworks then the new frameworks approach to learning, specially when we are talking about OpenGL 1/2. All it does is add more stuff to learn (And unlearn) and increases the time it will take to learn everything you want to learn.

Ok so now heres my problem, I dont know where to start. I already know C++ but ofcourse I'm still learning. and I'm also looking forward to have a good understanding of Opengl with books and tutorials. But I havent really seen a lot of tutorials or articles online about SDL and Cmake/ or books perhaps. and on how I can use that along with c++/Opengl on starting a simple project
.

As for where to start learning personally I would recommend starting out with SFML to learn the basics of game development. Though any other similar framework would work also (Allegro, SDL, etc.) just make sure it is not an old version.

If you do decide to go with SFML there is a great book out there to help with learning how to use it called "SFML Game Development By Jan Haller, Henrik Vogelius Hansson, Artur Moreira" that I would highly recommend to anyone that has a solid fundamental grasp on C++.

Then after you learn the basics from a simple 2D library I would recommend personally moving onto learning a popular middleman Game Engine like Unreal Engine 4 or Unity 5 if you are interested in learning how to make games. Otherwise if you are just interested in the graphics programming part then yeah move onto either OpenGL or DirectX (Or the new upcoming Vulkan :)).
Last edited on
If you are going to learn how to use Allegro might as well use the newest version there is. There is no reason to learn a old API specially when the newer version includes some major design changes (Like Events in this case).


Allegro 4 is the only one that does not use events. That is why I am recommending it. I think that events can be hard for beginners. Allegro 5 uses events.

DO NOT LEARN these old versions of OpenGL, there is absolutely no point in learning them because


Again, OpenGL 1&2 are much easier for beginners than the new OpenGL, IMO.

The point of such recommendation is to provide an easier learning curve. But if someone wants to jump right in, he can try out the new OpenGL immediately. If the OP doesn't have enough experience with programming, I think it can be quite hard.
Last edited on
Again, OpenGL 1&2 are much easier for beginners than the new OpenGL, IMO.


I agree it is probably easier to learn but like I said the differences between modern OpenGL with a graphics pipeline and old OpenGL without one are massive. So while it is easier to learn old OpenGL it wouldn't matter because a huge portion of the experience gained from learning it won't apply to ANY modern day graphics API.

All you would end up doing is learning how to use an easier to learn outdated API that isn't used anymore, then having to unlearn a large portion of that so that you can learn how it is actually done in modern graphics APIs.

So there is literally no point in learning it (Even if it is easier to learn) because most of the knowledge won't transfer over to modern versions.

Anyways sorry OP for taking over the thread, just wanted to point out that you definitely should not be learning old OpenGL (1 or 2) because you will not benefit from it.

Last edited on
True, modern OpenGL is completely different than OpenGL 1&2.

But it is not the API that I'm concerned about. I'm concerned about the concepts of camera, perspective, viewport, linear transformations/matrices, depth-buffer, shading/texturing, vectors, polygons, etc... I think it is much easier to learn modern OpenGL when you already have a good understanding of those concepts.
@Zereo I dont think Vulcan with Dx12 is good for starting . Most of the people still stick to D9-D10 and D11 . It is better start with Dx11 , then when everything rolls , buy yourself a new graphic card that can support Dx12 .
@Zereo I dont think Vulcan with Dx12 is good for starting . Most of the people still stick to D9-D10 and D11 . It is better start with Dx11 , then when everything rolls , buy yourself a new graphic card that can support Dx12 .


At the moment yeah that is probably true, specially for those that are just starting out in game programming and graphics programming.

True, modern OpenGL is completely different than OpenGL 1&2.

But it is not the API that I'm concerned about. I'm concerned about the concepts of camera, perspective, viewport, linear transformations/matrices, depth-buffer, shading/texturing, vectors, polygons, etc... I think it is much easier to learn modern OpenGL when you already have a good understanding of those concepts.


Yeah those are important things to learn I agree and it definitely does help to have an easy to use API to learn them in.

That is why I usually recommend that if they are just looking to learn Game Development then they should just bypass learning OpenGL, DX altogether and go straight to learning a Game Engine/Game Framework. Then later after they are more experienced go back and get a decent grounding in OpenGL/DirectX.

Since in reality most game programmers will very rarely touch any OpenGL/DirectX code. Since most if not all graphics related code is behind an abstraction layer of the Game Engine (UE4/Unity) or Game Framework (SDL, SFML, Allegro, etc.) that they are using.

So by using a Game Engine for example they can learn about all the important concepts that you talked about (Plus more) while not having to deal with all the low level headaches that happen when dealing with OpenGL/DirectX directly. Plus they get the added benefit of knowing how to use that engine which will be a big boon on their resume if they are looking to get into the industry.

The only time I think that beginners should jump into learning OpenGL/DirectX right away is if they are planning on focusing specifically on the graphics portion of game and engine development. Otherwise there is so many more concepts of game development that you can learn much easier while using a Game Engine (Like AI, Physics, Entity Management, Asset Management, high level graphics functionality, etc. etc.).

But who knows this is just coming from my personal experience after having gone from learning 2D frameworks to OpenGL/DirectX and then to Game Engines. I wish I would have saved myself the time trying to learn everything about OpenGL/DirectX because I very very rarely touch them inside of UE4 and didn't learn anything I could not have learned by just using UE4.

Anyways just my 2 cents.
Last edited on
Topic archived. No new replies allowed.