wgl: Stub WGL_ARB_pbuffer support.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 5 May 2010 14:14:02 +0000 (15:14 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 30 Nov 2010 10:47:49 +0000 (10:47 +0000)
See http://www.opengl.org/registry/specs/ARB/wgl_pbuffer.txt

src/gallium/state_trackers/wgl/SConscript
src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c
src/gallium/state_trackers/wgl/stw_ext_pbuffer.c [new file with mode: 0644]
src/gallium/state_trackers/wgl/stw_getprocaddress.c

index ec55f042f909f5a02a55bc0e02b60af27906e23e..936f5502bc8943c19689d61961ca4a928bd5b16e 100644 (file)
@@ -22,6 +22,7 @@ sources = [
     'stw_device.c',
     'stw_ext_extensionsstring.c',
     'stw_ext_gallium.c',
+    'stw_ext_pbuffer.c',
     'stw_ext_pixelformat.c',
     'stw_ext_swapinterval.c',
     'stw_framebuffer.c',
index 62c859e1f92cc0601d707e66b0d6086686ec8788..ecb326f1cf6c9dcb6ef6660ba0a909cebb1184bf 100644 (file)
@@ -37,6 +37,7 @@
 static const char *stw_extension_string = 
    "WGL_ARB_extensions_string "
    "WGL_ARB_multisample "
+   "WGL_ARB_pbuffer "
    "WGL_ARB_pixel_format "
 /*   "WGL_EXT_swap_interval " */
    "WGL_EXT_extensions_string";
diff --git a/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c b/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
new file mode 100644 (file)
index 0000000..0866d41
--- /dev/null
@@ -0,0 +1,80 @@
+/**************************************************************************
+ * 
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ **************************************************************************/
+
+#include <windows.h>
+
+#define WGL_WGLEXT_PROTOTYPES
+
+#include <GL/gl.h>
+#include <GL/wglext.h>
+
+
+HPBUFFERARB WINAPI
+wglCreatePbufferARB(HDC hDC,
+                    int iPixelFormat,
+                    int iWidth,
+                    int iHeight,
+                    const int *piAttribList)
+{
+   /* FIXME */
+   return NULL;
+}
+
+
+HDC WINAPI
+wglGetPbufferDCARB(HPBUFFERARB hPbuffer)
+{
+   /* FIXME */
+   return NULL;
+}
+
+
+int WINAPI
+wglReleasePbufferDCARB(HPBUFFERARB hPbuffer,
+                       HDC hDC)
+{
+   /* FIXME */
+   return 0;
+}
+
+
+BOOL WINAPI
+wglDestroyPbufferARB(HPBUFFERARB hPbuffer)
+{
+   /* FIXME */
+   return FALSE;
+}
+
+
+BOOL WINAPI
+wglQueryPbufferARB(HPBUFFERARB hPbuffer,
+                   int iAttribute,
+                   int *piValue)
+{
+   /* FIXME */
+   return FALSE;
+}
index d43a55fa9e603ed45859eab9dc5943a0bb88a05c..b0aef943d30b03e5fd39d6facd57ed58ea8f60e4 100644 (file)
@@ -50,6 +50,13 @@ static const struct stw_extension_entry stw_extension_entries[] = {
    /* WGL_ARB_extensions_string */
    STW_EXTENSION_ENTRY( wglGetExtensionsStringARB ),
 
+   /* WGL_ARB_pbuffer */
+   STW_EXTENSION_ENTRY( wglCreatePbufferARB ),
+   STW_EXTENSION_ENTRY( wglGetPbufferDCARB ),
+   STW_EXTENSION_ENTRY( wglReleasePbufferDCARB ),
+   STW_EXTENSION_ENTRY( wglDestroyPbufferARB ),
+   STW_EXTENSION_ENTRY( wglQueryPbufferARB ),
+
    /* WGL_ARB_pixel_format */
    STW_EXTENSION_ENTRY( wglChoosePixelFormatARB ),
    STW_EXTENSION_ENTRY( wglGetPixelFormatAttribfvARB ),