Segmentation fault at glGenVertexArrays( 1, &vao );

后端 未结 4 1378
我在风中等你
我在风中等你 2020-11-29 00:48

My gdb backtrace gives:

(gdb) backtrace
#0  0x00000000 in ?? ()
#1  0x0804a211 in init () at example1.cpp:147
#2  0x0804a6bc in main (argc=1, argv=0xbffff3d4         


        
4条回答
  •  醉酒成梦
    2020-11-29 01:32

    glewExperimental = GL_TRUE; 
    glewInit();
    

    Should do the magic


    Experimental Drivers

    GLEW obtains information on the supported extensions from the graphics driver. Experimental or pre-release drivers, however, might not report every available extension through the standard mechanism, in which case GLEW will report it unsupported. To circumvent this situation, the glewExperimental global switch can be turned on by setting it to GL_TRUE before calling glewInit(), which ensures that all extensions with valid entry points will be exposed.

提交回复
热议问题