diff options
author | marha <marha@users.sourceforge.net> | 2013-12-22 12:51:45 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-12-22 12:51:45 +0100 |
commit | c81020559f329a516191927222b3698ba7370aca (patch) | |
tree | 6f004f5723ca41881b2ba703ed619a92faebfe16 /xorg-server/hw/xwin/glx/glwrap.c | |
parent | c043f97a8572e1f509251288d8bcd70d0fb96770 (diff) | |
download | vcxsrv-c81020559f329a516191927222b3698ba7370aca.tar.gz vcxsrv-c81020559f329a516191927222b3698ba7370aca.tar.bz2 vcxsrv-c81020559f329a516191927222b3698ba7370aca.zip |
libxtrans fontconfig glproto libX11 libxcb xcbproto mesa xserver pixman xkeyboard-config git update 22 Dec 2013
xserver commit a68df147421da21528b5be2d34678383922fa352
libxcb commit f653464554469b5767f1c99abced25a76bace047
libxcb/xcb-proto commit 4087fc682c5ceb849b74442e17a6b73176e5eecb
xkeyboard-config commit a224a636139d22e1dc7ca7d23782cd656e87bcf5
libX11 commit 3d69b0a83e62f8f6fbdd952fc49cdbdf8825e1e6
libXdmcp commit 089081dca4ba3598c6f9bf401c029378943b5854
libXext commit bb24f2970f2e425f4df90c9b73d078ad15a73fbb
libfontenc commit 3acba630d8b57084f7e92c15732408711ed5137a
libXinerama commit edd95182b26eb5d576d4878c559e0f17dddaa909
libXau commit 304a11be4727c5a7feeb2501e8e001466f8ce84e
xkbcomp commit e3e6e938535532bfad175c1635256ab7fb3ac943
pixman commit 945ab7a6f3eb6241f07e8f094dc0e647d1f10d9d
xextproto commit 3f355f138d6df57e067458a20f47307883048adb
randrproto commit e7526e6b5fe0966929cda10b2ded0258413744db
glproto commit f84853d97d5749308992412a215fa518b6536eb3
mkfontscale commit 880a0c4733e62e54e6a0f1238c7430727d23657b
xwininfo commit ba0d1b0da21d2dbdd81098ed5778f3792b472e13
libXft commit 4acfdaf95adb0a05c2a25550bdde036c865902f4
libXmu commit 22d9c590901e121936f50dee97dc60c4f7defb63
libxtrans commit 2c0a7840a28ae696e80e73157856d7a049fdf6c7
fontconfig commit 5c725f2f5829238d16116f782d00d8bb0defaf08
mesa commit 2efe7927d38983029784825fc4897e9b77aa237e
Diffstat (limited to 'xorg-server/hw/xwin/glx/glwrap.c')
-rw-r--r-- | xorg-server/hw/xwin/glx/glwrap.c | 146 |
1 files changed, 0 insertions, 146 deletions
diff --git a/xorg-server/hw/xwin/glx/glwrap.c b/xorg-server/hw/xwin/glx/glwrap.c deleted file mode 100644 index 73cff3cc1..000000000 --- a/xorg-server/hw/xwin/glx/glwrap.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * File: glwrap.c - * Purpose: Wrapper functions for Win32 OpenGL functions - * - * Authors: Alexander Gottwald - * Jon TURNEY - * - * Copyright (c) Jon TURNEY 2009 - * Copyright (c) Alexander Gottwald 2004 - * - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. - */ - -// define USE_OPENGL32 makes gl.h declare gl*() function prototypes with stdcall linkage, -// so our generated wrappers will correctly link with the functions in opengl32.dll -#define USE_OPENGL32 - -#ifdef HAVE_XWIN_CONFIG_H -#include <xwin-config.h> -#endif - -#include <X11/Xwindows.h> -#include <GL/gl.h> -#include <GL/glext.h> -#include <glx/glxserver.h> -#include <glx/glxext.h> -#include <glx/glapi.h> -#include <glx/dispatch.h> -#include <glwindows.h> - -static unsigned int glWinIndirectProcCalls = 0; -static unsigned int glWinDirectProcCalls = 0; - -void -glWinCallDelta(void) -{ - static unsigned int glWinIndirectProcCallsLast = 0; - static unsigned int glWinDirectProcCallsLast = 0; - - if ((glWinIndirectProcCalls != glWinIndirectProcCallsLast) || - (glWinDirectProcCalls != glWinDirectProcCallsLast)) { - if (glxWinDebugSettings.enableTrace) { - ErrorF("after %d direct and %d indirect GL calls\n", - glWinDirectProcCalls - glWinDirectProcCallsLast, - glWinIndirectProcCalls - glWinIndirectProcCallsLast); - } - glWinDirectProcCallsLast = glWinDirectProcCalls; - glWinIndirectProcCallsLast = glWinIndirectProcCalls; - } -} - -static PROC -glWinResolveHelper(PROC * cache, const char *symbol) -{ - PROC proc = NULL; - - /* If not yet cached, call wglGetProcAddress */ - if ((*cache) == NULL) { - proc = wglGetProcAddress(symbol); - if (proc == NULL) { - ErrorF("glwrap: Can't resolve \"%s\"\n", symbol); - (*cache) = (PROC) - 1; - } - else { - ErrorF("glwrap: Resolved \"%s\"\n", symbol); - (*cache) = proc; - } - } - /* Cached wglGetProcAddress failure */ - else if ((*cache) == (PROC) - 1) { - proc = 0; - } - /* Cached wglGetProcAddress result */ - else { - proc = (*cache); - } - - return proc; -} - -#define RESOLVE_RET(proctype, symbol, retval) \ - static PROC cache = NULL; \ - __stdcall proctype proc = (proctype)glWinResolveHelper(&cache, symbol); \ - if (proc == NULL) { \ - __glXErrorCallBack(0); \ - return retval; \ - } \ - glWinIndirectProcCalls++; - -#define RESOLVE(proctype, symbol) RESOLVE_RET(proctype, symbol,) - -#define RESOLVED_PROC(proctype) proc - -/* - Include generated cdecl wrappers for stdcall gl*() functions in opengl32.dll - - OpenGL 1.2 and upward is treated as extensions, function address must - found using wglGetProcAddress(), but also stdcall so still need wrappers... - - Include generated dispatch table setup function -*/ - -#include "generated_gl_wrappers.c" - -/* - Special non-static wrapper for glGetString for debug output -*/ - -const GLubyte * -glGetStringWrapperNonstatic(GLenum name) -{ - return glGetString(name); -} - -/* - Special non-static wrapper for glAddSwapHintRectWIN for copySubBuffers -*/ - -typedef void (__stdcall * PFNGLADDSWAPHINTRECTWIN) (GLint x, GLint y, - GLsizei width, - GLsizei height); - -void -glAddSwapHintRectWINWrapperNonstatic(GLint x, GLint y, GLsizei width, - GLsizei height) -{ - RESOLVE(PFNGLADDSWAPHINTRECTWIN, "glAddSwapHintRectWIN"); - proc(x, y, width, height); -} |