76843fc529
The check to verify whether we've got the right GL context was checking that the GL version was less than 3 whenever the non-GL3 driver is used. However it looks like the driver is free to return a GL3 context that is compatible with GL2 if GL2 is requested so this was breaking the GL2 driver. This also adds the necessary SDL attributes to request a forward compatible core context like the GLX and EGL winsys's do. I haven't actually tested this because it looks like SDL will only create a GL context with GLX and I haven't got a recent enough X server to handle the glXCreateContextAttribs request. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit d46acafa3ea7ba2e6c4ac7a45f00a132df1b2872)