所以这就是问题:当我调用glGenTextures时,我会遇到分段错误.
我在linux上,这是我目前用来调查这个的代码:
#include <iostream>
#include <SDL/SDL.h>
#include <GL/gl.h>
#include <GL/glu.h>
int main(int argc, char *argv[])
{
GLuint texture;
glGenTextures( 1, &texture );
return texture;
}
Run Code Online (Sandbox Code Playgroud)
看起来很简单吧?好吧,我用GDB(GNU调试工具)跟踪了段错误,当我在文件/usr/lib/mesa/libGL.so.1中调用glGenTextures()时就会发生这种情况.
那是我的视频驱动程序的openGL代码......
有任何想法吗?