Roderick Colenbrander : wgl: Add support for WGL_ARB_create_context_profile which is required for OpenGL 3 .2.

Alexandre Julliard julliard at winehq.org
Thu Nov 19 10:15:17 CST 2009


Module: wine
Branch: master
Commit: 9a8542638989c6ced3393e8a225810eff59a26da
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9a8542638989c6ced3393e8a225810eff59a26da

Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date:   Tue Nov 17 11:50:25 2009 +0100

wgl: Add support for WGL_ARB_create_context_profile which is required for OpenGL 3.2.

---

 dlls/winex11.drv/opengl.c |    7 +++++++
 include/wine/wgl.h        |    9 +++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index de56bd9..19e3fe3 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -2249,6 +2249,10 @@ HGLRC X11DRV_wglCreateContextAttribsARB(X11DRV_PDEVICE *physDev, HGLRC hShareCon
                     pContextAttribList[0] = GLX_CONTEXT_FLAGS_ARB;
                     pContextAttribList[1] = pAttribList[1];
                     break;
+                case WGL_CONTEXT_PROFILE_MASK_ARB:
+                    pContextAttribList[0] = GLX_CONTEXT_PROFILE_MASK_ARB;
+                    pContextAttribList[1] = pAttribList[1];
+                    break;
                 default:
                     ERR("Unhandled attribList pair: %#x %#x\n", pAttribList[0], pAttribList[1]);
             }
@@ -3540,6 +3544,9 @@ static void X11DRV_WineGL_LoadExtensions(void)
     if(glxRequireExtension("GLX_ARB_create_context"))
     {
         register_extension(&WGL_ARB_create_context);
+
+        if(glxRequireExtension("GLX_ARB_create_context_profile"))
+            register_extension_string("WGL_ARB_create_context_profile");
     }
 
     if(glxRequireExtension("GLX_ARB_fbconfig_float"))
diff --git a/include/wine/wgl.h b/include/wine/wgl.h
index a102109..7a99de2 100644
--- a/include/wine/wgl.h
+++ b/include/wine/wgl.h
@@ -200,7 +200,11 @@
 #define WGL_CONTEXT_MINOR_VERSION_ARB  0x2092
 #define WGL_CONTEXT_LAYER_PLANE_ARB    0x2093
 #define WGL_CONTEXT_FLAGS_ARB          0x2094
+#define WGL_CONTEXT_PROFILE_MASK_ARB   0x9126
+#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB    0x00000001
+#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
 #define ERROR_INVALID_VERSION_ARB      0x2095
+#define ERROR_INVALID_PROFILE_ARB      0x2096
 #ifndef GLX_ARB_create_context
 #define GLX_CONTEXT_DEBUG_BIT_ARB          0x00000001
 #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
@@ -208,6 +212,11 @@
 #define GLX_CONTEXT_MINOR_VERSION_ARB      0x2092
 #define GLX_CONTEXT_FLAGS_ARB              0x2094
 #endif
+#ifndef GLX_ARB_create_context_profile
+#define GLX_CONTEXT_PROFILE_MASK_ARB       0x9126
+#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB   0x00000001
+#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
+#endif
 
 /** 
  * WGL_ATI_pixel_format_float / WGL_ARB_color_buffer_float




More information about the wine-cvs mailing list