Using OpenGL with GLFW3 and Visual Studio 2010
This is really just a note for myself but others may find it useful. GLFW is a framework similar to GLUT that makes it relatively easy to do cross platform development for OpenGL without getting buried in tedious platform specific windowing code.
The package is nicely packaged and documented and includes a quick start project in the documentation however some important information is missing on how to configure the project when you create it. I wasted 2 hours trying to figure out how to get it working under VS2010 because I'm not a windows programmer :-)
Here are the basic steps you need:
#pragma comment(lib, "GLFW3")
And you should be off to the races.
The package is nicely packaged and documented and includes a quick start project in the documentation however some important information is missing on how to configure the project when you create it. I wasted 2 hours trying to figure out how to get it working under VS2010 because I'm not a windows programmer :-)
Here are the basic steps you need:
- Create a win32 console application
- Make sure it is an empty project!!
- Add the glfw3 include and library directories to the project for all configurations
- Add the main from the GLFW manual's quick start page.
- link in glfw3.lib and OpenGL32.lib by adding these pragmas to your source
#pragma comment(lib, "GLFW3")
And you should be off to the races.