gl_common: OpenGL 3.x context support on windows
commit95b42c759ce9383d675561c9eb404cf17d5413c7
authorKovensky <diogomfranco@gmail.com>
Fri, 27 Jan 2012 01:31:33 +0000 (27 01:31 +0000)
committerUoti Urpala <uau@mplayer2.org>
Thu, 6 Sep 2012 16:30:53 +0000 (6 19:30 +0300)
tree9432fcb8b2f172c8096b275d8d5f1f33eb68294f
parent349b2e1977176b70bf88534c21d0475f7441806a
gl_common: OpenGL 3.x context support on windows

Also include GL/glext.h on windows:

Mingw's (and cygwin's) GL/gl.h has GL/glext.h's inclusion commented
out for some reason. Their glext.h is also ancient, so do yourself
a favor and replace your GL/glext.h with the one from
http://www.opengl.org/registry/api/glext.h .

A workaround is needed for NVidia's broken wglCreateContextAtrribsARB:

It'll return an error if the requested OpenGL version is previous to
3.2 *and* you request a profile... which is exactly *not* what the
wgl_create_context spec says should happen.

Handle it by removing the profile request from attribs[] and retrying
the context creation once more if the first try fails.

And after my first foray into OpenGL I already find a driver quirk.
Oh well.
libvo/gl_common.c
libvo/gl_common.h