summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/wgl/stw_context.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2014-05-20 14:56:41 -0600
committerJosé Fonseca <jfonseca@vmware.com>2014-05-30 18:52:39 +0100
commitbd36cbfa5aa31817a04335a7c364224d0db64428 (patch)
tree272c4198146d3547010f8801b6d4738ee6524f75 /src/gallium/state_trackers/wgl/stw_context.h
parentfa55c2402c11aaccfc30b198b22b136142574a9c (diff)
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
Diffstat (limited to 'src/gallium/state_trackers/wgl/stw_context.h')
-rw-r--r--src/gallium/state_trackers/wgl/stw_context.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_context.h b/src/gallium/state_trackers/wgl/stw_context.h
index e03ceb806e6..c66c166de2e 100644
--- a/src/gallium/state_trackers/wgl/stw_context.h
+++ b/src/gallium/state_trackers/wgl/stw_context.h
@@ -46,8 +46,11 @@ struct stw_context
struct hud_context *hud;
};
-DHGLRC stw_create_context_attribs( HDC hdc, INT iLayerPlane, DHGLRC hShareContext,
- int majorVersion, int minorVersion, int contextFlags, int profileMask );
+DHGLRC stw_create_context_attribs(HDC hdc, INT iLayerPlane,
+ DHGLRC hShareContext,
+ int majorVersion, int minorVersion,
+ int contextFlags, int profileMask,
+ DHGLRC handle);
DHGLRC stw_get_current_context( void );