diff options
author | marha <marha@users.sourceforge.net> | 2014-01-15 21:37:10 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-15 21:37:10 +0100 |
commit | b7f01cb1f6cfd1ec301f650a073436c91ec614aa (patch) | |
tree | 1dbf32344313ad7e5884e6686251cad398a231fa /mesalib/src/hgl/GLDispatcher.cpp | |
parent | 7b4b94b4449aec056c4c92f5cacc2f89a292a80e (diff) | |
parent | 1b0fcca503ae9cf2d462b60770f96c794dfbb27a (diff) | |
download | vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.gz vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.bz2 vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
mesa xkeyboard-config xserver git update 15 jan 2014
randrproto libfontenc mesa xserver git update 10 Jan 2014
randsrproto fontconfig libX11 git update 6 Jan 2014
Conflicts:
mesalib/src/glsl/builtin_functions.cpp
mesalib/src/glsl/ir_builder.h
xorg-server/Xext/xres.c
xorg-server/dix/dispatch.c
xorg-server/dix/dixfonts.c
xorg-server/hw/xwin/wingc.c
xorg-server/hw/xwin/winwindowswm.c
xorg-server/include/gc.h
xorg-server/os/access.c
Diffstat (limited to 'mesalib/src/hgl/GLDispatcher.cpp')
-rw-r--r-- | mesalib/src/hgl/GLDispatcher.cpp | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/mesalib/src/hgl/GLDispatcher.cpp b/mesalib/src/hgl/GLDispatcher.cpp new file mode 100644 index 000000000..46b91d57c --- /dev/null +++ b/mesalib/src/hgl/GLDispatcher.cpp @@ -0,0 +1,72 @@ +/* + * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. + * Copyright 2000-2012 Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Brian Paul <brian.e.paul@gmail.com> + * Philippe Houdoin <philippe.houdoin@free.fr> + * Alexander von Gluck IV <kallisti5@unixzen.com> + */ + + +extern "C" { +#include "glapi/glapi.h" +#include "glapi/glapi_priv.h" + +/* + * NOTE: this file portion implements C-based dispatch of the OpenGL entrypoints + * (glAccum, glBegin, etc). + * This code IS NOT USED if we're compiling on an x86 system and using + * the glapi_x86.S assembly code. + */ +#if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM)) + +#define KEYWORD1 PUBLIC +#define KEYWORD2 +#define NAME(func) gl##func + +#define DISPATCH(func, args, msg) \ + const struct _glapi_table* dispatch; \ + dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\ + (dispatch->func) args + +#define RETURN_DISPATCH(func, args, msg) \ + const struct _glapi_table* dispatch; \ + dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\ + return (dispatch->func) args + +#endif +} + + +/* NOTE: this file portion implement a thin OpenGL entrypoints dispatching + C++ wrapper class + */ + +#include "GLDispatcher.h" + +BGLDispatcher::BGLDispatcher() +{ +} + + +BGLDispatcher::~BGLDispatcher() +{ +} + + +status_t +BGLDispatcher::CheckTable(const struct _glapi_table* table) +{ + _glapi_check_table(table ? table : _glapi_get_dispatch()); + return B_OK; +} + + +status_t +BGLDispatcher::SetTable(struct _glapi_table* table) +{ + _glapi_set_dispatch(table); + return B_OK; +} |