I set "ONLY_FORWARD_COMPATIBLE = True", however many deprecated functions such as glBegin, glColor* were still loaded and able to be called.
I think "src/generateraw.py" doesn't consider the OpenGL 3.1 deprecation.
How did you initialized opengl context? With glut? What OGL version?
Try this code (assuming you want to have 3,1 ogl):