Requesting specific OpenGL 3.x context profile & X11_GetWindowWMInfo [PATCH]

Hello,

I needed to use OpenGL 3.2 compatibility profile with SDL 1.3, so I
made small patch that adds a new attribute SDL_GL_CONTEXT_PROFILE for
requesting specific OpenGL 3.x context profile.

Requesting specific profile works now like:
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE,
GL_CONTEXT_COMPATIBILITY_PROFILE_BIT);

If no specific profile is requested, the default behavior is the same
as earlier (Core profile will be used).

Tested with X11 (Ubuntu 64 bit) but even though I did implement the
same change to win32 code, I don’t have Windows to try it.

I also (partially) fixed X11_GetWindowWMInfo, now you can actually get
the X11 Window with SDL_GetWindowWMInfo.

Attached “hg export” patch with two commits, please import these.–
Riku Palom?ki
-------------- next part --------------
A non-text attachment was scrubbed…
Name: context_profile.patch
Type: text/x-patch
Size: 5776 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20100504/5a98c680/attachment.bin