First version of OpenGL window, fix writing pgm

OpenGL window is disabled by default, not yet finished
Use CMakeLists.txt to get the correct libs
Color format for writing pgm fixed
Main now has parameter for input file