I'm a new user of GLEW and I have been trying to write a program using openGL that will display an image that it reads in from a .tiff file, to a window on my screen using GLUT.
After a period of learning that there are much better methods of drawing the image to the screen than simply doing it pixel by pixel, it was suggested that I make the image into a texture and then draw a quad to the screen with that texture bound to it.
After a day of coding, I ended up with a segmentation fault in my program that occurred when I tried to generate a vertex buffer using the function glGenBuffers(). Due to the extended nature of the program I was working on, I created a simpler program to test my understanding of the libraries I am using. The simpler program does not bother with reading any images into memory, and is posted at the following link: http://pastebin.com/tk6Lbnde
An example compile command and the output produced by the program are both included in lines 7 through 15 of the pastebin.
This program also manages to produce a segmentation fault when it tries to call the glGenBuffers() function.
Can anyone help me to understand what is going wrong and why the function is failing?
glewInit() is called at line 61
glGenBuffers() is called at line 96
Thank you very much,