title: OpenGL program works in GL 3.x but not 4.x
body: <p>To preface this question, I am new to openGL and Visual Studio, so I may be missing something rather obvious. I am following an openGL tutorial that's supposed to set up a basic window that displays information about the version of openGL you are using.</p>
  
  <p><a href="http://openglbook.com/the-book/chapter-1-getting-started/" rel="nofollow">Tutorial</a> | 
  <a href="http://openglbook.com/setting-up-opengl-glew-and-freeglut-in-visual-c/" rel="nofollow">Setup</a></p>
  
  <p>For reference, I am running VS2010 on 64-bit Windows 7 on an NVidia GTX670m. When I specify that the boilerplate program run in openGL v3.x. It runs just fine. When I specify that it run in v4.x. It crashes with the following output (question to continue after):</p>
  
  <pre><code>'Engine.exe': Loaded 'D:\Engine\Engine\Release\Engine.exe', Symbols loaded.
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\freeglut.dll', Binary was not built with debug information.
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Symbols loaded.
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\nvinit.dll', Cannot find or open the PDB file
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Program Files (x86)\Common Files\Spigot\Search Settings\wth159.dll', Cannot find or open the PDB file
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll', Symbols loaded (source information stripped).
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\ig7icd32.dll', Cannot find or open the PDB file
  'Engine.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Symbols loaded (source information stripped).
  'Engine.exe': Unloaded 'C:\Windows\SysWOW64\version.dll'
  The program '[7332] Engine.exe: Native' has exited with code 1 (0x1).
  </code></pre>
  
  <p>In googling this problem, I saw some people recommend pulling symbols from the MS server in the debug menu and turning off the option to treat warnings as errors. I tried both but the program still crashed. Even if it didn't, I feel like I should still investigate the cause.</p>
  
  <p><strong>Assumption:</strong> NVidia lists the GTX 670 as supporting openGL 4.x. It does not explicitly say the 670m is supported, but I am assuming that if the regular 670 is - that mobile version is.</p>
  
  <p><strong>Question:</strong> If the program works fine with openGL v3.x and my hardware should support openGL v4.x, what is causing my program to crash?</p>