Jacob Moen avatar Jacob Moen committed c678a5b

Upgrading to AntTweakBar 1.14

Comments (0)

Files changed (29)

 --- TwOgre License ---
 
 Copyright (c) 2007, Casey Borders, Moo Productions
+Copyright (c) 2009 - 2011, Jacob 'jacmoe' Moen
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 
 --- AntTweakBar license ---
 
-Copyright Š 2005, 2006 Philippe Decaudin
+Copyright (C) 2005-2011 Philippe Decaudin
 
 This software is provided 'as-is', without any express or implied warranty. 
-In no event will the authors be held liable for any damages arising from 
-the use of this software.
+In no event will the authors be held liable for any damages arising from the
+use of this software.
 
-Permission is granted to anyone to use this software for any purpose, 
-including commercial applications, and to alter it and redistribute it freely, 
-subject to the following restrictions:
+Permission is granted to anyone to use this software for any purpose, including
+commercial applications, and to alter it and redistribute it freely, subject to
+the following restrictions:
 
 1. The origin of this software must not be misrepresented; you must not claim 
 that you wrote the original software. If you use this software in a product, 
-an acknowledgment in the product documentation would be appreciated.
+an acknowledgment in the product documentation would be appreciated but is not 
+required.
 
 2. Altered source versions must be plainly marked as such, and must not be 
 misrepresented as being the original software.
 
 
 http://www.antisphere.com 
-

include/AntPerfTimer.h

-//  ---------------------------------------------------------------------------
-//
-//  @file       AntPerfTimer.h
-//  @brief      A performance (precision) timer for benchs
-//  @author     Philippe Decaudin - http://www.antisphere.com
-//  @license    This file is part of the AntTweakBar library.
-//              For conditions of distribution and use, see License.txt
-//
-//  notes:      TAB=4
-//              No cpp file is needed, everything is defined in this header
-//
-//  ---------------------------------------------------------------------------
-
-#if !defined ANT_PERF_TIMER_INCLUDED
-#define ANT_PERF_TIMER_INCLUDED
-
-#ifndef  __cplusplus
-#   error This is a C++ header
-#endif  // __cplusplus
-
-
-#if defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN64)
-
-    #include <windows.h>
-    #include <tchar.h>
-
-    struct PerfTimer
-    {
-        inline        PerfTimer()   { if( !QueryPerformanceFrequency(&Freq) ) MessageBox(NULL, _T("Precision timer not supported"), _T("Problem"), MB_ICONEXCLAMATION); Reset(); }
-        inline void   Reset()       { QueryPerformanceCounter(&Start); }
-        inline double GetTime()     { if( QueryPerformanceCounter(&End) ) return ((double)End.QuadPart - (double)Start.QuadPart)/((double)Freq.QuadPart); else return 0; }
-    protected:
-        LARGE_INTEGER Start, End, Freq;
-    };
-
-#else // !_WIN (-> LINUX)
-
-    #include <sys/time.h>
-    #include <unistd.h>
-
-    struct PerfTimer
-    {
-        inline        PerfTimer()   { Reset(); }
-        inline void   Reset()       { gettimeofday(&Start, &TZ); }
-        inline double GetTime()     { gettimeofday(&End,&TZ); 
-                                      double t1 = (double)Start.tv_sec + (double)Start.tv_usec/(1000*1000);
-                                      double t2 = (double)End.tv_sec + (double)End.tv_usec/(1000*1000);
-                                      return t2-t1; }
-    protected:
-        struct timeval Start, End;
-        struct timezone TZ;
-    };
-
-#endif // _WIN
-
-
-#endif // ANT_PERF_TIMER_INCLUDED
+//  ---------------------------------------------------------------------------
+//
+//  @file       AntPerfTimer.h
+//  @brief      A performance (precision) timer for benchs
+//  @author     Philippe Decaudin - http://www.antisphere.com
+//  @license    This file is part of the AntTweakBar library.
+//              For conditions of distribution and use, see License.txt
+//
+//  note:       No cpp file is needed, everything is defined in this header
+//
+//  ---------------------------------------------------------------------------
+
+#if !defined ANT_PERF_TIMER_INCLUDED
+#define ANT_PERF_TIMER_INCLUDED
+
+#ifndef  __cplusplus
+#   error This is a C++ header
+#endif  // __cplusplus
+
+
+#if defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN64)
+
+    #include <windows.h>
+    #include <tchar.h>
+
+    struct PerfTimer
+    {
+        inline        PerfTimer()   { if( !QueryPerformanceFrequency(&Freq) ) MessageBox(NULL, _T("Precision timer not supported"), _T("Problem"), MB_ICONEXCLAMATION); Reset(); }
+        inline void   Reset()       { QueryPerformanceCounter(&Start); }
+        inline double GetTime()     { if( QueryPerformanceCounter(&End) ) return ((double)End.QuadPart - (double)Start.QuadPart)/((double)Freq.QuadPart); else return 0; }
+    protected:
+        LARGE_INTEGER Start, End, Freq;
+    };
+
+#else // !_WIN (-> LINUX)
+
+    #include <sys/time.h>
+    #include <unistd.h>
+
+    struct PerfTimer
+    {
+        inline        PerfTimer()   { Reset(); }
+        inline void   Reset()       { gettimeofday(&Start, &TZ); }
+        inline double GetTime()     { gettimeofday(&End,&TZ); 
+                                      double t1 = (double)Start.tv_sec + (double)Start.tv_usec/(1000*1000);
+                                      double t2 = (double)End.tv_sec + (double)End.tv_usec/(1000*1000);
+                                      return t2-t1; }
+    protected:
+        struct timeval Start, End;
+        struct timezone TZ;
+    };
+
+#endif // _WIN
+
+
+#endif // ANT_PERF_TIMER_INCLUDED

include/AntTweakBar.h

-// ----------------------------------------------------------------------------
-//
-//  @file       AntTweakBar.h
-//
-//  @brief      AntTweakBar is a light and intuitive graphical user interface 
-//              that can be readily integrated into OpenGL and DirectX 
-//              applications in order to interactively tweak them.
-//
-//  @author     Philippe Decaudin - http://www.antisphere.com
-//  @date       2005/09/20
-//
-//  @doc        http://www.antisphere.com/Wiki/tools:anttweakbar
-//
-//  @license    This file is part of the AntTweakBar library.
-//              AntTweakBar is a free software released under the zlib license.
-//              For conditions of distribution and use, see License.txt
-//
-// ----------------------------------------------------------------------------
-
-
-#if !defined TW_INCLUDED
-#define TW_INCLUDED
-
-#include <stddef.h>
-
-#define TW_VERSION  113 // Version Mmm : M=Major mm=minor (e.g., 102 is version 1.02)
-
-
-#ifdef  __cplusplus
-#   if defined(_MSC_VER)
-#       pragma warning(push)
-#       pragma warning(disable: 4995 4530)
-#       include <string>
-#       pragma warning(pop)
-#   else
-#       include <string>
-#   endif
-    extern "C" {
-#endif  // __cplusplus
-
-
-// ----------------------------------------------------------------------------
-//  OS specific definitions
-// ----------------------------------------------------------------------------
-
-#   define TW_CALL
-#   define TW_EXPORT_API
-#   define TW_IMPORT_API
-
-#   define TW_API
-
-
-// ----------------------------------------------------------------------------
-//  Bar functions and definitions
-// ----------------------------------------------------------------------------
-
-typedef struct CTwBar TwBar; // structure CTwBar is not exposed.
-
-TW_API TwBar *      TW_CALL TwNewBar(const char *barName);
-TW_API int          TW_CALL TwDeleteBar(TwBar *bar);
-TW_API int          TW_CALL TwDeleteAllBars();
-TW_API int          TW_CALL TwSetTopBar(const TwBar *bar);
-TW_API TwBar *      TW_CALL TwGetTopBar();
-TW_API int          TW_CALL TwSetBottomBar(const TwBar *bar);
-TW_API TwBar *      TW_CALL TwGetBottomBar();
-TW_API const char * TW_CALL TwGetBarName(TwBar *bar);
-TW_API int          TW_CALL TwGetBarCount();
-TW_API TwBar *      TW_CALL TwGetBarByIndex(int barIndex);
-TW_API TwBar *      TW_CALL TwGetBarByName(const char *barName);
-TW_API int          TW_CALL TwRefreshBar(TwBar *bar);
-
-
-// ----------------------------------------------------------------------------
-//  Var functions and definitions
-// ----------------------------------------------------------------------------
-
-typedef enum ETwType
-{
-    TW_TYPE_UNDEF   = 0,
-#ifdef __cplusplus
-    TW_TYPE_BOOLCPP = 1,
-#endif // __cplusplus
-    TW_TYPE_BOOL8   = 2,
-    TW_TYPE_BOOL16,
-    TW_TYPE_BOOL32,
-    TW_TYPE_CHAR,
-    TW_TYPE_INT8,
-    TW_TYPE_UINT8,
-    TW_TYPE_INT16,
-    TW_TYPE_UINT16,
-    TW_TYPE_INT32,
-    TW_TYPE_UINT32,
-    TW_TYPE_FLOAT,
-    TW_TYPE_DOUBLE,
-    TW_TYPE_COLOR32,    // 32 bits color. Order is RGBA if API is OpenGL or Direct3D10, and inversed if API is Direct3D9 (can be modified by defining 'colorOrder=...', see doc)
-    TW_TYPE_COLOR3F,    // 3 floats color. Order is RGB.
-    TW_TYPE_COLOR4F,    // 4 floats color. Order is RGBA.
-    TW_TYPE_CDSTRING,   // Null-terminated C Dynamic String (pointer to an array of char dynamically allocated with malloc/realloc/strdup)
-#ifdef __cplusplus
-    TW_TYPE_STDSTRING = (0x2fff0000+sizeof(std::string)),  // C++ STL string (std::string)
-#endif // __cplusplus
-    TW_TYPE_QUAT4F = TW_TYPE_CDSTRING+2, // 4 floats encoding a quaternion {qx,qy,qz,qs}
-    TW_TYPE_QUAT4D,     // 4 doubles encoding a quaternion {qx,qy,qz,qs}
-    TW_TYPE_DIR3F,      // direction vector represented by 3 floats
-    TW_TYPE_DIR3D       // direction vector represented by 3 doubles
-} TwType;
-#define TW_TYPE_CSSTRING(n) ((TwType)(0x30000000+((n)&0xfffffff))) // Null-terminated C Static String of size n (defined as char[n], with n<2^28)
-
-typedef void (TW_CALL * TwSetVarCallback)(const void *value, void *clientData);
-typedef void (TW_CALL * TwGetVarCallback)(void *value, void *clientData);
-typedef void (TW_CALL * TwButtonCallback)(void *clientData);
-
-TW_API int      TW_CALL TwAddVarRW(TwBar *bar, const char *name, TwType type, void *var, const char *def);
-TW_API int      TW_CALL TwAddVarRO(TwBar *bar, const char *name, TwType type, const void *var, const char *def);
-TW_API int      TW_CALL TwAddVarCB(TwBar *bar, const char *name, TwType type, TwSetVarCallback setCallback, TwGetVarCallback getCallback, void *clientData, const char *def);
-TW_API int      TW_CALL TwAddButton(TwBar *bar, const char *name, TwButtonCallback callback, void *clientData, const char *def);
-TW_API int      TW_CALL TwAddSeparator(TwBar *bar, const char *name, const char *def);
-TW_API int      TW_CALL TwRemoveVar(TwBar *bar, const char *name);
-TW_API int      TW_CALL TwRemoveAllVars(TwBar *bar);
-
-typedef struct CTwEnumVal
-{
-    int           Value;
-    const char *  Label;
-} TwEnumVal;
-typedef struct CTwStructMember
-{
-    const char *  Name;
-    TwType        Type;
-    size_t        Offset;
-    const char *  DefString;
-} TwStructMember;
-typedef void (TW_CALL * TwSummaryCallback)(char *summaryString, size_t summaryMaxLength, const void *value, void *clientData);
-
-TW_API int      TW_CALL TwDefine(const char *def);
-TW_API TwType   TW_CALL TwDefineEnum(const char *name, const TwEnumVal *enumValues, unsigned int nbValues);
-TW_API TwType   TW_CALL TwDefineStruct(const char *name, const TwStructMember *structMembers, unsigned int nbMembers, size_t structSize, TwSummaryCallback summaryCallback, void *summaryClientData);
-
-typedef void (TW_CALL * TwCopyCDStringToClient)(char **destinationClientStringPtr, const char *sourceString);
-TW_API void     TW_CALL TwCopyCDStringToClientFunc(TwCopyCDStringToClient copyCDStringFunc);
-TW_API void     TW_CALL TwCopyCDStringToLibrary(char **destinationLibraryStringPtr, const char *sourceClientString);
-#ifdef __cplusplus
-typedef void (TW_CALL * TwCopyStdStringToClient)(std::string& destinationClientString, const std::string& sourceString);
-TW_API void     TW_CALL TwCopyStdStringToClientFunc(TwCopyStdStringToClient copyStdStringToClientFunc);
-TW_API void     TW_CALL TwCopyStdStringToLibrary(std::string& destinationLibraryString, const std::string& sourceClientString);
-#endif // __cplusplus
-
-typedef enum ETwParamValueType
-{
-    TW_PARAM_INT32,
-    TW_PARAM_FLOAT,
-    TW_PARAM_DOUBLE,
-    TW_PARAM_CSTRING // Null-terminated array of char (ie, c-string)
-} TwParamValueType;
-TW_API int      TW_CALL TwGetParam(TwBar *bar, const char *varName, const char *paramName, TwParamValueType paramValueType, unsigned int outValueMaxCount, void *outValues);
-TW_API int      TW_CALL TwSetParam(TwBar *bar, const char *varName, const char *paramName, TwParamValueType paramValueType, unsigned int inValueCount, const void *inValues);
-
-
-// ----------------------------------------------------------------------------
-//  Managment functions and definitions
-// ----------------------------------------------------------------------------
-
-typedef enum ETwGraphAPI
-{
-    TW_OPENGL           = 1,
-    TW_DIRECT3D9        = 2,
-    TW_DIRECT3D10       = 3
-} TwGraphAPI;
-
-TW_API int      TW_CALL TwInit(TwGraphAPI graphAPI, void *device);
-TW_API int      TW_CALL TwTerminate();
-
-TW_API int      TW_CALL TwDraw();
-TW_API int      TW_CALL TwWindowSize(int width, int height);
-
-typedef enum ETwKeyModifier
-{
-    TW_KMOD_NONE        = 0x0000,   // same codes as SDL keysym.mod
-    TW_KMOD_SHIFT       = 0x0003,
-    TW_KMOD_CTRL        = 0x00c0,
-    TW_KMOD_ALT         = 0x0100,
-    TW_KMOD_META        = 0x0c00
-} TwKeyModifier;
-typedef enum EKeySpecial
-{
-    TW_KEY_BACKSPACE    = '\b',
-    TW_KEY_TAB          = '\t',
-    TW_KEY_CLEAR        = 0x0c,
-    TW_KEY_RETURN       = '\r',
-    TW_KEY_PAUSE        = 0x13,
-    TW_KEY_ESCAPE       = 0x1b,
-    TW_KEY_SPACE        = ' ',
-    TW_KEY_DELETE       = 0x7f,
-    TW_KEY_UP           = 273,      // same codes and order as SDL keysym.sym
-    TW_KEY_DOWN,
-    TW_KEY_RIGHT,
-    TW_KEY_LEFT,
-    TW_KEY_INSERT,
-    TW_KEY_HOME,
-    TW_KEY_END,
-    TW_KEY_PAGE_UP,
-    TW_KEY_PAGE_DOWN,
-    TW_KEY_F1,
-    TW_KEY_F2,
-    TW_KEY_F3,
-    TW_KEY_F4,
-    TW_KEY_F5,
-    TW_KEY_F6,
-    TW_KEY_F7,
-    TW_KEY_F8,
-    TW_KEY_F9,
-    TW_KEY_F10,
-    TW_KEY_F11,
-    TW_KEY_F12,
-    TW_KEY_F13,
-    TW_KEY_F14,
-    TW_KEY_F15,
-    TW_KEY_LAST
-} TwKeySpecial;
-
-TW_API int      TW_CALL TwKeyPressed(int key, int modifiers);
-
-typedef enum ETwMouseAction
-{
-    TW_MOUSE_RELEASED,
-    TW_MOUSE_PRESSED  
-} TwMouseAction;
-typedef enum ETwMouseButtonID
-{
-    TW_MOUSE_LEFT       = 1,    // same code as SDL_BUTTON_LEFT
-    TW_MOUSE_MIDDLE     = 2,    // same code as SDL_BUTTON_MIDDLE
-    TW_MOUSE_RIGHT      = 3     // same code as SDL_BUTTON_RIGHT
-} TwMouseButtonID;
-
-TW_API int      TW_CALL TwMouseButton(TwMouseAction action, TwMouseButtonID button);
-TW_API int      TW_CALL TwMouseMotion(int mouseX, int mouseY);
-TW_API int      TW_CALL TwMouseWheel(int pos);
-
-TW_API const char * TW_CALL TwGetLastError();
-typedef void (TW_CALL * TwErrorHandler)(const char *errorMessage);
-TW_API void     TW_CALL TwHandleErrors(TwErrorHandler errorHandler);
-
-
-// ----------------------------------------------------------------------------
-//  Helper functions to translate events from some common window management
-//  frameworks to AntTweakBar.
-//  They call TwKeyPressed, TwMouse* and TwWindowSize for you (implemented in
-//  files TwEventWin.c TwEventSDL.c TwEventGLFW.c TwEventGLUT.c)
-// ----------------------------------------------------------------------------
-
-//  For Windows message proc
-#ifndef _W64    // Microsoft specific (detection of 64 bits portability problems)
-#   define _W64
-#endif  // _W64
-TW_API int      TW_CALL TwEventWin(void *wnd, unsigned int msg, unsigned int _W64 wParam, int _W64 lParam);
-#define TwEventWin32    TwEventWin // For compatibility with AntTweakBar versions prior to 1.11
-
-//  For libSDL event loop
-TW_API int      TW_CALL TwEventSDL(const void *sdlEvent);
- 
-//  For GLFW event callbacks
-TW_API int      TW_CALL TwEventMouseButtonGLFW(int glfwButton, int glfwAction);
-TW_API int      TW_CALL TwEventKeyGLFW(int glfwKey, int glfwAction);
-TW_API int      TW_CALL TwEventCharGLFW(int glfwChar, int glfwAction);
-#define TwEventMousePosGLFW     TwMouseMotion
-#define TwEventMouseWheelGLFW   TwMouseWheel
-
-//  For GLUT event callbacks (Windows calling convention for GLUT callbacks is cdecl)
-#if defined(_WIN32) || defined(_WIN64)
-#   define TW_GLUT_CALL __cdecl
-#else
-#   define TW_GLUT_CALL
-#endif
-TW_API int TW_GLUT_CALL TwEventMouseButtonGLUT(int glutButton, int glutState, int mouseX, int mouseY);
-TW_API int TW_GLUT_CALL TwEventMouseMotionGLUT(int mouseX, int mouseY);
-TW_API int TW_GLUT_CALL TwEventKeyboardGLUT(unsigned char glutKey, int mouseX, int mouseY);
-TW_API int TW_GLUT_CALL TwEventSpecialGLUT(int glutKey, int mouseX, int mouseY);
-TW_API int      TW_CALL TwGLUTModifiersFunc(int (TW_CALL *glutGetModifiersFunc)(void));
-typedef void (TW_GLUT_CALL *GLUTmousebuttonfun)(int glutButton, int glutState, int mouseX, int mouseY);
-typedef void (TW_GLUT_CALL *GLUTmousemotionfun)(int mouseX, int mouseY);
-typedef void (TW_GLUT_CALL *GLUTkeyboardfun)(unsigned char glutKey, int mouseX, int mouseY);
-typedef void (TW_GLUT_CALL *GLUTspecialfun)(int glutKey, int mouseX, int mouseY);
-
- 
-// ----------------------------------------------------------------------------
-//  Make sure the types have the right sizes
-// ----------------------------------------------------------------------------
-
-#define TW_COMPILE_TIME_ASSERT(name, x) typedef int TW_DUMMY_ ## name[(x) * 2 - 1]
-
-TW_COMPILE_TIME_ASSERT(CHAR,    sizeof(char)    == 1);
-TW_COMPILE_TIME_ASSERT(SHORT,   sizeof(short)   == 2);
-TW_COMPILE_TIME_ASSERT(INT,     sizeof(int)     == 4);
-TW_COMPILE_TIME_ASSERT(FLOAT,   sizeof(float)   == 4);
-TW_COMPILE_TIME_ASSERT(DOUBLE,  sizeof(double)  == 8);
-
-
-//  ---------------------------------------------------------------------------
-
-
-#ifdef  __cplusplus
-    }   // extern "C"
-#endif  // __cplusplus
-
-
-#endif  // !defined TW_INCLUDED
+// ----------------------------------------------------------------------------
+//
+//  @file       AntTweakBar.h
+//
+//  @brief      AntTweakBar is a light and intuitive graphical user interface 
+//              that can be readily integrated into OpenGL and DirectX 
+//              applications in order to interactively tweak parameters.
+//
+//  @author     Philippe Decaudin - http://www.antisphere.com
+//
+//  @doc        http://www.antisphere.com/Wiki/tools:anttweakbar
+//
+//  @license    This file is part of the AntTweakBar library.
+//              AntTweakBar is a free software released under the zlib license.
+//              For conditions of distribution and use, see License.txt
+//
+// ----------------------------------------------------------------------------
+
+
+#if !defined TW_INCLUDED
+#define TW_INCLUDED
+
+#include <stddef.h>
+
+#define TW_VERSION  114 // Version Mmm : M=Major mm=minor (e.g., 102 is version 1.02)
+
+
+#ifdef  __cplusplus
+#   if defined(_MSC_VER)
+#       pragma warning(push)
+#       pragma warning(disable: 4995 4530)
+#       include <string>
+#       pragma warning(pop)
+#   else
+#       include <string>
+#   endif
+    extern "C" {
+#endif  // __cplusplus
+
+
+// ----------------------------------------------------------------------------
+//  OS specific definitions
+// ----------------------------------------------------------------------------
+
+#if defined(_WIN32) || defined(_WIN64)
+#   define TW_CALL          __stdcall
+#   define TW_CDECL_CALL    __cdecl
+#   define TW_EXPORT_API    __declspec(dllexport)
+#   define TW_IMPORT_API    __declspec(dllimport)
+#else
+#   define TW_CALL
+#   define TW_CDECL_CALL
+#   define TW_EXPORT_API
+#   define TW_IMPORT_API
+#endif
+
+#if defined TW_EXPORTS
+#   define TW_API TW_EXPORT_API
+#elif defined TW_STATIC
+#   define TW_API
+#   if defined(_MSC_VER) && !defined(TW_NO_LIB_PRAGMA)
+#       ifdef _WIN64
+#           pragma comment(lib, "AntTweakBarStatic64")
+#       else
+#           pragma comment(lib, "AntTweakBarStatic")
+#       endif
+#   endif
+#else
+#   define TW_API TW_IMPORT_API
+#   if defined(_MSC_VER) && !defined(TW_NO_LIB_PRAGMA)
+#       ifdef _WIN64
+#           pragma comment(lib, "AntTweakBar64")
+#       else
+#           pragma comment(lib, "AntTweakBar")
+#       endif
+#   endif
+#endif
+
+
+// ----------------------------------------------------------------------------
+//  Bar functions and definitions
+// ----------------------------------------------------------------------------
+
+typedef struct CTwBar TwBar; // structure CTwBar is not exposed.
+
+TW_API TwBar *      TW_CALL TwNewBar(const char *barName);
+TW_API int          TW_CALL TwDeleteBar(TwBar *bar);
+TW_API int          TW_CALL TwDeleteAllBars();
+TW_API int          TW_CALL TwSetTopBar(const TwBar *bar);
+TW_API TwBar *      TW_CALL TwGetTopBar();
+TW_API int          TW_CALL TwSetBottomBar(const TwBar *bar);
+TW_API TwBar *      TW_CALL TwGetBottomBar();
+TW_API const char * TW_CALL TwGetBarName(TwBar *bar);
+TW_API int          TW_CALL TwGetBarCount();
+TW_API TwBar *      TW_CALL TwGetBarByIndex(int barIndex);
+TW_API TwBar *      TW_CALL TwGetBarByName(const char *barName);
+TW_API int          TW_CALL TwRefreshBar(TwBar *bar);
+
+
+// ----------------------------------------------------------------------------
+//  Var functions and definitions
+// ----------------------------------------------------------------------------
+
+typedef enum ETwType
+{
+    TW_TYPE_UNDEF   = 0,
+#ifdef __cplusplus
+    TW_TYPE_BOOLCPP = 1,
+#endif // __cplusplus
+    TW_TYPE_BOOL8   = 2,
+    TW_TYPE_BOOL16,
+    TW_TYPE_BOOL32,
+    TW_TYPE_CHAR,
+    TW_TYPE_INT8,
+    TW_TYPE_UINT8,
+    TW_TYPE_INT16,
+    TW_TYPE_UINT16,
+    TW_TYPE_INT32,
+    TW_TYPE_UINT32,
+    TW_TYPE_FLOAT,
+    TW_TYPE_DOUBLE,
+    TW_TYPE_COLOR32,    // 32 bits color. Order is RGBA if API is OpenGL or Direct3D10, and inversed if API is Direct3D9 (can be modified by defining 'colorOrder=...', see doc)
+    TW_TYPE_COLOR3F,    // 3 floats color. Order is RGB.
+    TW_TYPE_COLOR4F,    // 4 floats color. Order is RGBA.
+    TW_TYPE_CDSTRING,   // Null-terminated C Dynamic String (pointer to an array of char dynamically allocated with malloc/realloc/strdup)
+#ifdef __cplusplus
+    TW_TYPE_STDSTRING = (0x2fff0000+sizeof(std::string)),  // C++ STL string (std::string)
+#endif // __cplusplus
+    TW_TYPE_QUAT4F = TW_TYPE_CDSTRING+2, // 4 floats encoding a quaternion {qx,qy,qz,qs}
+    TW_TYPE_QUAT4D,     // 4 doubles encoding a quaternion {qx,qy,qz,qs}
+    TW_TYPE_DIR3F,      // direction vector represented by 3 floats
+    TW_TYPE_DIR3D       // direction vector represented by 3 doubles
+} TwType;
+#define TW_TYPE_CSSTRING(n) ((TwType)(0x30000000+((n)&0xfffffff))) // Null-terminated C Static String of size n (defined as char[n], with n<2^28)
+
+typedef void (TW_CALL * TwSetVarCallback)(const void *value, void *clientData);
+typedef void (TW_CALL * TwGetVarCallback)(void *value, void *clientData);
+typedef void (TW_CALL * TwButtonCallback)(void *clientData);
+
+TW_API int      TW_CALL TwAddVarRW(TwBar *bar, const char *name, TwType type, void *var, const char *def);
+TW_API int      TW_CALL TwAddVarRO(TwBar *bar, const char *name, TwType type, const void *var, const char *def);
+TW_API int      TW_CALL TwAddVarCB(TwBar *bar, const char *name, TwType type, TwSetVarCallback setCallback, TwGetVarCallback getCallback, void *clientData, const char *def);
+TW_API int      TW_CALL TwAddButton(TwBar *bar, const char *name, TwButtonCallback callback, void *clientData, const char *def);
+TW_API int      TW_CALL TwAddSeparator(TwBar *bar, const char *name, const char *def);
+TW_API int      TW_CALL TwRemoveVar(TwBar *bar, const char *name);
+TW_API int      TW_CALL TwRemoveAllVars(TwBar *bar);
+
+typedef struct CTwEnumVal
+{
+    int           Value;
+    const char *  Label;
+} TwEnumVal;
+typedef struct CTwStructMember
+{
+    const char *  Name;
+    TwType        Type;
+    size_t        Offset;
+    const char *  DefString;
+} TwStructMember;
+typedef void (TW_CALL * TwSummaryCallback)(char *summaryString, size_t summaryMaxLength, const void *value, void *clientData);
+
+TW_API int      TW_CALL TwDefine(const char *def);
+TW_API TwType   TW_CALL TwDefineEnum(const char *name, const TwEnumVal *enumValues, unsigned int nbValues);
+TW_API TwType   TW_CALL TwDefineEnumFromString(const char *name, const char *enumString);
+TW_API TwType   TW_CALL TwDefineStruct(const char *name, const TwStructMember *structMembers, unsigned int nbMembers, size_t structSize, TwSummaryCallback summaryCallback, void *summaryClientData);
+
+typedef void (TW_CALL * TwCopyCDStringToClient)(char **destinationClientStringPtr, const char *sourceString);
+TW_API void     TW_CALL TwCopyCDStringToClientFunc(TwCopyCDStringToClient copyCDStringFunc);
+TW_API void     TW_CALL TwCopyCDStringToLibrary(char **destinationLibraryStringPtr, const char *sourceClientString);
+#ifdef __cplusplus
+typedef void (TW_CALL * TwCopyStdStringToClient)(std::string& destinationClientString, const std::string& sourceString);
+TW_API void     TW_CALL TwCopyStdStringToClientFunc(TwCopyStdStringToClient copyStdStringToClientFunc);
+TW_API void     TW_CALL TwCopyStdStringToLibrary(std::string& destinationLibraryString, const std::string& sourceClientString);
+#endif // __cplusplus
+
+typedef enum ETwParamValueType
+{
+    TW_PARAM_INT32,
+    TW_PARAM_FLOAT,
+    TW_PARAM_DOUBLE,
+    TW_PARAM_CSTRING // Null-terminated array of char (ie, c-string)
+} TwParamValueType;
+TW_API int      TW_CALL TwGetParam(TwBar *bar, const char *varName, const char *paramName, TwParamValueType paramValueType, unsigned int outValueMaxCount, void *outValues);
+TW_API int      TW_CALL TwSetParam(TwBar *bar, const char *varName, const char *paramName, TwParamValueType paramValueType, unsigned int inValueCount, const void *inValues);
+
+
+// ----------------------------------------------------------------------------
+//  Management functions and definitions
+// ----------------------------------------------------------------------------
+
+typedef enum ETwGraphAPI
+{
+    TW_OPENGL           = 1,
+    TW_DIRECT3D9        = 2,
+    TW_DIRECT3D10       = 3,
+    TW_DIRECT3D11       = 4
+} TwGraphAPI;
+
+TW_API int      TW_CALL TwInit(TwGraphAPI graphAPI, void *device);
+TW_API int      TW_CALL TwTerminate();
+
+TW_API int      TW_CALL TwDraw();
+TW_API int      TW_CALL TwWindowSize(int width, int height);
+
+TW_API int      TW_CALL TwSetCurrentWindow(int windowID); // multi-windows support
+TW_API int      TW_CALL TwGetCurrentWindow();
+TW_API int      TW_CALL TwWindowExists(int windowID);
+
+typedef enum ETwKeyModifier
+{
+    TW_KMOD_NONE        = 0x0000,   // same codes as SDL keysym.mod
+    TW_KMOD_SHIFT       = 0x0003,
+    TW_KMOD_CTRL        = 0x00c0,
+    TW_KMOD_ALT         = 0x0100,
+    TW_KMOD_META        = 0x0c00
+} TwKeyModifier;
+typedef enum EKeySpecial
+{
+    TW_KEY_BACKSPACE    = '\b',
+    TW_KEY_TAB          = '\t',
+    TW_KEY_CLEAR        = 0x0c,
+    TW_KEY_RETURN       = '\r',
+    TW_KEY_PAUSE        = 0x13,
+    TW_KEY_ESCAPE       = 0x1b,
+    TW_KEY_SPACE        = ' ',
+    TW_KEY_DELETE       = 0x7f,
+    TW_KEY_UP           = 273,      // same codes and order as SDL 1.2 keysym.sym
+    TW_KEY_DOWN,
+    TW_KEY_RIGHT,
+    TW_KEY_LEFT,
+    TW_KEY_INSERT,
+    TW_KEY_HOME,
+    TW_KEY_END,
+    TW_KEY_PAGE_UP,
+    TW_KEY_PAGE_DOWN,
+    TW_KEY_F1,
+    TW_KEY_F2,
+    TW_KEY_F3,
+    TW_KEY_F4,
+    TW_KEY_F5,
+    TW_KEY_F6,
+    TW_KEY_F7,
+    TW_KEY_F8,
+    TW_KEY_F9,
+    TW_KEY_F10,
+    TW_KEY_F11,
+    TW_KEY_F12,
+    TW_KEY_F13,
+    TW_KEY_F14,
+    TW_KEY_F15,
+    TW_KEY_LAST
+} TwKeySpecial;
+
+TW_API int      TW_CALL TwKeyPressed(int key, int modifiers);
+TW_API int      TW_CALL TwKeyTest(int key, int modifiers);
+
+typedef enum ETwMouseAction
+{
+    TW_MOUSE_RELEASED,
+    TW_MOUSE_PRESSED  
+} TwMouseAction;
+typedef enum ETwMouseButtonID
+{
+    TW_MOUSE_LEFT       = 1,    // same code as SDL_BUTTON_LEFT
+    TW_MOUSE_MIDDLE     = 2,    // same code as SDL_BUTTON_MIDDLE
+    TW_MOUSE_RIGHT      = 3     // same code as SDL_BUTTON_RIGHT
+} TwMouseButtonID;
+
+TW_API int      TW_CALL TwMouseButton(TwMouseAction action, TwMouseButtonID button);
+TW_API int      TW_CALL TwMouseMotion(int mouseX, int mouseY);
+TW_API int      TW_CALL TwMouseWheel(int pos);
+
+TW_API const char * TW_CALL TwGetLastError();
+typedef void (TW_CALL * TwErrorHandler)(const char *errorMessage);
+TW_API void     TW_CALL TwHandleErrors(TwErrorHandler errorHandler);
+
+
+// ----------------------------------------------------------------------------
+//  Helper functions to translate events from some common window management
+//  frameworks to AntTweakBar.
+//  They call TwKeyPressed, TwMouse* and TwWindowSize for you (implemented in
+//  files TwEventWin.c TwEventSDL*.c TwEventGLFW.c TwEventGLUT.c)
+// ----------------------------------------------------------------------------
+
+// For Windows message proc
+#ifndef _W64    // Microsoft specific (detection of 64 bits portability issues)
+#   define _W64
+#endif  // _W64
+#ifdef _WIN64
+    TW_API int  TW_CALL TwEventWin(void *wnd, unsigned int msg, unsigned __int64 _W64 wParam, __int64 _W64 lParam);
+#else
+    TW_API int  TW_CALL TwEventWin(void *wnd, unsigned int msg, unsigned int _W64 wParam, int _W64 lParam);
+#endif
+#define TwEventWin32    TwEventWin // For compatibility with AntTweakBar versions prior to 1.11
+
+// For libSDL event loop
+TW_API int      TW_CALL TwEventSDL(const void *sdlEvent, unsigned char sdlMajorVersion, unsigned char sdlMinorVersion);
+
+// For GLFW event callbacks
+// Define GLFW_CDECL before including AntTweakBar.h if your version of GLFW uses cdecl calling convensions
+#ifdef GLFW_CDECL
+    TW_API int TW_CDECL_CALL TwEventMouseButtonGLFWcdecl(int glfwButton, int glfwAction);
+    TW_API int TW_CDECL_CALL TwEventKeyGLFWcdecl(int glfwKey, int glfwAction);
+    TW_API int TW_CDECL_CALL TwEventCharGLFWcdecl(int glfwChar, int glfwAction);
+    TW_API int TW_CDECL_CALL TwEventMousePosGLFWcdecl(int mouseX, int mouseY);
+    TW_API int TW_CDECL_CALL TwEventMouseWheelGLFWcdecl(int wheelPos);
+#   define TwEventMouseButtonGLFW TwEventMouseButtonGLFWcdecl
+#   define TwEventKeyGLFW         TwEventKeyGLFWcdecl
+#   define TwEventCharGLFW        TwEventCharGLFWcdecl
+#   define TwEventMousePosGLFW    TwEventMousePosGLFWcdecl
+#   define TwEventMouseWheelGLFW  TwEventMouseWheelGLFWcdecl
+#else
+    TW_API int  TW_CALL TwEventMouseButtonGLFW(int glfwButton, int glfwAction);
+    TW_API int  TW_CALL TwEventKeyGLFW(int glfwKey, int glfwAction);
+    TW_API int  TW_CALL TwEventCharGLFW(int glfwChar, int glfwAction);
+#   define TwEventMousePosGLFW     TwMouseMotion
+#   define TwEventMouseWheelGLFW   TwMouseWheel
+#endif
+
+// For GLUT event callbacks (Windows calling convention for GLUT callbacks is cdecl)
+#if defined(_WIN32) || defined(_WIN64)
+#   define TW_GLUT_CALL TW_CDECL_CALL
+#else
+#   define TW_GLUT_CALL
+#endif
+TW_API int TW_GLUT_CALL TwEventMouseButtonGLUT(int glutButton, int glutState, int mouseX, int mouseY);
+TW_API int TW_GLUT_CALL TwEventMouseMotionGLUT(int mouseX, int mouseY);
+TW_API int TW_GLUT_CALL TwEventKeyboardGLUT(unsigned char glutKey, int mouseX, int mouseY);
+TW_API int TW_GLUT_CALL TwEventSpecialGLUT(int glutKey, int mouseX, int mouseY);
+TW_API int TW_CALL      TwGLUTModifiersFunc(int (TW_CALL *glutGetModifiersFunc)(void));
+typedef void (TW_GLUT_CALL *GLUTmousebuttonfun)(int glutButton, int glutState, int mouseX, int mouseY);
+typedef void (TW_GLUT_CALL *GLUTmousemotionfun)(int mouseX, int mouseY);
+typedef void (TW_GLUT_CALL *GLUTkeyboardfun)(unsigned char glutKey, int mouseX, int mouseY);
+typedef void (TW_GLUT_CALL *GLUTspecialfun)(int glutKey, int mouseX, int mouseY);
+
+// For SFML event loop
+TW_API int      TW_CALL TwEventSFML(const void *sfmlEvent, unsigned char sfmlMajorVersion, unsigned char sfmlMinorVersion);
+
+
+// ----------------------------------------------------------------------------
+//  Make sure the types have the right sizes
+// ----------------------------------------------------------------------------
+
+#define TW_COMPILE_TIME_ASSERT(name, x) typedef int TW_DUMMY_ ## name[(x) * 2 - 1]
+
+TW_COMPILE_TIME_ASSERT(TW_CHAR,    sizeof(char)    == 1);
+TW_COMPILE_TIME_ASSERT(TW_SHORT,   sizeof(short)   == 2);
+TW_COMPILE_TIME_ASSERT(TW_INT,     sizeof(int)     == 4);
+TW_COMPILE_TIME_ASSERT(TW_FLOAT,   sizeof(float)   == 4);
+TW_COMPILE_TIME_ASSERT(TW_DOUBLE,  sizeof(double)  == 8);
+
+// Check pointer size on Windows
+#if !defined(_WIN64) && defined(_WIN32)
+    // If the following assert failed, the platform is not 32-bit and _WIN64 is not defined.
+    // When targetting 64-bit Windows platform, _WIN64 must be defined.
+    TW_COMPILE_TIME_ASSERT(TW_PTR32, sizeof(void*) == 4);
+#elif defined(_WIN64)
+    // If the following assert failed, _WIN64 is defined but the targeted platform is not 64-bit.
+    TW_COMPILE_TIME_ASSERT(TW_PTR64, sizeof(void*) == 8);
+#endif
+
+//  ---------------------------------------------------------------------------
+
+
+#ifdef  __cplusplus
+    }   // extern "C"
+#endif  // __cplusplus
+
+
+#endif  // !defined TW_INCLUDED

include/LoadOGL.h

-//  ---------------------------------------------------------------------------
-//
-//  @file       LoadOGL.h
-//  @brief      OpenGL declarations for dynamic loading
-//  @author     Philippe Decaudin - http://www.antisphere.com
-//  @license    This file is part of the AntTweakBar library.
-//              For conditions of distribution and use, see License.txt
-//
-//  notes:      Private header
-//              TAB=4
-//
-//  ---------------------------------------------------------------------------
-
-
-#if !defined ANT_LOAD_OGL_INCLUDED
-#define ANT_LOAD_OGL_INCLUDED
-
-
-#define ANT_GL_DECL(_Ret, _Fct, _Params) \
-    extern "C" { typedef _Ret (APIENTRY* PFN##_Fct)_Params; } \
-    namespace GL { extern PFN##_Fct _##_Fct; } \
-    using GL::_##_Fct;
-
-#if defined(ANT_WINDOWS)
-#   define ANT_GL_IMPL(_Fct) \
-        namespace GL { PFN##_Fct _##_Fct = (PFN##_Fct)Record(#_Fct, (PFNOpenGL*)(&_##_Fct)); }
-#elif defined(ANT_UNIX) || defined(ANT_OSX)
-#   define ANT_GL_IMPL(_Fct) \
-        namespace GL { PFN##_Fct _##_Fct = _Fct; }
-#   if !defined(APIENTRY)
-#       define APIENTRY
-#   endif
-#endif
-
-
-int LoadOpenGL();
-int UnloadOpenGL();
-
-namespace GL
-{
-    extern "C" { typedef void (APIENTRY* PFNOpenGL)(); }
-    PFNOpenGL Record(const char *_FuncName, PFNOpenGL *_FuncPtr);
-
-    extern "C" { typedef PFNOpenGL (APIENTRY *PFNGLGetProcAddress)(const char *); }
-    extern PFNGLGetProcAddress _glGetProcAddress;
-}
-using GL::_glGetProcAddress;
-
- 
-ANT_GL_DECL(void, glAccum, (GLenum op, GLfloat value))
-ANT_GL_DECL(void, glAlphaFunc, (GLenum func, GLclampf ref))
-ANT_GL_DECL(GLboolean, glAreTexturesResident, (GLsizei n, const GLuint *textures, GLboolean *residences))
-ANT_GL_DECL(void, glArrayElement, (GLint i))
-ANT_GL_DECL(void, glBegin, (GLenum mode))
-ANT_GL_DECL(void, glBindTexture, (GLenum target, GLuint texture))
-ANT_GL_DECL(void, glBitmap, (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap))
-ANT_GL_DECL(void, glBlendFunc, (GLenum sfactor, GLenum dfactor))
-ANT_GL_DECL(void, glCallList, (GLuint list))
-ANT_GL_DECL(void, glCallLists, (GLsizei n, GLenum type, const GLvoid *lists))
-ANT_GL_DECL(void, glClear, (GLbitfield mask))
-ANT_GL_DECL(void, glClearAccum, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha))
-ANT_GL_DECL(void, glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha))
-ANT_GL_DECL(void, glClearDepth, (GLclampd depth))
-ANT_GL_DECL(void, glClearIndex, (GLfloat c))
-ANT_GL_DECL(void, glClearStencil, (GLint s))
-ANT_GL_DECL(void, glClipPlane, (GLenum plane, const GLdouble *equation))
-ANT_GL_DECL(void, glColor3b, (GLbyte red, GLbyte green, GLbyte blue))
-ANT_GL_DECL(void, glColor3bv, (const GLbyte *v))
-ANT_GL_DECL(void, glColor3d, (GLdouble red, GLdouble green, GLdouble blue))
-ANT_GL_DECL(void, glColor3dv, (const GLdouble *v))
-ANT_GL_DECL(void, glColor3f, (GLfloat red, GLfloat green, GLfloat blue))
-ANT_GL_DECL(void, glColor3fv, (const GLfloat *v))
-ANT_GL_DECL(void, glColor3i, (GLint red, GLint green, GLint blue))
-ANT_GL_DECL(void, glColor3iv, (const GLint *v))
-ANT_GL_DECL(void, glColor3s, (GLshort red, GLshort green, GLshort blue))
-ANT_GL_DECL(void, glColor3sv, (const GLshort *v))
-ANT_GL_DECL(void, glColor3ub, (GLubyte red, GLubyte green, GLubyte blue))
-ANT_GL_DECL(void, glColor3ubv, (const GLubyte *v))
-ANT_GL_DECL(void, glColor3ui, (GLuint red, GLuint green, GLuint blue))
-ANT_GL_DECL(void, glColor3uiv, (const GLuint *v))
-ANT_GL_DECL(void, glColor3us, (GLushort red, GLushort green, GLushort blue))
-ANT_GL_DECL(void, glColor3usv, (const GLushort *v))
-ANT_GL_DECL(void, glColor4b, (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha))
-ANT_GL_DECL(void, glColor4bv, (const GLbyte *v))
-ANT_GL_DECL(void, glColor4d, (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha))
-ANT_GL_DECL(void, glColor4dv, (const GLdouble *v))
-ANT_GL_DECL(void, glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha))
-ANT_GL_DECL(void, glColor4fv, (const GLfloat *v))
-ANT_GL_DECL(void, glColor4i, (GLint red, GLint green, GLint blue, GLint alpha))
-ANT_GL_DECL(void, glColor4iv, (const GLint *v))
-ANT_GL_DECL(void, glColor4s, (GLshort red, GLshort green, GLshort blue, GLshort alpha))
-ANT_GL_DECL(void, glColor4sv, (const GLshort *v))
-ANT_GL_DECL(void, glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha))
-ANT_GL_DECL(void, glColor4ubv, (const GLubyte *v))
-ANT_GL_DECL(void, glColor4ui, (GLuint red, GLuint green, GLuint blue, GLuint alpha))
-ANT_GL_DECL(void, glColor4uiv, (const GLuint *v))
-ANT_GL_DECL(void, glColor4us, (GLushort red, GLushort green, GLushort blue, GLushort alpha))
-ANT_GL_DECL(void, glColor4usv, (const GLushort *v))
-ANT_GL_DECL(void, glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha))
-ANT_GL_DECL(void, glColorMaterial, (GLenum face, GLenum mode))
-ANT_GL_DECL(void, glColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
-ANT_GL_DECL(void, glCopyPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type))
-ANT_GL_DECL(void, glCopyTexImage1D, (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border))
-ANT_GL_DECL(void, glCopyTexImage2D, (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border))
-ANT_GL_DECL(void, glCopyTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width))
-ANT_GL_DECL(void, glCopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height))
-ANT_GL_DECL(void, glCullFace, (GLenum mode))
-ANT_GL_DECL(void, glDeleteLists, (GLuint list, GLsizei range))
-ANT_GL_DECL(void, glDeleteTextures, (GLsizei n, const GLuint *textures))
-ANT_GL_DECL(void, glDepthFunc, (GLenum func))
-ANT_GL_DECL(void, glDepthMask, (GLboolean flag))
-ANT_GL_DECL(void, glDepthRange, (GLclampd zNear, GLclampd zFar))
-ANT_GL_DECL(void, glDisable, (GLenum cap))
-ANT_GL_DECL(void, glDisableClientState, (GLenum array))
-ANT_GL_DECL(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count))
-ANT_GL_DECL(void, glDrawBuffer, (GLenum mode))
-ANT_GL_DECL(void, glDrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices))
-ANT_GL_DECL(void, glDrawPixels, (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels))
-ANT_GL_DECL(void, glEdgeFlag, (GLboolean flag))
-ANT_GL_DECL(void, glEdgeFlagPointer, (GLsizei stride, const void *pointer))
-ANT_GL_DECL(void, glEdgeFlagv, (const GLboolean *flag))
-ANT_GL_DECL(void, glEnable, (GLenum cap))
-ANT_GL_DECL(void, glEnableClientState, (GLenum array))
-ANT_GL_DECL(void, glEnd, (void))
-ANT_GL_DECL(void, glEndList, (void))
-ANT_GL_DECL(void, glEvalCoord1d, (GLdouble u))
-ANT_GL_DECL(void, glEvalCoord1dv, (const GLdouble *u))
-ANT_GL_DECL(void, glEvalCoord1f, (GLfloat u))
-ANT_GL_DECL(void, glEvalCoord1fv, (const GLfloat *u))
-ANT_GL_DECL(void, glEvalCoord2d, (GLdouble u, GLdouble v))
-ANT_GL_DECL(void, glEvalCoord2dv, (const GLdouble *u))
-ANT_GL_DECL(void, glEvalCoord2f, (GLfloat u, GLfloat v))
-ANT_GL_DECL(void, glEvalCoord2fv, (const GLfloat *u))
-ANT_GL_DECL(void, glEvalMesh1, (GLenum mode, GLint i1, GLint i2))
-ANT_GL_DECL(void, glEvalMesh2, (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2))
-ANT_GL_DECL(void, glEvalPoint1, (GLint i))
-ANT_GL_DECL(void, glEvalPoint2, (GLint i, GLint j))
-ANT_GL_DECL(void, glFeedbackBuffer, (GLsizei size, GLenum type, GLfloat *buffer))
-ANT_GL_DECL(void, glFinish, (void))
-ANT_GL_DECL(void, glFlush, (void))
-ANT_GL_DECL(void, glFogf, (GLenum pname, GLfloat param))
-ANT_GL_DECL(void, glFogfv, (GLenum pname, const GLfloat *params))
-ANT_GL_DECL(void, glFogi, (GLenum pname, GLint param))
-ANT_GL_DECL(void, glFogiv, (GLenum pname, const GLint *params))
-ANT_GL_DECL(void, glFrontFace, (GLenum mode))
-ANT_GL_DECL(void, glFrustum, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar))
-ANT_GL_DECL(GLuint, glGenLists, (GLsizei range))
-ANT_GL_DECL(void, glGenTextures, (GLsizei n, GLuint *textures))
-ANT_GL_DECL(void, glGetBooleanv, (GLenum pname, GLboolean *params))
-ANT_GL_DECL(void, glGetClipPlane, (GLenum plane, GLdouble *equation))
-ANT_GL_DECL(void, glGetDoublev, (GLenum pname, GLdouble *params))
-ANT_GL_DECL(GLenum, glGetError, (void))
-ANT_GL_DECL(void, glGetFloatv, (GLenum pname, GLfloat *params))
-ANT_GL_DECL(void, glGetIntegerv, (GLenum pname, GLint *params))
-ANT_GL_DECL(void, glGetLightfv, (GLenum light, GLenum pname, GLfloat *params))
-ANT_GL_DECL(void, glGetLightiv, (GLenum light, GLenum pname, GLint *params))
-ANT_GL_DECL(void, glGetMapdv, (GLenum target, GLenum query, GLdouble *v))
-ANT_GL_DECL(void, glGetMapfv, (GLenum target, GLenum query, GLfloat *v))
-ANT_GL_DECL(void, glGetMapiv, (GLenum target, GLenum query, GLint *v))
-ANT_GL_DECL(void, glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params))
-ANT_GL_DECL(void, glGetMaterialiv, (GLenum face, GLenum pname, GLint *params))
-ANT_GL_DECL(void, glGetPixelMapfv, (GLenum map, GLfloat *values))
-ANT_GL_DECL(void, glGetPixelMapuiv, (GLenum map, GLuint *values))
-ANT_GL_DECL(void, glGetPixelMapusv, (GLenum map, GLushort *values))
-ANT_GL_DECL(void, glGetPointerv, (GLenum pname, GLvoid* *params))
-ANT_GL_DECL(void, glGetPolygonStipple, (GLubyte *mask))
-ANT_GL_DECL(const GLubyte *, glGetString, (GLenum name))
-ANT_GL_DECL(void, glGetTexEnvfv, (GLenum target, GLenum pname, GLfloat *params))
-ANT_GL_DECL(void, glGetTexEnviv, (GLenum target, GLenum pname, GLint *params))
-ANT_GL_DECL(void, glGetTexGendv, (GLenum coord, GLenum pname, GLdouble *params))
-ANT_GL_DECL(void, glGetTexGenfv, (GLenum coord, GLenum pname, GLfloat *params))
-ANT_GL_DECL(void, glGetTexGeniv, (GLenum coord, GLenum pname, GLint *params))
-ANT_GL_DECL(void, glGetTexImage, (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels))
-ANT_GL_DECL(void, glGetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params))
-ANT_GL_DECL(void, glGetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params))
-ANT_GL_DECL(void, glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params))
-ANT_GL_DECL(void, glGetTexParameteriv, (GLenum target, GLenum pname, GLint *params))
-ANT_GL_DECL(void, glHint, (GLenum target, GLenum mode))
-ANT_GL_DECL(void, glIndexMask, (GLuint mask))
-ANT_GL_DECL(void, glIndexPointer, (GLenum type, GLsizei stride, const GLvoid *pointer))
-ANT_GL_DECL(void, glIndexd, (GLdouble c))
-ANT_GL_DECL(void, glIndexdv, (const GLdouble *c))
-ANT_GL_DECL(void, glIndexf, (GLfloat c))
-ANT_GL_DECL(void, glIndexfv, (const GLfloat *c))
-ANT_GL_DECL(void, glIndexi, (GLint c))
-ANT_GL_DECL(void, glIndexiv, (const GLint *c))
-ANT_GL_DECL(void, glIndexs, (GLshort c))
-ANT_GL_DECL(void, glIndexsv, (const GLshort *c))
-ANT_GL_DECL(void, glIndexub, (GLubyte c))
-ANT_GL_DECL(void, glIndexubv, (const GLubyte *c))
-ANT_GL_DECL(void, glInitNames, (void))
-ANT_GL_DECL(void, glInterleavedArrays, (GLenum format, GLsizei stride, const GLvoid *pointer))
-ANT_GL_DECL(GLboolean, glIsEnabled, (GLenum cap))
-ANT_GL_DECL(GLboolean, glIsList, (GLuint list))
-ANT_GL_DECL(GLboolean, glIsTexture, (GLuint texture))
-ANT_GL_DECL(void, glLightModelf, (GLenum pname, GLfloat param))
-ANT_GL_DECL(void, glLightModelfv, (GLenum pname, const GLfloat *params))
-ANT_GL_DECL(void, glLightModeli, (GLenum pname, GLint param))
-ANT_GL_DECL(void, glLightModeliv, (GLenum pname, const GLint *params))
-ANT_GL_DECL(void, glLightf, (GLenum light, GLenum pname, GLfloat param))
-ANT_GL_DECL(void, glLightfv, (GLenum light, GLenum pname, const GLfloat *params))
-ANT_GL_DECL(void, glLighti, (GLenum light, GLenum pname, GLint param))
-ANT_GL_DECL(void, glLightiv, (GLenum light, GLenum pname, const GLint *params))
-ANT_GL_DECL(void, glLineStipple, (GLint factor, GLushort pattern))
-ANT_GL_DECL(void, glLineWidth, (GLfloat width))
-ANT_GL_DECL(void, glListBase, (GLuint base))
-ANT_GL_DECL(void, glLoadIdentity, (void))
-ANT_GL_DECL(void, glLoadMatrixd, (const GLdouble *m))
-ANT_GL_DECL(void, glLoadMatrixf, (const GLfloat *m))
-ANT_GL_DECL(void, glLoadName, (GLuint name))
-ANT_GL_DECL(void, glLogicOp, (GLenum opcode))
-ANT_GL_DECL(void, glMap1d, (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points))
-ANT_GL_DECL(void, glMap1f, (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points))
-ANT_GL_DECL(void, glMap2d, (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points))
-ANT_GL_DECL(void, glMap2f, (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points))
-ANT_GL_DECL(void, glMapGrid1d, (GLint un, GLdouble u1, GLdouble u2))
-ANT_GL_DECL(void, glMapGrid1f, (GLint un, GLfloat u1, GLfloat u2))
-ANT_GL_DECL(void, glMapGrid2d, (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2))
-ANT_GL_DECL(void, glMapGrid2f, (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2))
-ANT_GL_DECL(void, glMaterialf, (GLenum face, GLenum pname, GLfloat param))
-ANT_GL_DECL(void, glMaterialfv, (GLenum face, GLenum pname, const GLfloat *params))
-ANT_GL_DECL(void, glMateriali, (GLenum face, GLenum pname, GLint param))
-ANT_GL_DECL(void, glMaterialiv, (GLenum face, GLenum pname, const GLint *params))
-ANT_GL_DECL(void, glMatrixMode, (GLenum mode))
-ANT_GL_DECL(void, glMultMatrixd, (const GLdouble *m))
-ANT_GL_DECL(void, glMultMatrixf, (const GLfloat *m))
-ANT_GL_DECL(void, glNewList, (GLuint list, GLenum mode))
-ANT_GL_DECL(void, glNormal3b, (GLbyte nx, GLbyte ny, GLbyte nz))
-ANT_GL_DECL(void, glNormal3bv, (const GLbyte *v))
-ANT_GL_DECL(void, glNormal3d, (GLdouble nx, GLdouble ny, GLdouble nz))
-ANT_GL_DECL(void, glNormal3dv, (const GLdouble *v))
-ANT_GL_DECL(void, glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz))
-ANT_GL_DECL(void, glNormal3fv, (const GLfloat *v))
-ANT_GL_DECL(void, glNormal3i, (GLint nx, GLint ny, GLint nz))
-ANT_GL_DECL(void, glNormal3iv, (const GLint *v))
-ANT_GL_DECL(void, glNormal3s, (GLshort nx, GLshort ny, GLshort nz))
-ANT_GL_DECL(void, glNormal3sv, (const GLshort *v))
-ANT_GL_DECL(void, glNormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer))
-ANT_GL_DECL(void, glOrtho, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar))
-ANT_GL_DECL(void, glPassThrough, (GLfloat token))
-ANT_GL_DECL(void, glPixelMapfv, (GLenum map, GLsizei mapsize, const GLfloat *values))
-ANT_GL_DECL(void, glPixelMapuiv, (GLenum map, GLsizei mapsize, const GLuint *values))
-ANT_GL_DECL(void, glPixelMapusv, (GLenum map, GLsizei mapsize, const GLushort *values))
-ANT_GL_DECL(void, glPixelStoref, (GLenum pname, GLfloat param))
-ANT_GL_DECL(void, glPixelStorei, (GLenum pname, GLint param))
-ANT_GL_DECL(void, glPixelTransferf, (GLenum pname, GLfloat param))
-ANT_GL_DECL(void, glPixelTransferi, (GLenum pname, GLint param))
-ANT_GL_DECL(void, glPixelZoom, (GLfloat xfactor, GLfloat yfactor))
-ANT_GL_DECL(void, glPointSize, (GLfloat size))
-ANT_GL_DECL(void, glPolygonMode, (GLenum face, GLenum mode))
-ANT_GL_DECL(void, glPolygonOffset, (GLfloat factor, GLfloat units))
-ANT_GL_DECL(void, glPolygonStipple, (const GLubyte *mask))
-ANT_GL_DECL(void, glPopAttrib, (void))
-ANT_GL_DECL(void, glPopClientAttrib, (void))
-ANT_GL_DECL(void, glPopMatrix, (void))
-ANT_GL_DECL(void, glPopName, (void))
-ANT_GL_DECL(void, glPrioritizeTextures, (GLsizei n, const GLuint *textures, const GLclampf *priorities))
-ANT_GL_DECL(void, glPushAttrib, (GLbitfield mask))
-ANT_GL_DECL(void, glPushClientAttrib, (GLbitfield mask))
-ANT_GL_DECL(void, glPushMatrix, (void))
-ANT_GL_DECL(void, glPushName, (GLuint name))
-ANT_GL_DECL(void, glRasterPos2d, (GLdouble x, GLdouble y))
-ANT_GL_DECL(void, glRasterPos2dv, (const GLdouble *v))
-ANT_GL_DECL(void, glRasterPos2f, (GLfloat x, GLfloat y))
-ANT_GL_DECL(void, glRasterPos2fv, (const GLfloat *v))
-ANT_GL_DECL(void, glRasterPos2i, (GLint x, GLint y))
-ANT_GL_DECL(void, glRasterPos2iv, (const GLint *v))
-ANT_GL_DECL(void, glRasterPos2s, (GLshort x, GLshort y))
-ANT_GL_DECL(void, glRasterPos2sv, (const GLshort *v))
-ANT_GL_DECL(void, glRasterPos3d, (GLdouble x, GLdouble y, GLdouble z))
-ANT_GL_DECL(void, glRasterPos3dv, (const GLdouble *v))
-ANT_GL_DECL(void, glRasterPos3f, (GLfloat x, GLfloat y, GLfloat z))
-ANT_GL_DECL(void, glRasterPos3fv, (const GLfloat *v))
-ANT_GL_DECL(void, glRasterPos3i, (GLint x, GLint y, GLint z))
-ANT_GL_DECL(void, glRasterPos3iv, (const GLint *v))
-ANT_GL_DECL(void, glRasterPos3s, (GLshort x, GLshort y, GLshort z))
-ANT_GL_DECL(void, glRasterPos3sv, (const GLshort *v))
-ANT_GL_DECL(void, glRasterPos4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w))
-ANT_GL_DECL(void, glRasterPos4dv, (const GLdouble *v))
-ANT_GL_DECL(void, glRasterPos4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w))
-ANT_GL_DECL(void, glRasterPos4fv, (const GLfloat *v))
-ANT_GL_DECL(void, glRasterPos4i, (GLint x, GLint y, GLint z, GLint w))
-ANT_GL_DECL(void, glRasterPos4iv, (const GLint *v))
-ANT_GL_DECL(void, glRasterPos4s, (GLshort x, GLshort y, GLshort z, GLshort w))
-ANT_GL_DECL(void, glRasterPos4sv, (const GLshort *v))
-ANT_GL_DECL(void, glReadBuffer, (GLenum mode))
-ANT_GL_DECL(void, glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels))
-ANT_GL_DECL(void, glRectd, (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2))
-ANT_GL_DECL(void, glRectdv, (const GLdouble *v1, const GLdouble *v2))
-ANT_GL_DECL(void, glRectf, (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2))
-ANT_GL_DECL(void, glRectfv, (const GLfloat *v1, const GLfloat *v2))
-ANT_GL_DECL(void, glRecti, (GLint x1, GLint y1, GLint x2, GLint y2))
-ANT_GL_DECL(void, glRectiv, (const GLint *v1, const GLint *v2))
-ANT_GL_DECL(void, glRects, (GLshort x1, GLshort y1, GLshort x2, GLshort y2))
-ANT_GL_DECL(void, glRectsv, (const GLshort *v1, const GLshort *v2))
-ANT_GL_DECL(GLint, glRenderMode, (GLenum mode))
-ANT_GL_DECL(void, glRotated, (GLdouble angle, GLdouble x, GLdouble y, GLdouble z))
-ANT_GL_DECL(void, glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z))
-ANT_GL_DECL(void, glScaled, (GLdouble x, GLdouble y, GLdouble z))
-ANT_GL_DECL(void, glScalef, (GLfloat x, GLfloat y, GLfloat z))
-ANT_GL_DECL(void, glScissor, (GLint x, GLint y, GLsizei width, GLsizei height))
-ANT_GL_DECL(void, glSelectBuffer, (GLsizei size, GLuint *buffer))
-ANT_GL_DECL(void, glShadeModel, (GLenum mode))
-ANT_GL_DECL(void, glStencilFunc, (GLenum func, GLint ref, GLuint mask))
-ANT_GL_DECL(void, glStencilMask, (GLuint mask))
-ANT_GL_DECL(void, glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass))
-ANT_GL_DECL(void, glTexCoord1d, (GLdouble s))
-ANT_GL_DECL(void, glTexCoord1dv, (const GLdouble *v))
-ANT_GL_DECL(void, glTexCoord1f, (GLfloat s))
-ANT_GL_DECL(void, glTexCoord1fv, (const GLfloat *v))
-ANT_GL_DECL(void, glTexCoord1i, (GLint s))
-ANT_GL_DECL(void, glTexCoord1iv, (const GLint *v))
-ANT_GL_DECL(void, glTexCoord1s, (GLshort s))
-ANT_GL_DECL(void, glTexCoord1sv, (const GLshort *v))
-ANT_GL_DECL(void, glTexCoord2d, (GLdouble s, GLdouble t))
-ANT_GL_DECL(void, glTexCoord2dv, (const GLdouble *v))
-ANT_GL_DECL(void, glTexCoord2f, (GLfloat s, GLfloat t))
-ANT_GL_DECL(void, glTexCoord2fv, (const GLfloat *v))
-ANT_GL_DECL(void, glTexCoord2i, (GLint s, GLint t))
-ANT_GL_DECL(void, glTexCoord2iv, (const GLint *v))
-ANT_GL_DECL(void, glTexCoord2s, (GLshort s, GLshort t))
-ANT_GL_DECL(void, glTexCoord2sv, (const GLshort *v))
-ANT_GL_DECL(void, glTexCoord3d, (GLdouble s, GLdouble t, GLdouble r))
-ANT_GL_DECL(void, glTexCoord3dv, (const GLdouble *v))
-ANT_GL_DECL(void, glTexCoord3f, (GLfloat s, GLfloat t, GLfloat r))
-ANT_GL_DECL(void, glTexCoord3fv, (const GLfloat *v))
-ANT_GL_DECL(void, glTexCoord3i, (GLint s, GLint t, GLint r))
-ANT_GL_DECL(void, glTexCoord3iv, (const GLint *v))
-ANT_GL_DECL(void, glTexCoord3s, (GLshort s, GLshort t, GLshort r))
-ANT_GL_DECL(void, glTexCoord3sv, (const GLshort *v))
-ANT_GL_DECL(void, glTexCoord4d, (GLdouble s, GLdouble t, GLdouble r, GLdouble q))
-ANT_GL_DECL(void, glTexCoord4dv, (const GLdouble *v))
-ANT_GL_DECL(void, glTexCoord4f, (GLfloat s, GLfloat t, GLfloat r, GLfloat q))
-ANT_GL_DECL(void, glTexCoord4fv, (const GLfloat *v))
-ANT_GL_DECL(void, glTexCoord4i, (GLint s, GLint t, GLint r, GLint q))
-ANT_GL_DECL(void, glTexCoord4iv, (const GLint *v))
-ANT_GL_DECL(void, glTexCoord4s, (GLshort s, GLshort t, GLshort r, GLshort q))
-ANT_GL_DECL(void, glTexCoord4sv, (const GLshort *v))
-ANT_GL_DECL(void, glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
-ANT_GL_DECL(void, glTexEnvf, (GLenum target, GLenum pname, GLfloat param))
-ANT_GL_DECL(void, glTexEnvfv, (GLenum target, GLenum pname, const GLfloat *params))
-ANT_GL_DECL(void, glTexEnvi, (GLenum target, GLenum pname, GLint param))
-ANT_GL_DECL(void, glTexEnviv, (GLenum target, GLenum pname, const GLint *params))
-ANT_GL_DECL(void, glTexGend, (GLenum coord, GLenum pname, GLdouble param))
-ANT_GL_DECL(void, glTexGendv, (GLenum coord, GLenum pname, const GLdouble *params))
-ANT_GL_DECL(void, glTexGenf, (GLenum coord, GLenum pname, GLfloat param))
-ANT_GL_DECL(void, glTexGenfv, (GLenum coord, GLenum pname, const GLfloat *params))
-ANT_GL_DECL(void, glTexGeni, (GLenum coord, GLenum pname, GLint param))
-ANT_GL_DECL(void, glTexGeniv, (GLenum coord, GLenum pname, const GLint *params))
-#if defined(ANT_OSX)
-// Mac OSX redefined these OpenGL calls: glTexImage1D, glTexImage2D
-ANT_GL_DECL(void, glTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
-ANT_GL_DECL(void, glTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
-#else
-ANT_GL_DECL(void, glTexImage1D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
-ANT_GL_DECL(void, glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
-#endif
-ANT_GL_DECL(void, glTexParameterf, (GLenum target, GLenum pname, GLfloat param))
-ANT_GL_DECL(void, glTexParameterfv, (GLenum target, GLenum pname, const GLfloat *params))
-ANT_GL_DECL(void, glTexParameteri, (GLenum target, GLenum pname, GLint param))
-ANT_GL_DECL(void, glTexParameteriv, (GLenum target, GLenum pname, const GLint *params))
-ANT_GL_DECL(void, glTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels))
-ANT_GL_DECL(void, glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels))
-ANT_GL_DECL(void, glTranslated, (GLdouble x, GLdouble y, GLdouble z))
-ANT_GL_DECL(void, glTranslatef, (GLfloat x, GLfloat y, GLfloat z))
-ANT_GL_DECL(void, glVertex2d, (GLdouble x, GLdouble y))
-ANT_GL_DECL(void, glVertex2dv, (const GLdouble *v))
-ANT_GL_DECL(void, glVertex2f, (GLfloat x, GLfloat y))
-ANT_GL_DECL(void, glVertex2fv, (const GLfloat *v))
-ANT_GL_DECL(void, glVertex2i, (GLint x, GLint y))
-ANT_GL_DECL(void, glVertex2iv, (const GLint *v))
-ANT_GL_DECL(void, glVertex2s, (GLshort x, GLshort y))
-ANT_GL_DECL(void, glVertex2sv, (const GLshort *v))
-ANT_GL_DECL(void, glVertex3d, (GLdouble x, GLdouble y, GLdouble z))
-ANT_GL_DECL(void, glVertex3dv, (const GLdouble *v))
-ANT_GL_DECL(void, glVertex3f, (GLfloat x, GLfloat y, GLfloat z))
-ANT_GL_DECL(void, glVertex3fv, (const GLfloat *v))
-ANT_GL_DECL(void, glVertex3i, (GLint x, GLint y, GLint z))
-ANT_GL_DECL(void, glVertex3iv, (const GLint *v))
-ANT_GL_DECL(void, glVertex3s, (GLshort x, GLshort y, GLshort z))
-ANT_GL_DECL(void, glVertex3sv, (const GLshort *v))
-ANT_GL_DECL(void, glVertex4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w))
-ANT_GL_DECL(void, glVertex4dv, (const GLdouble *v))
-ANT_GL_DECL(void, glVertex4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w))
-ANT_GL_DECL(void, glVertex4fv, (const GLfloat *v))
-ANT_GL_DECL(void, glVertex4i, (GLint x, GLint y, GLint z, GLint w))
-ANT_GL_DECL(void, glVertex4iv, (const GLint *v))
-ANT_GL_DECL(void, glVertex4s, (GLshort x, GLshort y, GLshort z, GLshort w))
-ANT_GL_DECL(void, glVertex4sv, (const GLshort *v))
-ANT_GL_DECL(void, glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
-ANT_GL_DECL(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height))
-
-#ifdef ANT_WINDOWS
-ANT_GL_DECL(PROC, wglGetProcAddress, (LPCSTR))
-#endif                                                                                                                                                                                                                                                                                                                                                
-
-
-#endif // !defined ANT_LOAD_OGL_INCLUDED
+//  ---------------------------------------------------------------------------
+//
+//  @file       LoadOGL.h
+//  @brief      OpenGL declarations for dynamic loading
+//  @author     Philippe Decaudin - http://www.antisphere.com
+//  @license    This file is part of the AntTweakBar library.
+//              For conditions of distribution and use, see License.txt
+//
+//  note:       Private header
+//
+//  ---------------------------------------------------------------------------
+
+
+#if !defined ANT_LOAD_OGL_INCLUDED
+#define ANT_LOAD_OGL_INCLUDED
+
+
+#define ANT_GL_DECL(_Ret, _Fct, _Params) \
+    extern "C" { typedef _Ret (APIENTRY* PFN##_Fct)_Params; } \
+    namespace GL { extern PFN##_Fct _##_Fct; } \
+    using GL::_##_Fct;
+
+#if defined(ANT_WINDOWS)
+#   define ANT_GL_IMPL(_Fct) \
+        namespace GL { PFN##_Fct _##_Fct = (PFN##_Fct)Record(#_Fct, (PFNOpenGL*)(&_##_Fct)); }
+#elif defined(ANT_UNIX) || defined(ANT_OSX)
+#   define ANT_GL_IMPL(_Fct) \
+        namespace GL { PFN##_Fct _##_Fct = _Fct; }
+#   if !defined(APIENTRY)
+#       define APIENTRY
+#   endif
+#endif
+
+
+int LoadOpenGL();
+int UnloadOpenGL();
+
+namespace GL
+{
+    extern "C" { typedef void (APIENTRY* PFNOpenGL)(); }
+    PFNOpenGL Record(const char *_FuncName, PFNOpenGL *_FuncPtr);
+
+    extern "C" { typedef PFNOpenGL (APIENTRY *PFNGLGetProcAddress)(const char *); }
+    extern PFNGLGetProcAddress _glGetProcAddress;
+}
+using GL::_glGetProcAddress;
+
+ 
+ANT_GL_DECL(void, glAccum, (GLenum op, GLfloat value))
+ANT_GL_DECL(void, glAlphaFunc, (GLenum func, GLclampf ref))
+ANT_GL_DECL(GLboolean, glAreTexturesResident, (GLsizei n, const GLuint *textures, GLboolean *residences))
+ANT_GL_DECL(void, glArrayElement, (GLint i))
+ANT_GL_DECL(void, glBegin, (GLenum mode))
+ANT_GL_DECL(void, glBindTexture, (GLenum target, GLuint texture))
+ANT_GL_DECL(void, glBitmap, (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap))
+ANT_GL_DECL(void, glBlendFunc, (GLenum sfactor, GLenum dfactor))
+ANT_GL_DECL(void, glCallList, (GLuint list))
+ANT_GL_DECL(void, glCallLists, (GLsizei n, GLenum type, const GLvoid *lists))
+ANT_GL_DECL(void, glClear, (GLbitfield mask))
+ANT_GL_DECL(void, glClearAccum, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha))
+ANT_GL_DECL(void, glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha))
+ANT_GL_DECL(void, glClearDepth, (GLclampd depth))
+ANT_GL_DECL(void, glClearIndex, (GLfloat c))
+ANT_GL_DECL(void, glClearStencil, (GLint s))
+ANT_GL_DECL(void, glClipPlane, (GLenum plane, const GLdouble *equation))
+ANT_GL_DECL(void, glColor3b, (GLbyte red, GLbyte green, GLbyte blue))
+ANT_GL_DECL(void, glColor3bv, (const GLbyte *v))
+ANT_GL_DECL(void, glColor3d, (GLdouble red, GLdouble green, GLdouble blue))
+ANT_GL_DECL(void, glColor3dv, (const GLdouble *v))
+ANT_GL_DECL(void, glColor3f, (GLfloat red, GLfloat green, GLfloat blue))
+ANT_GL_DECL(void, glColor3fv, (const GLfloat *v))
+ANT_GL_DECL(void, glColor3i, (GLint red, GLint green, GLint blue))
+ANT_GL_DECL(void, glColor3iv, (const GLint *v))
+ANT_GL_DECL(void, glColor3s, (GLshort red, GLshort green, GLshort blue))
+ANT_GL_DECL(void, glColor3sv, (const GLshort *v))
+ANT_GL_DECL(void, glColor3ub, (GLubyte red, GLubyte green, GLubyte blue))
+ANT_GL_DECL(void, glColor3ubv, (const GLubyte *v))
+ANT_GL_DECL(void, glColor3ui, (GLuint red, GLuint green, GLuint blue))
+ANT_GL_DECL(void, glColor3uiv, (const GLuint *v))
+ANT_GL_DECL(void, glColor3us, (GLushort red, GLushort green, GLushort blue))
+ANT_GL_DECL(void, glColor3usv, (const GLushort *v))
+ANT_GL_DECL(void, glColor4b, (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha))
+ANT_GL_DECL(void, glColor4bv, (const GLbyte *v))
+ANT_GL_DECL(void, glColor4d, (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha))
+ANT_GL_DECL(void, glColor4dv, (const GLdouble *v))
+ANT_GL_DECL(void, glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha))
+ANT_GL_DECL(void, glColor4fv, (const GLfloat *v))
+ANT_GL_DECL(void, glColor4i, (GLint red, GLint green, GLint blue, GLint alpha))
+ANT_GL_DECL(void, glColor4iv, (const GLint *v))
+ANT_GL_DECL(void, glColor4s, (GLshort red, GLshort green, GLshort blue, GLshort alpha))
+ANT_GL_DECL(void, glColor4sv, (const GLshort *v))
+ANT_GL_DECL(void, glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha))
+ANT_GL_DECL(void, glColor4ubv, (const GLubyte *v))
+ANT_GL_DECL(void, glColor4ui, (GLuint red, GLuint green, GLuint blue, GLuint alpha))
+ANT_GL_DECL(void, glColor4uiv, (const GLuint *v))
+ANT_GL_DECL(void, glColor4us, (GLushort red, GLushort green, GLushort blue, GLushort alpha))
+ANT_GL_DECL(void, glColor4usv, (const GLushort *v))
+ANT_GL_DECL(void, glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha))
+ANT_GL_DECL(void, glColorMaterial, (GLenum face, GLenum mode))
+ANT_GL_DECL(void, glColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
+ANT_GL_DECL(void, glCopyPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type))
+ANT_GL_DECL(void, glCopyTexImage1D, (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border))
+ANT_GL_DECL(void, glCopyTexImage2D, (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border))
+ANT_GL_DECL(void, glCopyTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width))
+ANT_GL_DECL(void, glCopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height))
+ANT_GL_DECL(void, glCullFace, (GLenum mode))
+ANT_GL_DECL(void, glDeleteLists, (GLuint list, GLsizei range))
+ANT_GL_DECL(void, glDeleteTextures, (GLsizei n, const GLuint *textures))
+ANT_GL_DECL(void, glDepthFunc, (GLenum func))
+ANT_GL_DECL(void, glDepthMask, (GLboolean flag))
+ANT_GL_DECL(void, glDepthRange, (GLclampd zNear, GLclampd zFar))
+ANT_GL_DECL(void, glDisable, (GLenum cap))
+ANT_GL_DECL(void, glDisableClientState, (GLenum array))
+ANT_GL_DECL(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count))
+ANT_GL_DECL(void, glDrawBuffer, (GLenum mode))
+ANT_GL_DECL(void, glDrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices))
+ANT_GL_DECL(void, glDrawPixels, (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels))
+ANT_GL_DECL(void, glEdgeFlag, (GLboolean flag))
+ANT_GL_DECL(void, glEdgeFlagPointer, (GLsizei stride, const void *pointer))
+ANT_GL_DECL(void, glEdgeFlagv, (const GLboolean *flag))
+ANT_GL_DECL(void, glEnable, (GLenum cap))
+ANT_GL_DECL(void, glEnableClientState, (GLenum array))
+ANT_GL_DECL(void, glEnd, (void))
+ANT_GL_DECL(void, glEndList, (void))
+ANT_GL_DECL(void, glEvalCoord1d, (GLdouble u))
+ANT_GL_DECL(void, glEvalCoord1dv, (const GLdouble *u))
+ANT_GL_DECL(void, glEvalCoord1f, (GLfloat u))
+ANT_GL_DECL(void, glEvalCoord1fv, (const GLfloat *u))
+ANT_GL_DECL(void, glEvalCoord2d, (GLdouble u, GLdouble v))
+ANT_GL_DECL(void, glEvalCoord2dv, (const GLdouble *u))
+ANT_GL_DECL(void, glEvalCoord2f, (GLfloat u, GLfloat v))
+ANT_GL_DECL(void, glEvalCoord2fv, (const GLfloat *u))
+ANT_GL_DECL(void, glEvalMesh1, (GLenum mode, GLint i1, GLint i2))
+ANT_GL_DECL(void, glEvalMesh2, (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2))
+ANT_GL_DECL(void, glEvalPoint1, (GLint i))
+ANT_GL_DECL(void, glEvalPoint2, (GLint i, GLint j))
+ANT_GL_DECL(void, glFeedbackBuffer, (GLsizei size, GLenum type, GLfloat *buffer))
+ANT_GL_DECL(void, glFinish, (void))
+ANT_GL_DECL(void, glFlush, (void))
+ANT_GL_DECL(void, glFogf, (GLenum pname, GLfloat param))
+ANT_GL_DECL(void, glFogfv, (GLenum pname, const GLfloat *params))
+ANT_GL_DECL(void, glFogi, (GLenum pname, GLint param))
+ANT_GL_DECL(void, glFogiv, (GLenum pname, const GLint *params))
+ANT_GL_DECL(void, glFrontFace, (GLenum mode))
+ANT_GL_DECL(void, glFrustum, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar))
+ANT_GL_DECL(GLuint, glGenLists, (GLsizei range))
+ANT_GL_DECL(void, glGenTextures, (GLsizei n, GLuint *textures))
+ANT_GL_DECL(void, glGetBooleanv, (GLenum pname, GLboolean *params))
+ANT_GL_DECL(void, glGetClipPlane, (GLenum plane, GLdouble *equation))
+ANT_GL_DECL(void, glGetDoublev, (GLenum pname, GLdouble *params))
+ANT_GL_DECL(GLenum, glGetError, (void))
+ANT_GL_DECL(void, glGetFloatv, (GLenum pname, GLfloat *params))
+ANT_GL_DECL(void, glGetIntegerv, (GLenum pname, GLint *params))
+ANT_GL_DECL(void, glGetLightfv, (GLenum light, GLenum pname, GLfloat *params))
+ANT_GL_DECL(void, glGetLightiv, (GLenum light, GLenum pname, GLint *params))
+ANT_GL_DECL(void, glGetMapdv, (GLenum target, GLenum query, GLdouble *v))
+ANT_GL_DECL(void, glGetMapfv, (GLenum target, GLenum query, GLfloat *v))
+ANT_GL_DECL(void, glGetMapiv, (GLenum target, GLenum query, GLint *v))
+ANT_GL_DECL(void, glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params))
+ANT_GL_DECL(void, glGetMaterialiv, (GLenum face, GLenum pname, GLint *params))
+ANT_GL_DECL(void, glGetPixelMapfv, (GLenum map, GLfloat *values))
+ANT_GL_DECL(void, glGetPixelMapuiv, (GLenum map, GLuint *values))
+ANT_GL_DECL(void, glGetPixelMapusv, (GLenum map, GLushort *values))
+ANT_GL_DECL(void, glGetPointerv, (GLenum pname, GLvoid* *params))
+ANT_GL_DECL(void, glGetPolygonStipple, (GLubyte *mask))
+ANT_GL_DECL(const GLubyte *, glGetString, (GLenum name))
+ANT_GL_DECL(void, glGetTexEnvfv, (GLenum target, GLenum pname, GLfloat *params))
+ANT_GL_DECL(void, glGetTexEnviv, (GLenum target, GLenum pname, GLint *params))
+ANT_GL_DECL(void, glGetTexGendv, (GLenum coord, GLenum pname, GLdouble *params))
+ANT_GL_DECL(void, glGetTexGenfv, (GLenum coord, GLenum pname, GLfloat *params))
+ANT_GL_DECL(void, glGetTexGeniv, (GLenum coord, GLenum pname, GLint *params))
+ANT_GL_DECL(void, glGetTexImage, (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels))
+ANT_GL_DECL(void, glGetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params))
+ANT_GL_DECL(void, glGetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params))
+ANT_GL_DECL(void, glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params))
+ANT_GL_DECL(void, glGetTexParameteriv, (GLenum target, GLenum pname, GLint *params))
+ANT_GL_DECL(void, glHint, (GLenum target, GLenum mode))
+ANT_GL_DECL(void, glIndexMask, (GLuint mask))
+ANT_GL_DECL(void, glIndexPointer, (GLenum type, GLsizei stride, const GLvoid *pointer))
+ANT_GL_DECL(void, glIndexd, (GLdouble c))
+ANT_GL_DECL(void, glIndexdv, (const GLdouble *c))
+ANT_GL_DECL(void, glIndexf, (GLfloat c))
+ANT_GL_DECL(void, glIndexfv, (const GLfloat *c))
+ANT_GL_DECL(void, glIndexi, (GLint c))
+ANT_GL_DECL(void, glIndexiv, (const GLint *c))
+ANT_GL_DECL(void, glIndexs, (GLshort c))
+ANT_GL_DECL(void, glIndexsv, (const GLshort *c))
+ANT_GL_DECL(void, glIndexub, (GLubyte c))
+ANT_GL_DECL(void, glIndexubv, (const GLubyte *c))
+ANT_GL_DECL(void, glInitNames, (void))
+ANT_GL_DECL(void, glInterleavedArrays, (GLenum format, GLsizei stride, const GLvoid *pointer))
+ANT_GL_DECL(GLboolean, glIsEnabled, (GLenum cap))
+ANT_GL_DECL(GLboolean, glIsList, (GLuint list))
+ANT_GL_DECL(GLboolean, glIsTexture, (GLuint texture))
+ANT_GL_DECL(void, glLightModelf, (GLenum pname, GLfloat param))
+ANT_GL_DECL(void, glLightModelfv, (GLenum pname, const GLfloat *params))
+ANT_GL_DECL(void, glLightModeli, (GLenum pname, GLint param))
+ANT_GL_DECL(void, glLightModeliv, (GLenum pname, const GLint *params))
+ANT_GL_DECL(void, glLightf, (GLenum light, GLenum pname, GLfloat param))
+ANT_GL_DECL(void, glLightfv, (GLenum light, GLenum pname, const GLfloat *params))
+ANT_GL_DECL(void, glLighti, (GLenum light, GLenum pname, GLint param))
+ANT_GL_DECL(void, glLightiv, (GLenum light, GLenum pname, const GLint *params))
+ANT_GL_DECL(void, glLineStipple, (GLint factor, GLushort pattern))
+ANT_GL_DECL(void, glLineWidth, (GLfloat width))
+ANT_GL_DECL(void, glListBase, (GLuint base))
+ANT_GL_DECL(void, glLoadIdentity, (void))
+ANT_GL_DECL(void, glLoadMatrixd, (const GLdouble *m))
+ANT_GL_DECL(void, glLoadMatrixf, (const GLfloat *m))
+ANT_GL_DECL(void, glLoadName, (GLuint name))
+ANT_GL_DECL(void, glLogicOp, (GLenum opcode))
+ANT_GL_DECL(void, glMap1d, (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points))
+ANT_GL_DECL(void, glMap1f, (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points))
+ANT_GL_DECL(void, glMap2d, (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points))
+ANT_GL_DECL(void, glMap2f, (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points))
+ANT_GL_DECL(void, glMapGrid1d, (GLint un, GLdouble u1, GLdouble u2))
+ANT_GL_DECL(void, glMapGrid1f, (GLint un, GLfloat u1, GLfloat u2))
+ANT_GL_DECL(void, glMapGrid2d, (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2))
+ANT_GL_DECL(void, glMapGrid2f, (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2))
+ANT_GL_DECL(void, glMaterialf, (GLenum face, GLenum pname, GLfloat param))
+ANT_GL_DECL(void, glMaterialfv, (GLenum face, GLenum pname, const GLfloat *params))
+ANT_GL_DECL(void, glMateriali, (GLenum face, GLenum pname, GLint param))
+ANT_GL_DECL(void, glMaterialiv, (GLenum face, GLenum pname, const GLint *params))
+ANT_GL_DECL(void, glMatrixMode, (GLenum mode))
+ANT_GL_DECL(void, glMultMatrixd, (const GLdouble *m))
+ANT_GL_DECL(void, glMultMatrixf, (const GLfloat *m))
+ANT_GL_DECL(void, glNewList, (GLuint list, GLenum mode))
+ANT_GL_DECL(void, glNormal3b, (GLbyte nx, GLbyte ny, GLbyte nz))
+ANT_GL_DECL(void, glNormal3bv, (const GLbyte *v))
+ANT_GL_DECL(void, glNormal3d, (GLdouble nx, GLdouble ny, GLdouble nz))
+ANT_GL_DECL(void, glNormal3dv, (const GLdouble *v))
+ANT_GL_DECL(void, glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz))
+ANT_GL_DECL(void, glNormal3fv, (const GLfloat *v))
+ANT_GL_DECL(void, glNormal3i, (GLint nx, GLint ny, GLint nz))
+ANT_GL_DECL(void, glNormal3iv, (const GLint *v))
+ANT_GL_DECL(void, glNormal3s, (GLshort nx, GLshort ny, GLshort nz))
+ANT_GL_DECL(void, glNormal3sv, (const GLshort *v))
+ANT_GL_DECL(void, glNormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer))
+ANT_GL_DECL(void, glOrtho, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar))
+ANT_GL_DECL(void, glPassThrough, (GLfloat token))
+ANT_GL_DECL(void, glPixelMapfv, (GLenum map, GLsizei mapsize, const GLfloat *values))
+ANT_GL_DECL(void, glPixelMapuiv, (GLenum map, GLsizei mapsize, const GLuint *values))
+ANT_GL_DECL(void, glPixelMapusv, (GLenum map, GLsizei mapsize, const GLushort *values))
+ANT_GL_DECL(void, glPixelStoref, (GLenum pname, GLfloat param))
+ANT_GL_DECL(void, glPixelStorei, (GLenum pname, GLint param))
+ANT_GL_DECL(void, glPixelTransferf, (GLenum pname, GLfloat param))
+ANT_GL_DECL(void, glPixelTransferi, (GLenum pname, GLint param))
+ANT_GL_DECL(void, glPixelZoom, (GLfloat xfactor, GLfloat yfactor))
+ANT_GL_DECL(void, glPointSize, (GLfloat size))
+ANT_GL_DECL(void, glPolygonMode, (GLenum face, GLenum mode))
+ANT_GL_DECL(void, glPolygonOffset, (GLfloat factor, GLfloat units))
+ANT_GL_DECL(void, glPolygonStipple, (const GLubyte *mask))
+ANT_GL_DECL(void, glPopAttrib, (void))
+ANT_GL_DECL(void, glPopClientAttrib, (void))
+ANT_GL_DECL(void, glPopMatrix, (void))
+ANT_GL_DECL(void, glPopName, (void))
+ANT_GL_DECL(void, glPrioritizeTextures, (GLsizei n, const GLuint *textures, const GLclampf *priorities))
+ANT_GL_DECL(void, glPushAttrib, (GLbitfield mask))
+ANT_GL_DECL(void, glPushClientAttrib, (GLbitfield mask))
+ANT_GL_DECL(void, glPushMatrix, (void))
+ANT_GL_DECL(void, glPushName, (GLuint name))
+ANT_GL_DECL(void, glRasterPos2d, (GLdouble x, GLdouble y))
+ANT_GL_DECL(void, glRasterPos2dv, (const GLdouble *v))
+ANT_GL_DECL(void, glRasterPos2f, (GLfloat x, GLfloat y))
+ANT_GL_DECL(void, glRasterPos2fv, (const GLfloat *v))
+ANT_GL_DECL(void, glRasterPos2i, (GLint x, GLint y))
+ANT_GL_DECL(void, glRasterPos2iv, (const GLint *v))
+ANT_GL_DECL(void, glRasterPos2s, (GLshort x, GLshort y))
+ANT_GL_DECL(void, glRasterPos2sv, (const GLshort *v))
+ANT_GL_DECL(void, glRasterPos3d, (GLdouble x, GLdouble y, GLdouble z))
+ANT_GL_DECL(void, glRasterPos3dv, (const GLdouble *v))
+ANT_GL_DECL(void, glRasterPos3f, (GLfloat x, GLfloat y, GLfloat z))
+ANT_GL_DECL(void, glRasterPos3fv, (const GLfloat *v))
+ANT_GL_DECL(void, glRasterPos3i, (GLint x, GLint y, GLint z))
+ANT_GL_DECL(void, glRasterPos3iv, (const GLint *v))
+ANT_GL_DECL(void, glRasterPos3s, (GLshort x, GLshort y, GLshort z))
+ANT_GL_DECL(void, glRasterPos3sv, (const GLshort *v))
+ANT_GL_DECL(void, glRasterPos4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w))
+ANT_GL_DECL(void, glRasterPos4dv, (const GLdouble *v))
+ANT_GL_DECL(void, glRasterPos4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w))
+ANT_GL_DECL(void, glRasterPos4fv, (const GLfloat *v))
+ANT_GL_DECL(void, glRasterPos4i, (GLint x, GLint y, GLint z, GLint w))
+ANT_GL_DECL(void, glRasterPos4iv, (const GLint *v))
+ANT_GL_DECL(void, glRasterPos4s, (GLshort x, GLshort y, GLshort z, GLshort w))
+ANT_GL_DECL(void, glRasterPos4sv, (const GLshort *v))
+ANT_GL_DECL(void, glReadBuffer, (GLenum mode))
+ANT_GL_DECL(void, glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels))
+ANT_GL_DECL(void, glRectd, (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2))
+ANT_GL_DECL(void, glRectdv, (const GLdouble *v1, const GLdouble *v2))
+ANT_GL_DECL(void, glRectf, (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2))
+ANT_GL_DECL(void, glRectfv, (const GLfloat *v1, const GLfloat *v2))
+ANT_GL_DECL(void, glRecti, (GLint x1, GLint y1, GLint x2, GLint y2))
+ANT_GL_DECL(void, glRectiv, (const GLint *v1, const GLint *v2))
+ANT_GL_DECL(void, glRects, (GLshort x1, GLshort y1, GLshort x2, GLshort y2))
+ANT_GL_DECL(void, glRectsv, (const GLshort *v1, const GLshort *v2))
+ANT_GL_DECL(GLint, glRenderMode, (GLenum mode))
+ANT_GL_DECL(void, glRotated, (GLdouble angle, GLdouble x, GLdouble y, GLdouble z))
+ANT_GL_DECL(void, glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z))
+ANT_GL_DECL(void, glScaled, (GLdouble x, GLdouble y, GLdouble z))
+ANT_GL_DECL(void, glScalef, (GLfloat x, GLfloat y, GLfloat z))
+ANT_GL_DECL(void, glScissor, (GLint x, GLint y, GLsizei width, GLsizei height))
+ANT_GL_DECL(void, glSelectBuffer, (GLsizei size, GLuint *buffer))
+ANT_GL_DECL(void, glShadeModel, (GLenum mode))
+ANT_GL_DECL(void, glStencilFunc, (GLenum func, GLint ref, GLuint mask))
+ANT_GL_DECL(void, glStencilMask, (GLuint mask))
+ANT_GL_DECL(void, glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass))
+ANT_GL_DECL(void, glTexCoord1d, (GLdouble s))
+ANT_GL_DECL(void, glTexCoord1dv, (const GLdouble *v))
+ANT_GL_DECL(void, glTexCoord1f, (GLfloat s))
+ANT_GL_DECL(void, glTexCoord1fv, (const GLfloat *v))
+ANT_GL_DECL(void, glTexCoord1i, (GLint s))
+ANT_GL_DECL(void, glTexCoord1iv, (const GLint *v))
+ANT_GL_DECL(void, glTexCoord1s, (GLshort s))
+ANT_GL_DECL(void, glTexCoord1sv, (const GLshort *v))
+ANT_GL_DECL(void, glTexCoord2d, (GLdouble s, GLdouble t))
+ANT_GL_DECL(void, glTexCoord2dv, (const GLdouble *v))
+ANT_GL_DECL(void, glTexCoord2f, (GLfloat s, GLfloat t))
+ANT_GL_DECL(void, glTexCoord2fv, (const GLfloat *v))
+ANT_GL_DECL(void, glTexCoord2i, (GLint s, GLint t))
+ANT_GL_DECL(void, glTexCoord2iv, (const GLint *v))
+ANT_GL_DECL(void, glTexCoord2s, (GLshort s, GLshort t))
+ANT_GL_DECL(void, glTexCoord2sv, (const GLshort *v))
+ANT_GL_DECL(void, glTexCoord3d, (GLdouble s, GLdouble t, GLdouble r))
+ANT_GL_DECL(void, glTexCoord3dv, (const GLdouble *v))
+ANT_GL_DECL(void, glTexCoord3f, (GLfloat s, GLfloat t, GLfloat r))
+ANT_GL_DECL(void, glTexCoord3fv, (const GLfloat *v))
+ANT_GL_DECL(void, glTexCoord3i, (GLint s, GLint t, GLint r))
+ANT_GL_DECL(void, glTexCoord3iv, (const GLint *v))
+ANT_GL_DECL(void, glTexCoord3s, (GLshort s, GLshort t, GLshort r))
+ANT_GL_DECL(void, glTexCoord3sv, (const GLshort *v))
+ANT_GL_DECL(void, glTexCoord4d, (GLdouble s, GLdouble t, GLdouble r, GLdouble q))
+ANT_GL_DECL(void, glTexCoord4dv, (const GLdouble *v))
+ANT_GL_DECL(void, glTexCoord4f, (GLfloat s, GLfloat t, GLfloat r, GLfloat q))
+ANT_GL_DECL(void, glTexCoord4fv, (const GLfloat *v))
+ANT_GL_DECL(void, glTexCoord4i, (GLint s, GLint t, GLint r, GLint q))
+ANT_GL_DECL(void, glTexCoord4iv, (const GLint *v))
+ANT_GL_DECL(void, glTexCoord4s, (GLshort s, GLshort t, GLshort r, GLshort q))
+ANT_GL_DECL(void, glTexCoord4sv, (const GLshort *v))
+ANT_GL_DECL(void, glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
+ANT_GL_DECL(void, glTexEnvf, (GLenum target, GLenum pname, GLfloat param))
+ANT_GL_DECL(void, glTexEnvfv, (GLenum target, GLenum pname, const GLfloat *params))
+ANT_GL_DECL(void, glTexEnvi, (GLenum target, GLenum pname, GLint param))
+ANT_GL_DECL(void, glTexEnviv, (GLenum target, GLenum pname, const GLint *params))
+ANT_GL_DECL(void, glTexGend, (GLenum coord, GLenum pname, GLdouble param))
+ANT_GL_DECL(void, glTexGendv, (GLenum coord, GLenum pname, const GLdouble *params))
+ANT_GL_DECL(void, glTexGenf, (GLenum coord, GLenum pname, GLfloat param))
+ANT_GL_DECL(void, glTexGenfv, (GLenum coord, GLenum pname, const GLfloat *params))
+ANT_GL_DECL(void, glTexGeni, (GLenum coord, GLenum pname, GLint param))
+ANT_GL_DECL(void, glTexGeniv, (GLenum coord, GLenum pname, const GLint *params))
+#if defined(ANT_OSX)
+// Mac OSX redefined these OpenGL calls: glTexImage1D, glTexImage2D
+ANT_GL_DECL(void, glTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
+ANT_GL_DECL(void, glTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
+#else
+ANT_GL_DECL(void, glTexImage1D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
+ANT_GL_DECL(void, glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
+#endif
+ANT_GL_DECL(void, glTexParameterf, (GLenum target, GLenum pname, GLfloat param))
+ANT_GL_DECL(void, glTexParameterfv, (GLenum target, GLenum pname, const GLfloat *params))
+ANT_GL_DECL(void, glTexParameteri, (GLenum target, GLenum pname, GLint param))
+ANT_GL_DECL(void, glTexParameteriv, (GLenum target, GLenum pname, const GLint *params))
+ANT_GL_DECL(void, glTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels))
+ANT_GL_DECL(void, glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels))
+ANT_GL_DECL(void, glTranslated, (GLdouble x, GLdouble y, GLdouble z))
+ANT_GL_DECL(void, glTranslatef, (GLfloat x, GLfloat y, GLfloat z))
+ANT_GL_DECL(void, glVertex2d, (GLdouble x, GLdouble y))
+ANT_GL_DECL(void, glVertex2dv, (const GLdouble *v))
+ANT_GL_DECL(void, glVertex2f, (GLfloat x, GLfloat y))
+ANT_GL_DECL(void, glVertex2fv, (const GLfloat *v))
+ANT_GL_DECL(void, glVertex2i, (GLint x, GLint y))
+ANT_GL_DECL(void, glVertex2iv, (const GLint *v))
+ANT_GL_DECL(void, glVertex2s, (GLshort x, GLshort y))
+ANT_GL_DECL(void, glVertex2sv, (const GLshort *v))
+ANT_GL_DECL(void, glVertex3d, (GLdouble x, GLdouble y, GLdouble z))
+ANT_GL_DECL(void, glVertex3dv, (const GLdouble *v))
+ANT_GL_DECL(void, glVertex3f, (GLfloat x, GLfloat y, GLfloat z))
+ANT_GL_DECL(void, glVertex3fv, (const GLfloat *v))
+ANT_GL_DECL(void, glVertex3i, (GLint x, GLint y, GLint z))
+ANT_GL_DECL(void, glVertex3iv, (const GLint *v))
+ANT_GL_DECL(void, glVertex3s, (GLshort x, GLshort y, GLshort z))
+ANT_GL_DECL(void, glVertex3sv, (const GLshort *v))
+ANT_GL_DECL(void, glVertex4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w))
+ANT_GL_DECL(void, glVertex4dv, (const GLdouble *v))
+ANT_GL_DECL(void, glVertex4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w))
+ANT_GL_DECL(void, glVertex4fv, (const GLfloat *v))
+ANT_GL_DECL(void, glVertex4i, (GLint x, GLint y, GLint z, GLint w))
+ANT_GL_DECL(void, glVertex4iv, (const GLint *v))
+ANT_GL_DECL(void, glVertex4s, (GLshort x, GLshort y, GLshort z, GLshort w))
+ANT_GL_DECL(void, glVertex4sv, (const GLshort *v))
+ANT_GL_DECL(void, glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
+ANT_GL_DECL(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height))
+
+#ifdef ANT_WINDOWS
+ANT_GL_DECL(PROC, wglGetProcAddress, (LPCSTR))
+#endif                                                                                                                                                                                                                                                                                                                                                
+
+
+#endif // !defined ANT_LOAD_OGL_INCLUDED
-//  ---------------------------------------------------------------------------
-//
-//  @file       TwBar.h
-//  @brief      Tweak bar and var classes.
-//  @author     Philippe Decaudin - http://www.antisphere.com
-//  @license    This file is part of the AntTweakBar library.
-//              For conditions of distribution and use, see License.txt
-//
-//  notes:      Private header
-//              TAB=4
-//
-//  ---------------------------------------------------------------------------
-
-
-#if !defined ANT_TW_BAR_INCLUDED
-#define ANT_TW_BAR_INCLUDED
-
-#include <AntTweakBar.h>
-#include "TwColors.h"
-  
-#define ANT_TWEAK_BAR_DLL "AntTweakBar"
-
-
-//  ---------------------------------------------------------------------------
-
-struct CTwVar
-{
-    std::string             m_Name;
-    std::string             m_Label;
-    std::string             m_Help;
-    bool                    m_IsRoot;
-    bool                    m_DontClip;
-    bool                    m_Visible;
-    signed short            m_LeftMargin;
-    signed short            m_TopMargin;
-    const color32 *         m_ColorPtr;
-    const color32 *         m_BgColorPtr;
-
-    virtual bool            IsGroup() const = 0;
-    virtual const CTwVar *  Find(const char *_Name, struct CTwVarGroup **_Parent, int *_Index) const = 0;
-    virtual int             HasAttrib(const char *_Attrib, bool *_HasValue) const;
-    virtual int             SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex);
-    virtual ERetType        GetAttrib(int _AttribID, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex, std::vector<double>& outDouble, std::ostringstream& outString) const;
-    virtual void            SetReadOnly(bool _ReadOnly) = 0;
-    virtual bool            IsReadOnly() const = 0;
-                            CTwVar();
-    virtual                 ~CTwVar() {}
-
-    static size_t           GetDataSize(TwType _Type);
-};
-
-
-struct CTwVarAtom : CTwVar
-{
-    ETwType                 m_Type;
-    void *                  m_Ptr;
-    TwSetVarCallback        m_SetCallback;
-    TwGetVarCallback        m_GetCallback;
-    void *                  m_ClientData;
-    bool                    m_ReadOnly;
-    bool                    m_NoSlider;
-    int                     m_KeyIncr[2];   // [0]=key_code [1]=modifiers
-    int                     m_KeyDecr[2];   // [0]=key_code [1]=modifiers
-
-    template <typename _T>  struct TVal
-    {
-        _T                  m_Min;
-        _T                  m_Max;
-        _T                  m_Step;
-        signed char         m_Precision;
-        bool                m_Hexa;
-    };
-    union UVal
-    {
-        TVal<unsigned char> m_Char;
-        TVal<signed char>   m_Int8;
-        TVal<unsigned char> m_UInt8;
-        TVal<signed short>  m_Int16;
-        TVal<unsigned short>m_UInt16;
-        TVal<signed int>    m_Int32;
-        TVal<unsigned int>  m_UInt32;
-        TVal<float>         m_Float32;
-        TVal<double>        m_Float64;
-        struct CBoolVal
-        {
-            char *          m_TrueString;
-            char *          m_FalseString;
-            bool            m_FreeTrueString;
-            bool            m_FreeFalseString;
-        }                   m_Bool;
-        struct CEnumVal     // empty -> enum entries are deduced from m_Type
-        {
-            //typedef std::map<unsigned int, std::string> CEntries;
-            //CEntries *    m_Entries;
-        }                   m_Enum;
-        struct CShortcutVal
-        {
-            int             m_Incr[2];
-            int             m_Decr[2];
-        }                   m_Shortcut;
-        struct CHelpStruct
-        {
-            int             m_StructType;
-        }                   m_HelpStruct;
-        struct CButtonVal
-        {
-            TwButtonCallback m_Callback;
-            int             m_Separator;
-        }                   m_Button;
-        struct CCustomVal
-        {
-            CTwMgr::CMemberProxy *m_MemberProxy;
-        }                   m_Custom;
-    };
-    UVal                    m_Val;
-
-    virtual bool            IsGroup() const { return false; }
-    virtual void            ValueToString(std::string *_Str) const;
-    virtual double          ValueToDouble() const;
-    virtual void            ValueFromDouble(double _Val);
-    virtual void            MinMaxStepToDouble(double *_Min, double *_Max, double *_Step) const;
-    virtual const CTwVar *  Find(const char *_Name, struct CTwVarGroup **_Parent, int *_Index) const;
-    virtual int             HasAttrib(const char *_Attrib, bool *_HasValue) const;
-    virtual int             SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex);
-    virtual ERetType        GetAttrib(int _AttribID, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex, std::vector<double>& outDouble, std::ostringstream& outString) const;
-    virtual void            Increment(int _Step);
-    virtual void            SetDefaults();
-    virtual void            SetReadOnly(bool _ReadOnly) { m_ReadOnly=_ReadOnly; if( m_Type!=TW_TYPE_BUTTON && m_SetCallback==NULL && m_Ptr==NULL ) m_ReadOnly=true; }
-    virtual bool            IsReadOnly() const { if( m_Type!=TW_TYPE_BUTTON && m_SetCallback==NULL && m_Ptr==NULL ) return true; else return m_ReadOnly; }
-    //virtual int           DefineEnum(const TwEnumVal *_EnumValues, unsigned int _NbValues);
-                            CTwVarAtom();
-    virtual                 ~CTwVarAtom();
-};
-
-
-struct CTwVarGroup : CTwVar
-{
-    std::vector<CTwVar *>   m_Vars;
-    bool                    m_Open;
-    TwSummaryCallback       m_SummaryCallback;
-    void *                  m_SummaryClientData;
-    void *                  m_StructValuePtr;
-    TwType                  m_StructType;
-
-    virtual bool            IsGroup() const { return true; }
-    virtual const CTwVar *  Find(const char *_Name, CTwVarGroup **_Parent, int *_Index) const;
-    virtual int             HasAttrib(const char *_Attrib, bool *_HasValue) const;
-    virtual int             SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex);
-    virtual ERetType        GetAttrib(int _AttribID, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex, std::vector<double>& outDouble, std::ostringstream& outString) const;
-    virtual CTwVarAtom *    FindShortcut(int _Key, int _Modifiers, bool *_DoIncr);
-    virtual void            SetReadOnly(bool _ReadOnly) { for(size_t i=0; i<m_Vars.size(); ++i) if(m_Vars[i]) m_Vars[i]->SetReadOnly(_ReadOnly); }
-    virtual bool            IsReadOnly() const { for(size_t i=0; i<m_Vars.size(); ++i) if(m_Vars[i] && !m_Vars[i]->IsReadOnly()) return false; return true; }
-                            CTwVarGroup()   { m_Open=false; m_StructType=TW_TYPE_UNDEF; m_SummaryCallback=NULL; m_SummaryClientData=NULL; m_StructValuePtr=NULL; }
-    virtual                 ~CTwVarGroup();
-};
-
-//  ---------------------------------------------------------------------------
-
-struct CTwBar
-{
-    std::string             m_Name;
-    std::string             m_Label;
-    std::string             m_Help;
-    bool                    m_Visible;
-    int                     m_PosX;
-    int                     m_PosY;
-    int                     m_Width;
-    int                     m_Height;
-    color32                 m_Color;
-    bool                    m_DarkText;
-    const CTexFont *        m_Font;
-    int                     m_ValuesWidth;
-    int                     m_Sep;
-    int                     m_FirstLine;
-    float                   m_UpdatePeriod;
-    bool                    m_IsHelpBar;
-    int                     m_MinNumber;    // accessed by TwDeleteBar
-    bool                    m_IsPopupList;
-    CTwVarAtom *            m_VarEnumLinkedToPopupList;
-    CTwBar *                m_BarLinkedToPopupList;
-    bool                    m_Resizable;
-    bool                    m_Movable;
-    bool                    m_Iconifiable;
-    bool                    m_Contained;
-
-    CTwVarGroup             m_VarRoot;
-
-    void                    NotUpToDate();
-    void                    Draw();
-    const CTwVar *          Find(const char *_Name, CTwVarGroup **_Parent=NULL, int *_Index=NULL) const;
-    CTwVar *                Find(const char *_Name, CTwVarGroup **_Parent=NULL, int *_Index=NULL);
-    int                     HasAttrib(const char *_Attrib, bool *_HasValue) const;
-    int                     SetAttrib(int _AttribID, const char *_Value);
-    ERetType                GetAttrib(int _AttribID, std::vector<double>& outDouble, std::ostringstream& outString) const;
-    bool                    MouseMotion(int _X, int _Y);
-    bool                    MouseButton(ETwMouseButtonID _Button, bool _Pressed, int _X, int _Y);
-    bool                    MouseWheel(int _Pos, int _PrevPos, int _MouseX, int _MouseY);
-    bool                    KeyPressed(int _Key, int _Modifiers);
-    bool                    IsMinimized() const { return m_IsMinimized; }
-    bool                    IsDragging() const  { return m_MouseDrag; }
-    bool                    Show(CTwVar *_Var); // display the line associated to _Var
-    bool                    OpenHier(CTwVarGroup *_Root, CTwVar *_Var); // open a hierarchy if it contains _Var
-    int                     LineInHier(CTwVarGroup *_Root, CTwVar *_Var); // returns the number of the line associated to _Var
-    void                    UnHighlightLine() { m_HighlightedLine = -1; NotUpToDate(); } // used by PopupCallback
-    void                    HaveFocus(bool _Focus) { m_DrawHandles = _Focus; }           // used by PopupCallback
-    void                    StopEditInPlace() { if( m_EditInPlace.m_Active ) EditInPlaceEnd(false); }
-                            CTwBar(const char *_Name);
-                            ~CTwBar();
-
-    color32                 m_ColBg, m_ColBg1, m_ColBg2;
-    color32                 m_ColHighBg0;
-    color32                 m_ColHighBg1;
-    color32                 m_ColLabelText;
-    color32                 m_ColStructText;
-    color32                 m_ColValBg;
-    color32                 m_ColValText;
-    color32                 m_ColValTextRO;
-    color32                 m_ColValTextNE;
-    color32                 m_ColValMin;
-    color32                 m_ColValMax;
-    color32                 m_ColStructBg;
-    color32                 m_ColTitleBg;
-    color32                 m_ColTitleHighBg;
-    color32                 m_ColTitleUnactiveBg;
-    color32                 m_ColTitleText;
-    color32                 m_ColTitleShadow;
-    color32                 m_ColLine;
-    color32                 m_ColLineShadow;
-    color32                 m_ColUnderline;
-    color32                 m_ColBtn;
-    color32                 m_ColHighBtn;
-    color32                 m_ColFold;
-    color32                 m_ColHighFold;
-    color32                 m_ColGrpBg;
-    color32                 m_ColGrpText;
-    color32                 m_ColHierBg;
-    color32                 m_ColShortcutText;
-    color32                 m_ColShortcutBg;
-    color32                 m_ColInfoText;
-    color32                 m_ColHelpBg;
-    color32                 m_ColHelpText;
-    color32                 m_ColRoto;
-    color32                 m_ColRotoVal;
-    color32                 m_ColRotoBound;
-    color32                 m_ColEditBg;
-    color32                 m_ColEditText;
-    color32                 m_ColEditSelBg;
-    color32                 m_ColEditSelText;
-    color32                 m_ColSeparator;
-    color32                 m_ColStaticText;
-    void                    UpdateColors();
-
-protected:
-    int                     m_TitleWidth;
-    int                     m_VarX0;
-    int                     m_VarX1;
-    int                     m_VarX2;
-    int                     m_VarY0;
-    int                     m_VarY1;
-    int                     m_VarY2;
-    int                     m_ScrollYW;
-    int                     m_ScrollYH;
-    int                     m_ScrollY0;
-    int                     m_ScrollY1;
-    int                     m_NbHierLines;
-    int                     m_NbDisplayedLines;
-    bool                    m_UpToDate;
-    float                   m_LastUpdateTime;
-    void                    Update();
-
-    bool                    m_MouseDrag;
-    bool                    m_MouseDragVar;
-    bool                    m_MouseDragTitle;
-    bool                    m_MouseDragScroll;
-    bool                    m_MouseDragResizeUR;
-    bool                    m_MouseDragResizeUL;
-    bool                    m_MouseDragResizeLR;
-    bool                    m_MouseDragResizeLL;
-    bool                    m_MouseDragValWidth;
-    int                     m_MouseOriginX;
-    int                     m_MouseOriginY;
-    bool                    m_VarHasBeenIncr;
-    int                     m_FirstLine0;
-    int                     m_HighlightedLine;
-    int                     m_HighlightedLinePrev;
-    int                     m_HighlightedLineLastValid;
-    bool                    m_HighlightIncrBtn;
-    bool                    m_HighlightDecrBtn;
-    bool                    m_HighlightRotoBtn;
-    bool                    m_HighlightListBtn;
-    bool                    m_HighlightBoolBtn;
-    bool                    m_HighlightClickBtn;
-    double                  m_HighlightClickBtnAuto;
-    bool                    m_HighlightTitle;
-    bool                    m_HighlightScroll;
-    bool                    m_HighlightUpScroll;
-    bool                    m_HighlightDnScroll;
-    bool                    m_HighlightMinimize;
-    bool                    m_HighlightFont;
-    bool                    m_HighlightValWidth;
-    bool                    m_DrawHandles;
-
-    bool                    m_IsMinimized;
-    int                     m_MinPosX;
-    int                     m_MinPosY;
-    bool                    m_HighlightMaximize;
-    bool                    m_DrawIncrDecrBtn;
-    bool                    m_DrawRotoBtn;
-    bool                    m_DrawClickBtn;
-    bool                    m_DrawListBtn;
-    bool                    m_DrawBoolBtn;
-
-    struct CHierTag
-    {
-        CTwVar *            m_Var;
-        int                 m_Level;
-        bool                m_Closing;
-    };
-    std::vector<CHierTag>   m_HierTags;
-    void                    BrowseHierarchy(int *_LineNum, int _CurrLevel, const CTwVar *_Var, int _First, int _Last);
-    void *                  m_TitleTextObj;
-    void *                  m_LabelsTextObj;
-    void *                  m_ValuesTextObj;
-    void *                  m_ShortcutTextObj;
-    int                     m_ShortcutLine;
-    void                    ListLabels(std::vector<std::string>& _Labels, std::vector<color32>& _Colors, std::vector<color32>& _BgColors, bool *_HasBgColors, const CTexFont *_Font, int _AtomWidthMax, int _GroupWidthMax);
-    void                    ListValues(std::vector<std::string>& _Values, std::vector<color32>& _Colors, std::vector<color32>& _BgColors, const CTexFont *_Font, int _WidthMax);
-    void                    DrawHierHandle();
-  
-    // RotoSlider
-    struct  CPoint 
-    {
-        int                 x, y;
-                            CPoint() {}
-                            CPoint(int _X, int _Y):x(_X), y(_Y) {}
-        const CPoint        operator+ (const CPoint& p) const { return CPoint(x+p.x, y+p.y); }
-        const CPoint        operator- (const CPoint& p) const { return CPoint(x-p.x, y-p.y); }
-    };
-    struct CRotoSlider
-    {
-                            CRotoSlider();
-        CTwVarAtom *        m_Var;
-        double              m_PreciseValue;
-        double              m_CurrentValue;
-        double              m_Value0;
-        double              m_ValueAngle0;
-        bool                m_Active;
-        bool                m_ActiveMiddle;
-        CPoint              m_Origin;
-        CPoint              m_Current;
-        bool                m_HasPrevious;
-        CPoint              m_Previous;
-        double              m_Angle0;
-        double              m_AngleDT;
-        int                 m_Subdiv;
-    };
-    CRotoSlider             m_Roto;
-    int                     m_RotoMinRadius;
-    int                     m_RotoNbSubdiv; // number of steps for one turn
-    void                    RotoDraw();
-    void                    RotoOnMouseMove(int _X, int _Y);
-    void                    RotoOnLButtonDown(int _X, int _Y);
-    void                    RotoOnLButtonUp(int _X, int _Y);
-    void                    RotoOnMButtonDown(int _X, int _Y);
-    void                    RotoOnMButtonUp(int _X, int _Y);
-    double                  RotoGetValue() const;
-    void                    RotoSetValue(double _Val);
-    double                  RotoGetMin() const;
-    double                  RotoGetMax() const;
-    double                  RotoGetStep() const;
-    double                  RotoGetSteppedValue() const;
-
-    // Edit-in-place
-    struct CEditInPlace
-    {
-                            CEditInPlace();
-                            ~CEditInPlace();
-        CTwVarAtom *        m_Var;
-        bool                m_Active;
-        std::string         m_String;
-        void *              m_EditTextObj;
-        void *              m_EditSelTextObj;
-        int                 m_CaretPos;
-        int                 m_SelectionStart;
-        int                 m_X, m_Y;
-        int                 m_Width;
-        int                 m_FirstChar;
-        std::string         m_Clipboard;
-    };
-    CEditInPlace            m_EditInPlace;
-    void                    EditInPlaceDraw();
-    bool                    EditInPlaceAcceptVar(const CTwVarAtom* _Var);
-    bool                    EditInPlaceIsReadOnly();
-    void                    EditInPlaceStart(CTwVarAtom* _Var, int _X, int _Y, int _Width);
-    void                    EditInPlaceEnd(bool _Commit);
-    bool                    EditInPlaceKeyPressed(int _Key, int _Modifiers);
-    bool                    EditInPlaceEraseSelect();
-    bool                    EditInPlaceMouseMove(int _X, int _Y, bool _Select);
-    bool                    EditInPlaceSetClipboard(const std::string& _String);
-    bool                    EditInPlaceGetClipboard(std::string *_OutString);
-
-    struct CCustomRecord
-    {
-        int                 m_IndexMin;
-        int                 m_IndexMax;
-        int                 m_XMin, m_XMax;
-        int                 m_YMin, m_YMax; // Y visible range
-        int                 m_Y0, m_Y1;     // Y widget range
-        CTwVarGroup *       m_Var;
-    };
-    typedef std::map<CTwMgr::CStructProxy*, CCustomRecord> CustomMap;
-    CustomMap               m_CustomRecords;
-    CTwMgr::CStructProxy *  m_CustomActiveStructProxy;
-
-    friend struct CTwMgr;
-};
-
-void DrawArc(int _X, int _Y, int _Radius, float _StartAngleDeg, float _EndAngleDeg, color32 _Color);
-
-//  ---------------------------------------------------------------------------
-
-
-#endif // !defined ANT_TW_BAR_INCLUDED
+//  ---------------------------------------------------------------------------
+//
+//  @file       TwBar.h
+//  @brief      Tweak bar and var classes.
+//  @author     Philippe Decaudin - http://www.antisphere.com
+//  @license    This file is part of the AntTweakBar library.
+//              For conditions of distribution and use, see License.txt
+//
+//  note:       Private header
+//
+//  ---------------------------------------------------------------------------
+
+
+#if !defined ANT_TW_BAR_INCLUDED
+#define ANT_TW_BAR_INCLUDED
+
+#include <AntTweakBar.h>
+#include "TwColors.h"
+  
+#define ANT_TWEAK_BAR_DLL "AntTweakBar"
+
+
+//  ---------------------------------------------------------------------------
+
+bool IsCustomType(int _Type);
+
+struct CTwVar
+{
+    std::string             m_Name;
+    std::string             m_Label;
+    std::string             m_Help;
+    bool                    m_IsRoot;
+    bool                    m_DontClip;
+    bool                    m_Visible;
+    signed short            m_LeftMargin;
+    signed short            m_TopMargin;
+    const color32 *         m_ColorPtr;
+    const color32 *         m_BgColorPtr;
+
+    virtual bool            IsGroup() const = 0;
+    virtual bool            IsCustom() const { return false; }
+    virtual const CTwVar *  Find(const char *_Name, struct CTwVarGroup **_Parent, int *_Index) const = 0;
+    virtual int             HasAttrib(const char *_Attrib, bool *_HasValue) const;
+    virtual int             SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex);
+    virtual ERetType        GetAttrib(int _AttribID, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex, std::vector<double>& outDouble, std::ostringstream& outString) const;
+    virtual void            SetReadOnly(bool _ReadOnly) = 0;
+    virtual bool            IsReadOnly() const = 0;
+                            CTwVar();
+    virtual                 ~CTwVar() {}
+
+    static size_t           GetDataSize(TwType _Type);
+};
+
+
+struct CTwVarAtom : CTwVar
+{
+    ETwType                 m_Type;
+    void *                  m_Ptr;
+    TwSetVarCallback        m_SetCallback;
+    TwGetVarCallback        m_GetCallback;
+    void *                  m_ClientData;
+    bool                    m_ReadOnly;
+    bool                    m_NoSlider;
+    int                     m_KeyIncr[2];   // [0]=key_code [1]=modifiers
+    int                     m_KeyDecr[2];   // [0]=key_code [1]=modifiers
+
+    template <typename _T>  struct TVal
+    {
+        _T                  m_Min;
+        _T                  m_Max;
+        _T                  m_Step;
+        signed char         m_Precision;
+        bool                m_Hexa;
+    };
+    union UVal
+    {
+        TVal<unsigned char> m_Char;
+        TVal<signed char>   m_Int8;
+        TVal<unsigned char> m_UInt8;
+        TVal<signed short>  m_Int16;
+        TVal<unsigned short>m_UInt16;
+        TVal<signed int>    m_Int32;
+        TVal<unsigned int>  m_UInt32;
+        TVal<float>         m_Float32;
+        TVal<double>        m_Float64;
+        struct CBoolVal
+        {
+            char *          m_TrueString;
+            char *          m_FalseString;
+            bool            m_FreeTrueString;
+            bool            m_FreeFalseString;
+        }                   m_Bool;
+        struct CEnumVal     // empty -> enum entries are deduced from m_Type
+        {
+            //typedef std::map<unsigned int, std::string> CEntries;
+            //CEntries *    m_Entries;
+        }                   m_Enum;
+        struct CShortcutVal
+        {
+            int             m_Incr[2];
+            int             m_Decr[2];
+        }                   m_Shortcut;
+        struct CHelpStruct
+        {
+            int             m_StructType;
+        }                   m_HelpStruct;
+        struct CButtonVal
+        {
+            TwButtonCallback m_Callback;
+            int             m_Separator;
+        }                   m_Button;
+        struct CCustomVal
+        {
+            CTwMgr::CMemberProxy *m_MemberProxy;
+        }                   m_Custom;
+    };
+    UVal                    m_Val;
+
+    virtual bool            IsGroup() const { return false; }
+    virtual bool            IsCustom() const { return IsCustomType(m_Type); }
+    virtual void            ValueToString(std::string *_Str) const;
+    virtual double          ValueToDouble() const;
+    virtual void            ValueFromDouble(double _Val);
+    virtual void            MinMaxStepToDouble(double *_Min, double *_Max, double *_Step) const;
+    virtual const CTwVar *  Find(const char *_Name, struct CTwVarGroup **_Parent, int *_Index) const;
+    virtual int             HasAttrib(const char *_Attrib, bool *_HasValue) const;
+    virtual int             SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex);
+    virtual ERetType        GetAttrib(int _AttribID, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex, std::vector<double>& outDouble, std::ostringstream& outString) const;
+    virtual void            Increment(int _Step);
+    virtual void            SetDefaults();
+    virtual void            SetReadOnly(bool _ReadOnly) { m_ReadOnly=_ReadOnly; if( m_Type!=TW_TYPE_BUTTON && m_SetCallback==NULL && m_Ptr==NULL ) m_ReadOnly=true; }
+    virtual bool            IsReadOnly() const { if( m_Type!=TW_TYPE_BUTTON && m_SetCallback==NULL && m_Ptr==NULL ) return true; else return m_ReadOnly; }
+    //virtual int           DefineEnum(const TwEnumVal *_EnumValues, unsigned int _NbValues);
+                            CTwVarAtom();
+    virtual                 ~CTwVarAtom();
+};
+
+
+struct CTwVarGroup : CTwVar
+{
+    std::vector<CTwVar *>   m_Vars;
+    bool                    m_Open;
+    TwSummaryCallback       m_SummaryCallback;
+    void *                  m_SummaryClientData;
+    void *                  m_StructValuePtr;
+    TwType                  m_StructType;
+
+    virtual bool            IsGroup() const { return true; }
+    virtual const CTwVar *  Find(const char *_Name, CTwVarGroup **_Parent, int *_Index) const;
+    virtual int             HasAttrib(const char *_Attrib, bool *_HasValue) const;
+    virtual int             SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex);
+    virtual ERetType        GetAttrib(int _AttribID, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex, std::vector<double>& outDouble, std::ostringstream& outString) const;
+    virtual CTwVarAtom *    FindShortcut(int _Key, int _Modifiers, bool *_DoIncr);
+    virtual void            SetReadOnly(bool _ReadOnly) { for(size_t i=0; i<m_Vars.size(); ++i) if(m_Vars[i]) m_Vars[i]->SetReadOnly(_ReadOnly); }
+    virtual bool            IsReadOnly() const { for(size_t i=0; i<m_Vars.size(); ++i) if(m_Vars[i] && !m_Vars[i]->IsReadOnly()) return false; return true; }
+                            CTwVarGroup()   { m_Open=false; m_StructType=TW_TYPE_UNDEF; m_SummaryCallback=NULL; m_SummaryClientData=NULL; m_StructValuePtr=NULL; }
+    virtual                 ~CTwVarGroup();
+};
+
+//  ---------------------------------------------------------------------------
+
+struct CTwBar
+{