Segmentation fault on glGenVertexArrays


I was trying to compile the code from the book Interactive Computer Graphics: A Top-Down Approach with Shader-Based OpenGL (6th Edition). The code compiled fine, but execution failed with SIGSEGV segmentation fault at the line:

GLuint vao;
glGenVertexArrays( 1, &vao );


The system might be using an old version of GLEW, where glGenVertexArrays is still marked as an experimental OpenGL extension. To enable the use of such experimental extensions add these lines during initialization:

glewExperimental = GL_TRUE; 

Tried with: NVIDIA GeForce 9600 GT, NVIDIA drivers 331 and Ubuntu 14.04


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.