作为这个问题的序言,我是 openGL 和 Visual Studio 的新手,所以我可能会遗漏一些相当明显的东西。我正在关注一个 openGL 教程,该教程应该设置一个基本窗口,显示有关您正在使用的 openGL 版本的信息。
作为参考,我在 NVidia GTX670m 上的 64 位 Windows 7 上运行 VS2010。当我指定样板程序在 openGL v3.x 中运行时。它运行得很好。当我指定它在 v4.x 中运行时。它崩溃并显示以下输出(之后要继续的问题):
'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).
在谷歌搜索这个问题时,我看到一些人建议在调试菜单中从 MS 服务器中提取符号并关闭将警告视为错误的选项。我都尝试了,但程序仍然崩溃。即使没有,我觉得我还是应该调查原因。
假设: NVidia 将 GTX 670 列为支持 openGL 4.x。它没有明确说支持 670m,但我假设如果常规 670 是 - 那个移动版本是。
问:如果程序在 openGL v3.x 上运行良好,并且我的硬件应该支持 openGL v4.x,是什么导致我的程序崩溃?