Saturday, May 12, 2012

A Good Place to Start OpenGL

Many people want to learn OpenGL. Most of these people have no idea where to start. About everyone will learn OpenGL in some deprecated or round-a-bout way that discourages them from continuing their studies.

Well that's stupid and I'd like to at least point people in the right direction for getting started. This definitely isn't a tutorial, but I hope that it does serve to broaden your knowledge of available OpenGL tools, libraries and resources.

Here are the resources:

Basically you should walk through the samples provided over at g-truc to get an idea of what it means to create a current generation OpenGL project. The authors say that the code is not for beginners but they are only being modest and probably just don't intend for them to be used by beginners. I can honestly say that they are some of the best examples of OpenGL code available.

To build them on Windows for Visual Studio 2010 you need to install cmake. After that open up command line by running it as administrator. In this cmd window change to the samples folder that contains the /data, /external, /samples... the top level of the folder. Run the command [cmake -G "Visual Studio 10"]. Do not use the cmake GUI for this as it won't work. Now you should have vs2010 projects built that you can explore by opening the .sln.

What I suggest that you do is copy the projects and get accustomed to how they use OpenGL to express themselves. Their image loading tool, GLI, is for bringing in images to the program to use as textures. FreeGLUT is a "make windows and other stuff" utility that some people use. I honestly think all GLUT stuff is lame and suggest you learn to use GLFW instead. GLM is a great way to encapsulate all of your math needs for things such as vectors and matricies (which you will make heavy use of). It gives you a portable math solution that works great with OpenGL.

No comments:

Post a Comment