Fix for GL 3.1 context