Index: trunk/include/VBox/HostServices/VBoxOpenGLSvc.h
===================================================================
--- trunk/include/VBox/HostServices/VBoxOpenGLSvc.h	(revision 3459)
+++ trunk/include/VBox/HostServices/VBoxOpenGLSvc.h	(revision 3460)
@@ -66,4 +66,5 @@
 #define VBOXOGL_FN_GLFLUSH              (2)
 #define VBOXOGL_FN_GLFLUSHPTR           (3)
+#define VBOXOGL_FN_GLCHECKEXT           (4)
 
 /** @} */
@@ -171,4 +172,24 @@
 #define VBOXOGL_CPARMS_GLFLUSHPTR (5)
 
+
+/**
+ * VBOXOGL_FN_GLCHECKEXT
+ */
+
+/** Parameters structure. */
+typedef struct
+{
+    VBoxGuestHGCMCallInfo   hdr;
+
+    /** pointer, in
+     * Extension function name
+     */
+    HGCMFunctionParameter   pszExtFnName;
+
+} VBoxOGLglCheckExt;
+
+/** Number of parameters */
+#define VBOXOGL_CPARMS_GLCHECKEXT (1)
+
 /** @} */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/VBoxOGL.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/VBoxOGL.cpp	(revision 3459)
+++ trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/VBoxOGL.cpp	(revision 3460)
@@ -470,2 +470,33 @@
     return parms.retval.u.value64;
 }
+
+/**
+ * Check if an OpenGL extension is available on the host
+ *
+ * @returns available or not
+ * @param   pszExtFunctionName  
+ */
+bool VBoxIsExtensionAvailable(const char *pszExtFunctionName)
+{
+    PVBOX_OGL_THREAD_CTX pCtx = VBoxOGLGetThreadCtx();
+    VBoxOGLglCheckExt parms;
+
+    AssertReturn(pCtx->pCurrentCmd > pCtx->pCmdBuffer, 0);
+
+    VBOX_INIT_CALL(&parms.hdr, GLCHECKEXT, pCtx);
+
+    parms.pszExtFnName.type                   = VMMDevHGCMParmType_LinAddr_In;
+    parms.pszExtFnName.u.Pointer.size         = strlen(pszExtFunctionName)+1;
+    parms.pszExtFnName.u.Pointer.u.linearAddr = (vmmDevHypPtr)pszExtFunctionName;
+
+    int rc = vboxHGCMCall(vboxOGLCtx.hGuestDrv, &parms, sizeof (parms));
+
+    if (    VBOX_FAILURE(rc)
+        ||  VBOX_FAILURE(parms.hdr.result))
+    {
+        DbgPrintf(("GLCHECKEXT failed with %x %x\n", rc, parms.hdr.result));
+        return false;
+    }
+
+    return true;
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/VBoxOGL.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/VBoxOGL.h	(revision 3459)
+++ trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/VBoxOGL.h	(revision 3460)
@@ -198,4 +198,12 @@
 
 /**
+ * Check if an OpenGL extension is available on the host
+ *
+ * @returns available or not
+ * @param   pszExtFunctionName  
+ */
+bool VBoxIsExtensionAvailable(const char *pszExtFunctionName);
+
+/**
  * Query the specified cached parameter
  * 
Index: trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/drv.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/drv.cpp	(revision 3459)
+++ trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/drv.cpp	(revision 3460)
@@ -64,15 +64,4 @@
 
 
-
-PROC APIENTRY DrvGetProcAddress(LPCSTR lpszProc)
-{
-    PROC pfnProc = GetProcAddress(hDllVBoxOGL, lpszProc);
-    if (pfnProc == NULL)
-        DbgPrintf(("DrvGetProcAddress %s FAILED\n", lpszProc));
-    else
-        DbgPrintf(("DrvGetProcAddress %s\n", lpszProc));
-
-    return pfnProc;
-}
 
 BOOL APIENTRY DrvValidateVersion(DWORD version)
Index: trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/glext.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/glext.cpp	(revision 3459)
+++ trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/glext.cpp	(revision 3460)
@@ -25,5 +25,70 @@
 
 #include "VBoxOGL.h"
+#define WGL_WGLEXT_PROTOTYPES
 #include <VBox/HostServices/wglext.h>
+
+typedef struct
+{
+    const char *pszExtName;
+    const char *pszExtFunctionName;
+    RTUINTPTR   pfnFunction;
+    bool        fAvailable;
+} OPENGL_EXT, *POPENGL_EXT;
+
+static OPENGL_EXT OpenGLExtensions[] = 
+{
+    {   "WGL_EXT_swap_control",             "wglSwapIntervalEXT",               (RTUINTPTR)wglSwapIntervalEXT,                      false },
+    {   "WGL_EXT_swap_control",             "wglGetSwapIntervalEXT",            (RTUINTPTR)wglGetSwapIntervalEXT,                   false },
+};
+
+
+int vboxInitOpenGLExtensions()
+{
+    const GLubyte *pszExtensions = glGetString(GL_EXTENSIONS);
+
+    for (int i=0;i<RT_ELEMENTS(OpenGLExtensions);i++)
+    {
+        if (strstr((char *)pszExtensions, OpenGLExtensions[i].pszExtFunctionName))
+            OpenGLExtensions[i].fAvailable = VBoxIsExtensionAvailable(OpenGLExtensions[i].pszExtFunctionName);
+    }
+    return VINF_SUCCESS;
+}
+
+
+PROC APIENTRY DrvGetProcAddress(LPCSTR lpszProc)
+{
+    PROC pfnProc;
+
+    for (int i=0;i<RT_ELEMENTS(OpenGLExtensions);i++)
+    {
+        if (    OpenGLExtensions[i].fAvailable
+            && !strcmp(OpenGLExtensions[i].pszExtFunctionName, lpszProc))
+        {
+            pfnProc = (PROC)OpenGLExtensions[i].pfnFunction;
+        }
+    }
+    if (pfnProc == NULL)
+        DbgPrintf(("DrvGetProcAddress %s FAILED\n", lpszProc));
+    else
+        DbgPrintf(("DrvGetProcAddress %s\n", lpszProc));
+
+    return pfnProc;
+}
+
+BOOL WINAPI wglSwapIntervalEXT(int interval)
+{
+    VBOX_OGL_GEN_SYNC_OP1_RET(BOOL, wglSwapIntervalEXT, interval);
+    return retval;
+}
+
+int WINAPI wglGetSwapIntervalEXT(void)
+{
+    VBOX_OGL_GEN_SYNC_OP_RET(int, wglGetSwapIntervalEXT);
+    return retval;
+}
+
+
+
+
 
 #if 0
@@ -104,18 +169,4 @@
  GL_WIN_swap_hint 
  WGL_EXT_extensions_string 
- WGL_EXT_swap_control 
 #endif
 
-
-BOOL WINAPI wglSwapIntervalEXT(int interval)
-{
-    VBOX_OGL_GEN_SYNC_OP1_RET(BOOL, wglSwapIntervalEXT, interval);
-    return retval;
-}
-
-int WINAPI wglGetSwapIntervalEXT(void)
-{
-    VBOX_OGL_GEN_SYNC_OP_RET(int, wglGetSwapIntervalEXT);
-    return retval;
-}
-
Index: trunk/src/VBox/HostServices/SharedOpenGL/gldrv.h
===================================================================
--- trunk/src/VBox/HostServices/SharedOpenGL/gldrv.h	(revision 3459)
+++ trunk/src/VBox/HostServices/SharedOpenGL/gldrv.h	(revision 3460)
@@ -150,3 +150,5 @@
 void vboxglDrvSwapBuffers(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
 
+bool vboxDrvIsExtensionAvailable(char *pszExtFunctionName);
+
 #endif /* __VBOXGLWIN__H */
Index: trunk/src/VBox/HostServices/SharedOpenGL/gllindrv.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedOpenGL/gllindrv.cpp	(revision 3459)
+++ trunk/src/VBox/HostServices/SharedOpenGL/gllindrv.cpp	(revision 3460)
@@ -216,2 +216,8 @@
     pClient->lastretval = 0; /** @todo */
 }
+
+bool vboxDrvIsExtensionAvailable(char *pszExtFunctionName)
+{
+    return false;
+}
+
Index: trunk/src/VBox/HostServices/SharedOpenGL/glwindrv.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedOpenGL/glwindrv.cpp	(revision 3459)
+++ trunk/src/VBox/HostServices/SharedOpenGL/glwindrv.cpp	(revision 3460)
@@ -416,2 +416,7 @@
         ReleaseDC(0, pClient->hdc);
 }
+
+bool vboxDrvIsExtensionAvailable(char *pszExtFunctionName)
+{
+    return !!wglGetProcAddress(pszExtFunctionName);
+}
Index: trunk/src/VBox/HostServices/SharedOpenGL/service.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedOpenGL/service.cpp	(revision 3459)
+++ trunk/src/VBox/HostServices/SharedOpenGL/service.cpp	(revision 3460)
@@ -257,4 +257,49 @@
         } 
 
+        case VBOXOGL_FN_GLCHECKEXT:
+        {
+            Log(("svcCall: VBOXOGL_FN_GLCHECKEXT\n"));
+
+            /* Verify parameter count and types. */
+            if (cParms != VBOXOGL_CPARMS_GLCHECKEXT)
+            {
+                rc = VERR_INVALID_PARAMETER;
+            }
+            else 
+            if (    paParms[0].type != VBOX_HGCM_SVC_PARM_PTR       /* pszExtFnName */
+               )
+            {
+                rc = VERR_INVALID_PARAMETER;
+            }
+            else
+            {
+                /* Fetch parameters. */
+                char    *pszExtFnName = (char *)paParms[0].u.pointer.addr;
+                uint32_t cbExtFnName  = paParms[0].u.pointer.size;
+
+                /* sanity checks */
+                if (    cbExtFnName > 256
+                    ||  pszExtFnName[cbExtFnName-1] != 0
+                   )
+                {
+                    rc = VERR_INVALID_PARAMETER;
+                }
+                else
+                {
+                    /* Execute the function. */
+                    if (vboxDrvIsExtensionAvailable(pszExtFnName))
+                        rc = VINF_SUCCESS;
+                    else
+                        rc = VERR_FILE_NOT_FOUND;
+
+                    if (VBOX_SUCCESS(rc))
+                    {
+                        /* Update parameters.*/
+                    }
+                }
+            }
+            break;
+        } 
+
         default:
         {
