I've been studying OpenGL for about 2 years, but I haven't got far with it and had no idea what is wrong. Is it me unable to understand OpenGL abstractions or is it designed not very well? I was looking for an answer all these years when suddenly I've started getting into math since my job required some math skills and suddenly OpenGL started to make sense for me. I ain't trying to say that now it's fun and games - honestly I find it challenging, but not as bad as before.
So math resolved some frustrating moments for me, just as improvements in English (after all it's still secondary language and I still have a lot to learn) made it possible to read original sources of info (about which I'm going to write later) and my overall growing as developer allowed me to get back to OpenGL and beat the challenges I had previously.
There are many books about the subject covering all possible platforms that support OpenGL. I'm not focusing on all possible variations of a platform/OS pairs, but instead I'm learning it on old good PC. You should do the same if you want to learn it good enough to write code that will do a task you want it to. No wasting time.
So for many years I was hearing about few main books on OpenGL.
OpenGL Superbible which often called The Blue book. Which looks more as a printed out documentation of functions used to manipulate OpenGL contexts. Contains few samples here and there, but has a lot more downloadable examples. The book shows you some functions and provides a context of using those to achieve some results. Great for experienced developers to renew knowledge or find additions between previous versions of OpenGL.
OpenGL Programming Guide - The Red book. I just started reading this one, but so far I like it better. As you can decipher from it's name - it provide guide following which you will easily get some things about OpenGL. Has in-book samples as well as downloadable ones. So requires you to know how to setup your environment, knowledge of cmake and C++, to be able to work with the samples. Perfect for me, but sometimes too challenging even for me. You should know how to deal with such problems if you want to learn OpenGL no matter which platform you want to use.
Setting thing up gonna be a little problematic, but I'm gonna try to instruct you with list of simplified steps. You still need to learn what you do and why it needs to be done in order to fill free of it and focus on studying. It would be a shame to drop it because of some problems within building code, wouldn't it?
To start the process you will need to install some utilities. Let's define that we're trying to build samples and our own project on a Windows family system.
So math resolved some frustrating moments for me, just as improvements in English (after all it's still secondary language and I still have a lot to learn) made it possible to read original sources of info (about which I'm going to write later) and my overall growing as developer allowed me to get back to OpenGL and beat the challenges I had previously.
There are many books about the subject covering all possible platforms that support OpenGL. I'm not focusing on all possible variations of a platform/OS pairs, but instead I'm learning it on old good PC. You should do the same if you want to learn it good enough to write code that will do a task you want it to. No wasting time.
So for many years I was hearing about few main books on OpenGL.
OpenGL Superbible which often called The Blue book. Which looks more as a printed out documentation of functions used to manipulate OpenGL contexts. Contains few samples here and there, but has a lot more downloadable examples. The book shows you some functions and provides a context of using those to achieve some results. Great for experienced developers to renew knowledge or find additions between previous versions of OpenGL.
OpenGL Programming Guide - The Red book. I just started reading this one, but so far I like it better. As you can decipher from it's name - it provide guide following which you will easily get some things about OpenGL. Has in-book samples as well as downloadable ones. So requires you to know how to setup your environment, knowledge of cmake and C++, to be able to work with the samples. Perfect for me, but sometimes too challenging even for me. You should know how to deal with such problems if you want to learn OpenGL no matter which platform you want to use.
Setting thing up gonna be a little problematic, but I'm gonna try to instruct you with list of simplified steps. You still need to learn what you do and why it needs to be done in order to fill free of it and focus on studying. It would be a shame to drop it because of some problems within building code, wouldn't it?
To start the process you will need to install some utilities. Let's define that we're trying to build samples and our own project on a Windows family system.
- Download and install Visual Studio of desired version.
- You need cmake to create project files.
- As well in order to download samples you need git.
- Here is the repository with samples. Get it with git.
- After that run cmake. It needs you to input working directory and directory where the project files will be stored.
- Click Generate button and it will create the blank project. After that setup dependency directories and desired flags. Usually on this step I just update some dependencies with paths to it's folders and let it Configure the project.
- After that you will have the VS project which will be set up with all dependencies and flags you've chosen in cmake.
- Try to build the project. It can produce some errors - I had one that required me to retarget all the subprojecs.
- Chose one subproject and fix all errors that it produces. If you did previous steps correctly there won't be too much of them.
- On that point you should have a working sample. Applying same algorithm to other samples you will eventually will have all them built up.