我有6个模型加载并在窗口中显示。其中5个加载完美,我对它们执行的转换没有问题,并且灯光看起来很棒。当我将VBO绑定到下面缩小时,一个分段错误:
glGenVertexArrays(1, &myVAO);
glBindVertexArray(myVAO);
glGenBuffers(1, &myVBO);
cerr << "cerr" << endl;
glBindBuffer( GL_ARRAY_BUFFER, myVBO ); //Seg faults here
cerr << "made it here to 370" << endl;
GDB
glBindBuffer(GL_ARRAY_BUFFER,myVBO);
(GDB)
0x000000000040474e 369 glBindBuffer(GL_ARRAY_BUFFER,myVBO);
(GDB)
0x0000000000404754 369 glBindBuffer(GL_ARRAY_BUFFER,myVBO);
(GDB)
0x0000000000404756 369 glBindBuffer(GL_ARRAY_BUFFER,myVBO);
(GDB)
0x000000000040475b 369 glBindBuffer(GL_ARRAY_BUFFER,myVBO);
(gdb)编程接收信号SIGSEGV,分段故障 来自/lib64/libc.so.6的_int_malloc()中的0x00000038c167e296
是的,我包括GLenum err = glewInit();
有没有人有过这样的事情?