我使用Microsoft Visual Studio 2013中的GLFW和GLEW库在OpenGL中编写了一个程序.我
I have written a program in OpenGL using the GLFW and GLEW libraries in Microsoft Visual Studio 2013.I am getting errors
用于检查扩展支持的OpenGL程序
#include<iostream>
#include<cstdlib>
#include<glew.h>
#include<glfw3.h>
#define GLEW_STATIC
using namespace std;
int main(int argc, char* argv[]){
GLFWwindow *window;
if (!glfwInit()) exit(EXIT_FAILURE); //Exit if not initialized
int w = 1024, h = 600;
window = glfwCreateWindow(w, h, "glfw", NULL, NULL); //Create a window
if (!window){
glfwTerminate();
exit(EXIT_FAILURE);
}
glewExperimental = true; //Supports modern OpenGL
GLenum glewError = glewInit(); //Initialize GLEW
if (glewError != GLEW_OK){
cout << "GLEW Error: " << glewGetErrorString(glewError)<<endl;
}
if (!GLEW_VERSION_2_1){
cout << "Glew not supported" << endl;
return false;
}
const GLubyte *p = glGetString(GL_VERSION); //Check GL version
cout << "Graphics Driver: " << p << endl;
const GLubyte *q = glGetString(GL_SHADING_LANGUAGE_VERSION);
cout << "SHader Version: " << q << endl;
if (GLEW_ARB_vertex_array_object){
cout << "genVertexArrays supported" << endl;
}
return 0;
}
>
'OpenGL.exe' (Win32): Loaded 'C:Program Files (x86)NVIDIA Corporationcoprocmanagerdetoured.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:Program Files (x86)NVIDIA CorporationcoprocmanagerNvd3d9wrap.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64setupapi.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64cfgmgr32.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:Program Files (x86)NVIDIA Corporationcoprocmanagernvdxgiwrap.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64uxtheme.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64combase.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64winmm.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64winmmbase.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64devobj.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64dwmapi.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:Program Files (x86)RazerRazer CortexK_FPS.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64shlwapi.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64dbghelp.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:Program Files (x86)RazerRazer CortexD3DX9_43.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:Program Files (x86)RazerRazer Cortexd3dx10_43.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:Program Files (x86)RazerRazer Cortexd3dx11_43.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:Program Files (x86)RazerRazer CortexD3DX8Wrapper.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:Program Files (x86)RazerRazer CortexD3DCompiler_43.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsWinSxSx86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9600.17227_none_dad9452e5bcb7986GdiPlus.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64psapi.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64comdlg32.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:Program Files (x86)RazerRazer CortexEasyHook32.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64dsound.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64ole32.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64oleaut32.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64comctl32.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64shell32.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64powrprof.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64SHCore.dll'. Cannot find or open the PDB file.
DLL_PROCESS_ATTACH:[C:Usersak1132documentsvisual studio 2013ProjectsOpenGLDebugOpenGL.exe]CheckHookPath start
C:Usersak1132documentsvisual studio 2013ProjectsOpenGLDebugOpenGL.exedota 2 betadota.exeH:GamesNaruto Shippuden Ultimate Ninja Storm RevolutionH:GamesBorderlands The Pre-SequelBinariesWin32H:GamesMiddle Earth Shadow of Mordorx64CheckHookPath end
CheckHookFullPath start
CheckFullPathHookMatch start
CheckFullPathHookMatch end
CheckHookFullPath end
**This app is not contained in hook (full)path, So we don't handle it**
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64ig4icd32.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64version.dll'. Cannot find or open the PDB file.
'OpenGL.exe' (Win32): Unloaded 'C:WindowsSysWOW64version.dll'
'OpenGL.exe' (Win32): Loaded 'C:WindowsSysWOW64kernel.appcore.dll'. Cannot find or open the PDB file.
DLL_PROCESS_DETACH:[C:Usersak1132documentsvisual studio 2013ProjectsOpenGLDebugOpenGL.exe]The program '[5964] OpenGL.exe' has exited with code 0 (0x0).
我只能想到出现这些错误的一个原因。也许你正试图在mac上并行运行你的项目,而并行并不很好地支持在离散和集成视频卡之间切换(或者,也许,你禁止在设置中使用离散卡)。因此,visualstudio正试图在集成视频卡上执行此代码,但openGL需要离散的代码。
相关文章:
- 试图在visual studio上用C++创建一个桌面应用程序
- FFmpeg:制作一个应用程序比直接使用ffmepg更好吗
- 有没有什么方法可以使用一个函数中定义的常量变量,也可以由c++中同一程序中的其他函数使用
- VSCode-有一个红色下划线,但程序构建和运行正确,并且出现配音错误
- 我正在尝试使用 c++ 创建一个货币转换程序,我不知道如何继续
- 试图创建一个多线程程序来查找0-100000000之间的总素数
- 我试图制作一个程序,要求用户输入问题和答案,但程序循环不正确
- 为什么它只打印双链接列表的第一个值,而我的程序却崩溃了
- 如何声明一个可以在整个程序中使用的全局 2d 3d 4d .. 数组(堆版本)变量?
- 我写了一个C++程序来模拟Enigma机器.我没有得到输出
- 为什么这个程序返回最后一个单词而不是最长的单词?
- 如何使用C++读取另一个程序中的源代码输出
- 我有一个对象,它将在整个程序的持续时间内实例化,但一个类成员不会,我应该动态分配它吗?
- 我的程序有一个保存配置文件的GUI,如何双击此配置文件以直接加载带有配置数据的GUI?
- 我想通过带有C++和Python的插件创建一个可扩展的应用程序
- 3-3. 编写一个程序来计算每个不同单词在其输入中出现的次数
- 为什么有时我输入一个整数,程序将第一个输入的数字打印成十进制数?
- 未定义的操作?程序一个接一个地打印出不同的值
- 如何给这个简单的 c++ 程序一个适当的循环
- 我如何给一个c++程序一个图标