Mesa (master): wgl: Stub WGL_ARB_pbuffer support.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Nov 30 10:53:53 UTC 2010


Module: Mesa
Branch: master
Commit: c4a43873c5f2e39def45eb9ca24f538adf3f9196
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c4a43873c5f2e39def45eb9ca24f538adf3f9196

Author: José Fonseca <jfonseca at vmware.com>
Date:   Wed May  5 15:14:02 2010 +0100

wgl: Stub WGL_ARB_pbuffer support.

See http://www.opengl.org/registry/specs/ARB/wgl_pbuffer.txt

---

 src/gallium/state_trackers/wgl/SConscript          |    1 +
 .../state_trackers/wgl/stw_ext_extensionsstring.c  |    1 +
 src/gallium/state_trackers/wgl/stw_ext_pbuffer.c   |   80 ++++++++++++++++++++
 .../state_trackers/wgl/stw_getprocaddress.c        |    7 ++
 4 files changed, 89 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/wgl/SConscript b/src/gallium/state_trackers/wgl/SConscript
index ec55f04..936f550 100644
--- a/src/gallium/state_trackers/wgl/SConscript
+++ b/src/gallium/state_trackers/wgl/SConscript
@@ -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',
diff --git a/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c b/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c
index 62c859e..ecb326f 100644
--- a/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c
+++ b/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c
@@ -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
index 0000000..0866d41
--- /dev/null
+++ b/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
@@ -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;
+}
diff --git a/src/gallium/state_trackers/wgl/stw_getprocaddress.c b/src/gallium/state_trackers/wgl/stw_getprocaddress.c
index d43a55f..b0aef94 100644
--- a/src/gallium/state_trackers/wgl/stw_getprocaddress.c
+++ b/src/gallium/state_trackers/wgl/stw_getprocaddress.c
@@ -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 ),




More information about the mesa-commit mailing list