From c4a43873c5f2e39def45eb9ca24f538adf3f9196 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 5 May 2010 15:14:02 +0100 Subject: [PATCH] wgl: Stub WGL_ARB_pbuffer support. See http://www.opengl.org/registry/specs/ARB/wgl_pbuffer.txt --- src/gallium/state_trackers/wgl/SConscript | 1 + .../wgl/stw_ext_extensionsstring.c | 1 + .../state_trackers/wgl/stw_ext_pbuffer.c | 80 +++++++++++++++++++ .../state_trackers/wgl/stw_getprocaddress.c | 7 ++ 4 files changed, 89 insertions(+) create mode 100644 src/gallium/state_trackers/wgl/stw_ext_pbuffer.c diff --git a/src/gallium/state_trackers/wgl/SConscript b/src/gallium/state_trackers/wgl/SConscript index ec55f042f90..936f5502bc8 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 62c859e1f92..ecb326f1cf6 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 00000000000..0866d41d718 --- /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 + +#define WGL_WGLEXT_PROTOTYPES + +#include +#include + + +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 d43a55fa9e6..b0aef943d30 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 ), -- 2.30.2