st/wgl: fix implementation of wglCreateContextAttribsARB()
authorBrian Paul <brianp@vmware.com>
Tue, 20 May 2014 20:56:41 +0000 (14:56 -0600)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 30 May 2014 17:52:39 +0000 (18:52 +0100)
commitbd36cbfa5aa31817a04335a7c364224d0db64428
tree272c4198146d3547010f8801b6d4738ee6524f75
parentfa55c2402c11aaccfc30b198b22b136142574a9c
st/wgl: fix implementation of wglCreateContextAttribsARB()

wglCreateContextAttribsARB() didn't work previously since it returned
a context ID that wasn't allocated by OPENGL32.DLL.  So if that context
ID was later passed to wglMakeCurrent(), etc. it was rejected.

Now when wglCreateContextAttribsARB() is called we actually call
wglCreateContext() in order to get a valid context ID.  Then we
replace the context data which was created with new context data
which reflects the arguments passed to wglCreateContextAttribsARB().

If there were a DrvCreateContextAttribs() function in the ICD this
work-around wouldn't be necessary.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Conflicts:
src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c
src/gallium/state_trackers/wgl/stw_getprocaddress.c
src/gallium/state_trackers/wgl/stw_context.c
src/gallium/state_trackers/wgl/stw_context.h
src/gallium/state_trackers/wgl/stw_ext_context.c