/* NOTE: Do not edit this file, it is generated by a script:
   ExportTrace.py --api glut 0 --prefix traceGLUT -t traverseTraceGLUT --library GLUT -o traceGLUT.c -e GLUTAPIENTRY
*/

#include <stdlib.h>
#include <string.h>
#include "trace.h"

#include <Cg/cgGL.h>

#ifdef _WIN32
# define DLLEXPORT __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__>=4
# define DLLEXPORT __attribute__ ((visibility("default")))
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# define DLLEXPORT __global
#else
# define DLLEXPORT
#endif

/* Define GLUT calling convention. */

#if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(_MSC_VER)
# define GLUTCALLBACK __stdcall
# define GLUTAPIENTRY __stdcall
# define CDECL        __cdecl
#else
# define GLUTCALLBACK
# define GLUTAPIENTRY
# define CDECL
#endif

/* Undefine DLLEXPORT for Windows. Use module definition file instead. */

#if defined(_WIN32)
# undef  DLLEXPORT
# define DLLEXPORT
#endif

/* Define GLUT Stroke and Bitmap fonts. */

DLLEXPORT void *glutStrokeRoman        = NULL;
DLLEXPORT void *glutStrokeMonoRoman    = NULL;
DLLEXPORT void *glutBitmap9By15        = NULL;
DLLEXPORT void *glutBitmap8By13        = NULL;
DLLEXPORT void *glutBitmapTimesRoman10 = NULL;
DLLEXPORT void *glutBitmapTimesRoman24 = NULL;
DLLEXPORT void *glutBitmapHelvetica10  = NULL;
DLLEXPORT void *glutBitmapHelvetica12  = NULL;
DLLEXPORT void *glutBitmapHelvetica18  = NULL;

/* Declare GLUT API functions. */

DLLEXPORT void GLUTAPIENTRY glutInit(int *, char **);
DLLEXPORT void GLUTAPIENTRY __glutInitWithExit(int *, char **, void (CDECL *)(int));
DLLEXPORT void GLUTAPIENTRY glutInitDisplayMode(unsigned int);
DLLEXPORT void GLUTAPIENTRY glutInitDisplayString(const char *);
DLLEXPORT void GLUTAPIENTRY glutInitWindowPosition(int, int);
DLLEXPORT void GLUTAPIENTRY glutInitWindowSize(int, int);
DLLEXPORT void GLUTAPIENTRY glutMainLoop(void);
DLLEXPORT int GLUTAPIENTRY glutCreateWindow(const char *);
DLLEXPORT int GLUTAPIENTRY __glutCreateWindowWithExit(const char *, void (CDECL *)(int));
DLLEXPORT int GLUTAPIENTRY glutCreateSubWindow(int, int, int, int, int);
DLLEXPORT void GLUTAPIENTRY glutDestroyWindow(int);
DLLEXPORT void GLUTAPIENTRY glutPostRedisplay(void);
DLLEXPORT void GLUTAPIENTRY glutPostWindowRedisplay(int);
DLLEXPORT void GLUTAPIENTRY glutSwapBuffers(void);
DLLEXPORT int GLUTAPIENTRY glutGetWindow(void);
DLLEXPORT void GLUTAPIENTRY glutSetWindow(int);
DLLEXPORT void GLUTAPIENTRY glutSetWindowTitle(const char *);
DLLEXPORT void GLUTAPIENTRY glutSetIconTitle(const char *);
DLLEXPORT void GLUTAPIENTRY glutPositionWindow(int, int);
DLLEXPORT void GLUTAPIENTRY glutReshapeWindow(int, int);
DLLEXPORT void GLUTAPIENTRY glutPopWindow(void);
DLLEXPORT void GLUTAPIENTRY glutPushWindow(void);
DLLEXPORT void GLUTAPIENTRY glutIconifyWindow(void);
DLLEXPORT void GLUTAPIENTRY glutShowWindow(void);
DLLEXPORT void GLUTAPIENTRY glutHideWindow(void);
DLLEXPORT void GLUTAPIENTRY glutFullScreen(void);
DLLEXPORT void GLUTAPIENTRY glutSetCursor(int);
DLLEXPORT void GLUTAPIENTRY glutWarpPointer(int, int);
DLLEXPORT void GLUTAPIENTRY glutEstablishOverlay(void);
DLLEXPORT void GLUTAPIENTRY glutRemoveOverlay(void);
DLLEXPORT void GLUTAPIENTRY glutUseLayer(GLenum);
DLLEXPORT void GLUTAPIENTRY glutPostOverlayRedisplay(void);
DLLEXPORT void GLUTAPIENTRY glutPostWindowOverlayRedisplay(int);
DLLEXPORT void GLUTAPIENTRY glutShowOverlay(void);
DLLEXPORT void GLUTAPIENTRY glutHideOverlay(void);
DLLEXPORT int GLUTAPIENTRY glutCreateMenu(void (GLUTCALLBACK *)(int));
DLLEXPORT int GLUTAPIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *)(int), void (CDECL *)(int));
DLLEXPORT void GLUTAPIENTRY glutDestroyMenu(int);
DLLEXPORT int GLUTAPIENTRY glutGetMenu(void);
DLLEXPORT void GLUTAPIENTRY glutSetMenu(int);
DLLEXPORT void GLUTAPIENTRY glutAddMenuEntry(const char *, int);
DLLEXPORT void GLUTAPIENTRY glutAddSubMenu(const char *, int);
DLLEXPORT void GLUTAPIENTRY glutChangeToMenuEntry(int, const char *, int);
DLLEXPORT void GLUTAPIENTRY glutChangeToSubMenu(int, const char *, int);
DLLEXPORT void GLUTAPIENTRY glutRemoveMenuItem(int);
DLLEXPORT void GLUTAPIENTRY glutAttachMenu(int);
DLLEXPORT void GLUTAPIENTRY glutDetachMenu(int);
DLLEXPORT void GLUTAPIENTRY glutDisplayFunc(void (GLUTCALLBACK *)(void));
DLLEXPORT void GLUTAPIENTRY glutReshapeFunc(void (GLUTCALLBACK *)(int width, int height));
DLLEXPORT void GLUTAPIENTRY glutKeyboardFunc(void (GLUTCALLBACK *)(unsigned char key, int x, int y));
DLLEXPORT void GLUTAPIENTRY glutMouseFunc(void (GLUTCALLBACK *)(int button, int state, int x, int y));
DLLEXPORT void GLUTAPIENTRY glutMotionFunc(void (GLUTCALLBACK *)(int x, int y));
DLLEXPORT void GLUTAPIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *)(int x, int y));
DLLEXPORT void GLUTAPIENTRY glutEntryFunc(void (GLUTCALLBACK *)(int state));
DLLEXPORT void GLUTAPIENTRY glutVisibilityFunc(void (GLUTCALLBACK *)(int state));
DLLEXPORT void GLUTAPIENTRY glutIdleFunc(void (GLUTCALLBACK *)(void));
DLLEXPORT void GLUTAPIENTRY glutTimerFunc(unsigned int, void (GLUTCALLBACK *)(int value), int);
DLLEXPORT void GLUTAPIENTRY glutMenuStateFunc(void (GLUTCALLBACK *)(int state));
DLLEXPORT void GLUTAPIENTRY glutSpecialFunc(void (GLUTCALLBACK *)(int key, int x, int y));
DLLEXPORT void GLUTAPIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *)(int x, int y, int z));
DLLEXPORT void GLUTAPIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *)(int x, int y, int z));
DLLEXPORT void GLUTAPIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *)(int button,int state));
DLLEXPORT void GLUTAPIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *)(int button, int state));
DLLEXPORT void GLUTAPIENTRY glutDialsFunc(void (GLUTCALLBACK *)(int dial, int value));
DLLEXPORT void GLUTAPIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *)(int x, int y));
DLLEXPORT void GLUTAPIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *)(int button, int state, int x, int y));
DLLEXPORT void GLUTAPIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *)(int status, int x, int y));
DLLEXPORT void GLUTAPIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *)(void));
DLLEXPORT void GLUTAPIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *)(int state));
DLLEXPORT void GLUTAPIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *)(unsigned char key, int x, int y));
DLLEXPORT void GLUTAPIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *)(int key, int x, int y));
DLLEXPORT void GLUTAPIENTRY glutJoystickFunc(void (GLUTCALLBACK *)(unsigned int buttonMask, int x, int y, int z), int);
DLLEXPORT void GLUTAPIENTRY glutSetColor(int, GLfloat, GLfloat, GLfloat);
DLLEXPORT GLfloat GLUTAPIENTRY glutGetColor(int, int);
DLLEXPORT void GLUTAPIENTRY glutCopyColormap(int);
DLLEXPORT int GLUTAPIENTRY glutGet(GLenum);
DLLEXPORT int GLUTAPIENTRY glutDeviceGet(GLenum);
DLLEXPORT int GLUTAPIENTRY glutExtensionSupported(const char *);
DLLEXPORT int GLUTAPIENTRY glutGetModifiers(void);
DLLEXPORT int GLUTAPIENTRY glutLayerGet(GLenum);
DLLEXPORT void GLUTAPIENTRY glutBitmapCharacter(void *, int);
DLLEXPORT int GLUTAPIENTRY glutBitmapWidth(void *, int);
DLLEXPORT void GLUTAPIENTRY glutStrokeCharacter(void *, int);
DLLEXPORT int GLUTAPIENTRY glutStrokeWidth(void *, int);
DLLEXPORT int GLUTAPIENTRY glutBitmapLength(void *, const unsigned char *);
DLLEXPORT int GLUTAPIENTRY glutStrokeLength(void *, const unsigned char *);
DLLEXPORT float GLUTAPIENTRY glutStrokeWidthf(void *, int);
DLLEXPORT float GLUTAPIENTRY glutStrokeLengthf(void *, const unsigned char *);
DLLEXPORT void GLUTAPIENTRY glutWireSphere(GLdouble, GLint, GLint);
DLLEXPORT void GLUTAPIENTRY glutSolidSphere(GLdouble, GLint, GLint);
DLLEXPORT void GLUTAPIENTRY glutWireCone(GLdouble, GLdouble, GLint, GLint);
DLLEXPORT void GLUTAPIENTRY glutSolidCone(GLdouble, GLdouble, GLint, GLint);
DLLEXPORT void GLUTAPIENTRY glutWireCube(GLdouble);
DLLEXPORT void GLUTAPIENTRY glutSolidCube(GLdouble);
DLLEXPORT void GLUTAPIENTRY glutWireTorus(GLdouble, GLdouble, GLint, GLint);
DLLEXPORT void GLUTAPIENTRY glutSolidTorus(GLdouble, GLdouble, GLint, GLint);
DLLEXPORT void GLUTAPIENTRY glutWireDodecahedron(void);
DLLEXPORT void GLUTAPIENTRY glutSolidDodecahedron(void);
DLLEXPORT void GLUTAPIENTRY glutWireTeapot(GLdouble);
DLLEXPORT void GLUTAPIENTRY glutSolidTeapot(GLdouble);
DLLEXPORT void GLUTAPIENTRY glutWireOctahedron(void);
DLLEXPORT void GLUTAPIENTRY glutSolidOctahedron(void);
DLLEXPORT void GLUTAPIENTRY glutWireTetrahedron(void);
DLLEXPORT void GLUTAPIENTRY glutSolidTetrahedron(void);
DLLEXPORT void GLUTAPIENTRY glutWireIcosahedron(void);
DLLEXPORT void GLUTAPIENTRY glutSolidIcosahedron(void);
DLLEXPORT int GLUTAPIENTRY glutVideoResizeGet(GLenum);
DLLEXPORT void GLUTAPIENTRY glutSetupVideoResizing(void);
DLLEXPORT void GLUTAPIENTRY glutStopVideoResizing(void);
DLLEXPORT void GLUTAPIENTRY glutVideoResize(int, int, int, int);
DLLEXPORT void GLUTAPIENTRY glutVideoPan(int, int, int, int);
DLLEXPORT void GLUTAPIENTRY glutReportErrors(void);
DLLEXPORT void GLUTAPIENTRY glutIgnoreKeyRepeat(int);
DLLEXPORT void GLUTAPIENTRY glutSetKeyRepeat(int);
DLLEXPORT void GLUTAPIENTRY glutForceJoystickFunc(void);
DLLEXPORT void GLUTAPIENTRY glutGameModeString(const char *);
DLLEXPORT int GLUTAPIENTRY glutEnterGameMode(void);
DLLEXPORT void GLUTAPIENTRY glutLeaveGameMode(void);
DLLEXPORT int GLUTAPIENTRY glutGameModeGet(GLenum);

/* Load GLUT library. */

#if defined(_WIN32)
# if !defined(WIN32_LEAN_AND_MEAN)
#   define WIN32_LEAN_AND_MEAN 1
# endif
# if !defined(NOGDI)
#   define NOGDI 1
# endif
# include <windows.h>
# undef WIN32_LEAN_AND_MEAN
# undef NOGDI
#elif defined(__APPLE__)
# include <AvailabilityMacros.h>
# if !defined(MAC_OS_X_VERSION_10_3)
#   include <mach-o/dyld.h>
# else
#   include <dlfcn.h>
# endif
#else
# include <dlfcn.h>
#endif

typedef struct _TraceGLUT_Handle *TraceGLUT_Handle;

static TraceGLUT_Handle
traceGLUT_LoadLibrary(const char *filename)
{
#if defined(_WIN32)
  return (TraceGLUT_Handle) LoadLibrary(filename);
#elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_3)
  return (TraceGLUT_Handle) NSAddImage(filename, NSADDIMAGE_OPTION_NONE);
#else
  return (TraceGLUT_Handle) dlopen(filename, RTLD_LAZY);
#endif
}

static int
traceGLUT_FreeLibrary(TraceGLUT_Handle handle)
{
#if defined(_WIN32)
  return FreeLibrary((HMODULE)handle) ? 1 : 0;
#elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_3)
  return 1;
#else
  return dlclose(handle) ? 0 : 1;
#endif
}

static void *
traceGLUT_GetProcAddress(TraceGLUT_Handle handle, const char *name)
{
#if defined(_WIN32)
  return handle ? GetProcAddress((HMODULE)handle, name) : NULL;
#elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_3)
  return NSIsSymbolNameDefined(name) ? NSAddressOfSymbol(NSLookupAndBindSymbol(name)) : NULL;
#else
  return dlsym(handle, name);
#endif
}

static int traceGLUT_initialized = 0;
static TraceGLUT_Handle traceGLUT_handle = NULL;

/* GLUT API function pointers. */

struct TraceGLUT_Functions
{
  void (GLUTAPIENTRY *glutInit)(int *, char **);
  void (GLUTAPIENTRY *__glutInitWithExit)(int *, char **, void (CDECL *)(int));
  void (GLUTAPIENTRY *glutInitDisplayMode)(unsigned int);
  void (GLUTAPIENTRY *glutInitDisplayString)(const char *);
  void (GLUTAPIENTRY *glutInitWindowPosition)(int, int);
  void (GLUTAPIENTRY *glutInitWindowSize)(int, int);
  void (GLUTAPIENTRY *glutMainLoop)(void);
  int (GLUTAPIENTRY *glutCreateWindow)(const char *);
  int (GLUTAPIENTRY *__glutCreateWindowWithExit)(const char *, void (CDECL *)(int));
  int (GLUTAPIENTRY *glutCreateSubWindow)(int, int, int, int, int);
  void (GLUTAPIENTRY *glutDestroyWindow)(int);
  void (GLUTAPIENTRY *glutPostRedisplay)(void);
  void (GLUTAPIENTRY *glutPostWindowRedisplay)(int);
  void (GLUTAPIENTRY *glutSwapBuffers)(void);
  int (GLUTAPIENTRY *glutGetWindow)(void);
  void (GLUTAPIENTRY *glutSetWindow)(int);
  void (GLUTAPIENTRY *glutSetWindowTitle)(const char *);
  void (GLUTAPIENTRY *glutSetIconTitle)(const char *);
  void (GLUTAPIENTRY *glutPositionWindow)(int, int);
  void (GLUTAPIENTRY *glutReshapeWindow)(int, int);
  void (GLUTAPIENTRY *glutPopWindow)(void);
  void (GLUTAPIENTRY *glutPushWindow)(void);
  void (GLUTAPIENTRY *glutIconifyWindow)(void);
  void (GLUTAPIENTRY *glutShowWindow)(void);
  void (GLUTAPIENTRY *glutHideWindow)(void);
  void (GLUTAPIENTRY *glutFullScreen)(void);
  void (GLUTAPIENTRY *glutSetCursor)(int);
  void (GLUTAPIENTRY *glutWarpPointer)(int, int);
  void (GLUTAPIENTRY *glutEstablishOverlay)(void);
  void (GLUTAPIENTRY *glutRemoveOverlay)(void);
  void (GLUTAPIENTRY *glutUseLayer)(GLenum);
  void (GLUTAPIENTRY *glutPostOverlayRedisplay)(void);
  void (GLUTAPIENTRY *glutPostWindowOverlayRedisplay)(int);
  void (GLUTAPIENTRY *glutShowOverlay)(void);
  void (GLUTAPIENTRY *glutHideOverlay)(void);
  int (GLUTAPIENTRY *glutCreateMenu)(void (GLUTCALLBACK *)(int));
  int (GLUTAPIENTRY *__glutCreateMenuWithExit)(void (GLUTCALLBACK *)(int), void (CDECL *)(int));
  void (GLUTAPIENTRY *glutDestroyMenu)(int);
  int (GLUTAPIENTRY *glutGetMenu)(void);
  void (GLUTAPIENTRY *glutSetMenu)(int);
  void (GLUTAPIENTRY *glutAddMenuEntry)(const char *, int);
  void (GLUTAPIENTRY *glutAddSubMenu)(const char *, int);
  void (GLUTAPIENTRY *glutChangeToMenuEntry)(int, const char *, int);
  void (GLUTAPIENTRY *glutChangeToSubMenu)(int, const char *, int);
  void (GLUTAPIENTRY *glutRemoveMenuItem)(int);
  void (GLUTAPIENTRY *glutAttachMenu)(int);
  void (GLUTAPIENTRY *glutDetachMenu)(int);
  void (GLUTAPIENTRY *glutDisplayFunc)(void (GLUTCALLBACK *)(void));
  void (GLUTAPIENTRY *glutReshapeFunc)(void (GLUTCALLBACK *)(int width, int height));
  void (GLUTAPIENTRY *glutKeyboardFunc)(void (GLUTCALLBACK *)(unsigned char key, int x, int y));
  void (GLUTAPIENTRY *glutMouseFunc)(void (GLUTCALLBACK *)(int button, int state, int x, int y));
  void (GLUTAPIENTRY *glutMotionFunc)(void (GLUTCALLBACK *)(int x, int y));
  void (GLUTAPIENTRY *glutPassiveMotionFunc)(void (GLUTCALLBACK *)(int x, int y));
  void (GLUTAPIENTRY *glutEntryFunc)(void (GLUTCALLBACK *)(int state));
  void (GLUTAPIENTRY *glutVisibilityFunc)(void (GLUTCALLBACK *)(int state));
  void (GLUTAPIENTRY *glutIdleFunc)(void (GLUTCALLBACK *)(void));
  void (GLUTAPIENTRY *glutTimerFunc)(unsigned int, void (GLUTCALLBACK *)(int value), int);
  void (GLUTAPIENTRY *glutMenuStateFunc)(void (GLUTCALLBACK *)(int state));
  void (GLUTAPIENTRY *glutSpecialFunc)(void (GLUTCALLBACK *)(int key, int x, int y));
  void (GLUTAPIENTRY *glutSpaceballMotionFunc)(void (GLUTCALLBACK *)(int x, int y, int z));
  void (GLUTAPIENTRY *glutSpaceballRotateFunc)(void (GLUTCALLBACK *)(int x, int y, int z));
  void (GLUTAPIENTRY *glutSpaceballButtonFunc)(void (GLUTCALLBACK *)(int button,int state));
  void (GLUTAPIENTRY *glutButtonBoxFunc)(void (GLUTCALLBACK *)(int button, int state));
  void (GLUTAPIENTRY *glutDialsFunc)(void (GLUTCALLBACK *)(int dial, int value));
  void (GLUTAPIENTRY *glutTabletMotionFunc)(void (GLUTCALLBACK *)(int x, int y));
  void (GLUTAPIENTRY *glutTabletButtonFunc)(void (GLUTCALLBACK *)(int button, int state, int x, int y));
  void (GLUTAPIENTRY *glutMenuStatusFunc)(void (GLUTCALLBACK *)(int status, int x, int y));
  void (GLUTAPIENTRY *glutOverlayDisplayFunc)(void (GLUTCALLBACK *)(void));
  void (GLUTAPIENTRY *glutWindowStatusFunc)(void (GLUTCALLBACK *)(int state));
  void (GLUTAPIENTRY *glutKeyboardUpFunc)(void (GLUTCALLBACK *)(unsigned char key, int x, int y));
  void (GLUTAPIENTRY *glutSpecialUpFunc)(void (GLUTCALLBACK *)(int key, int x, int y));
  void (GLUTAPIENTRY *glutJoystickFunc)(void (GLUTCALLBACK *)(unsigned int buttonMask, int x, int y, int z), int);
  void (GLUTAPIENTRY *glutSetColor)(int, GLfloat, GLfloat, GLfloat);
  GLfloat (GLUTAPIENTRY *glutGetColor)(int, int);
  void (GLUTAPIENTRY *glutCopyColormap)(int);
  int (GLUTAPIENTRY *glutGet)(GLenum);
  int (GLUTAPIENTRY *glutDeviceGet)(GLenum);
  int (GLUTAPIENTRY *glutExtensionSupported)(const char *);
  int (GLUTAPIENTRY *glutGetModifiers)(void);
  int (GLUTAPIENTRY *glutLayerGet)(GLenum);
  void (GLUTAPIENTRY *glutBitmapCharacter)(void *, int);
  int (GLUTAPIENTRY *glutBitmapWidth)(void *, int);
  void (GLUTAPIENTRY *glutStrokeCharacter)(void *, int);
  int (GLUTAPIENTRY *glutStrokeWidth)(void *, int);
  int (GLUTAPIENTRY *glutBitmapLength)(void *, const unsigned char *);
  int (GLUTAPIENTRY *glutStrokeLength)(void *, const unsigned char *);
  float (GLUTAPIENTRY *glutStrokeWidthf)(void *, int);
  float (GLUTAPIENTRY *glutStrokeLengthf)(void *, const unsigned char *);
  void (GLUTAPIENTRY *glutWireSphere)(GLdouble, GLint, GLint);
  void (GLUTAPIENTRY *glutSolidSphere)(GLdouble, GLint, GLint);
  void (GLUTAPIENTRY *glutWireCone)(GLdouble, GLdouble, GLint, GLint);
  void (GLUTAPIENTRY *glutSolidCone)(GLdouble, GLdouble, GLint, GLint);
  void (GLUTAPIENTRY *glutWireCube)(GLdouble);
  void (GLUTAPIENTRY *glutSolidCube)(GLdouble);
  void (GLUTAPIENTRY *glutWireTorus)(GLdouble, GLdouble, GLint, GLint);
  void (GLUTAPIENTRY *glutSolidTorus)(GLdouble, GLdouble, GLint, GLint);
  void (GLUTAPIENTRY *glutWireDodecahedron)(void);
  void (GLUTAPIENTRY *glutSolidDodecahedron)(void);
  void (GLUTAPIENTRY *glutWireTeapot)(GLdouble);
  void (GLUTAPIENTRY *glutSolidTeapot)(GLdouble);
  void (GLUTAPIENTRY *glutWireOctahedron)(void);
  void (GLUTAPIENTRY *glutSolidOctahedron)(void);
  void (GLUTAPIENTRY *glutWireTetrahedron)(void);
  void (GLUTAPIENTRY *glutSolidTetrahedron)(void);
  void (GLUTAPIENTRY *glutWireIcosahedron)(void);
  void (GLUTAPIENTRY *glutSolidIcosahedron)(void);
  int (GLUTAPIENTRY *glutVideoResizeGet)(GLenum);
  void (GLUTAPIENTRY *glutSetupVideoResizing)(void);
  void (GLUTAPIENTRY *glutStopVideoResizing)(void);
  void (GLUTAPIENTRY *glutVideoResize)(int, int, int, int);
  void (GLUTAPIENTRY *glutVideoPan)(int, int, int, int);
  void (GLUTAPIENTRY *glutReportErrors)(void);
  void (GLUTAPIENTRY *glutIgnoreKeyRepeat)(int);
  void (GLUTAPIENTRY *glutSetKeyRepeat)(int);
  void (GLUTAPIENTRY *glutForceJoystickFunc)(void);
  void (GLUTAPIENTRY *glutGameModeString)(const char *);
  int (GLUTAPIENTRY *glutEnterGameMode)(void);
  void (GLUTAPIENTRY *glutLeaveGameMode)(void);
  int (GLUTAPIENTRY *glutGameModeGet)(GLenum);
};

static struct TraceGLUT_Functions traceGLUT_Native;

/* Initialize TraceGLUT. */

void
traceGLUT_init(void)
{
  const char *library = "GLUT";
  const char *filename = NULL;

  if (traceGLUT_initialized)
    return;

  /* Do pre-initialization */

  /* Load the native library */

  filename = traceLibraryLocation(library);
  traceGLUT_handle = traceGLUT_LoadLibrary(filename);
  if (!traceGLUT_handle)
  {
    traceError("Failed to load %s from %s", library, filename);
    return;
  }
  traceInfo("Loaded %s from %s", library, filename);

  /* Load GLUT API functions. */

  memset(&traceGLUT_Native, 0, sizeof(struct TraceGLUT_Functions));

  traceGLUT_Native.glutInit = (void (GLUTAPIENTRY *)(int *, char **)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutInit");
  traceGLUT_Native.__glutInitWithExit = (void (GLUTAPIENTRY *)(int *, char **, void (CDECL *)(int))) traceGLUT_GetProcAddress(traceGLUT_handle, "__glutInitWithExit");
  traceGLUT_Native.glutInitDisplayMode = (void (GLUTAPIENTRY *)(unsigned int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutInitDisplayMode");
  traceGLUT_Native.glutInitDisplayString = (void (GLUTAPIENTRY *)(const char *)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutInitDisplayString");
  traceGLUT_Native.glutInitWindowPosition = (void (GLUTAPIENTRY *)(int, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutInitWindowPosition");
  traceGLUT_Native.glutInitWindowSize = (void (GLUTAPIENTRY *)(int, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutInitWindowSize");
  traceGLUT_Native.glutMainLoop = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutMainLoop");
  traceGLUT_Native.glutCreateWindow = (int (GLUTAPIENTRY *)(const char *)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutCreateWindow");
  traceGLUT_Native.__glutCreateWindowWithExit = (int (GLUTAPIENTRY *)(const char *, void (CDECL *)(int))) traceGLUT_GetProcAddress(traceGLUT_handle, "__glutCreateWindowWithExit");
  traceGLUT_Native.glutCreateSubWindow = (int (GLUTAPIENTRY *)(int, int, int, int, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutCreateSubWindow");
  traceGLUT_Native.glutDestroyWindow = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutDestroyWindow");
  traceGLUT_Native.glutPostRedisplay = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutPostRedisplay");
  traceGLUT_Native.glutPostWindowRedisplay = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutPostWindowRedisplay");
  traceGLUT_Native.glutSwapBuffers = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSwapBuffers");
  traceGLUT_Native.glutGetWindow = (int (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutGetWindow");
  traceGLUT_Native.glutSetWindow = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSetWindow");
  traceGLUT_Native.glutSetWindowTitle = (void (GLUTAPIENTRY *)(const char *)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSetWindowTitle");
  traceGLUT_Native.glutSetIconTitle = (void (GLUTAPIENTRY *)(const char *)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSetIconTitle");
  traceGLUT_Native.glutPositionWindow = (void (GLUTAPIENTRY *)(int, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutPositionWindow");
  traceGLUT_Native.glutReshapeWindow = (void (GLUTAPIENTRY *)(int, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutReshapeWindow");
  traceGLUT_Native.glutPopWindow = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutPopWindow");
  traceGLUT_Native.glutPushWindow = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutPushWindow");
  traceGLUT_Native.glutIconifyWindow = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutIconifyWindow");
  traceGLUT_Native.glutShowWindow = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutShowWindow");
  traceGLUT_Native.glutHideWindow = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutHideWindow");
  traceGLUT_Native.glutFullScreen = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutFullScreen");
  traceGLUT_Native.glutSetCursor = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSetCursor");
  traceGLUT_Native.glutWarpPointer = (void (GLUTAPIENTRY *)(int, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWarpPointer");
  traceGLUT_Native.glutEstablishOverlay = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutEstablishOverlay");
  traceGLUT_Native.glutRemoveOverlay = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutRemoveOverlay");
  traceGLUT_Native.glutUseLayer = (void (GLUTAPIENTRY *)(GLenum)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutUseLayer");
  traceGLUT_Native.glutPostOverlayRedisplay = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutPostOverlayRedisplay");
  traceGLUT_Native.glutPostWindowOverlayRedisplay = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutPostWindowOverlayRedisplay");
  traceGLUT_Native.glutShowOverlay = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutShowOverlay");
  traceGLUT_Native.glutHideOverlay = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutHideOverlay");
  traceGLUT_Native.glutCreateMenu = (int (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutCreateMenu");
  traceGLUT_Native.__glutCreateMenuWithExit = (int (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int), void (CDECL *)(int))) traceGLUT_GetProcAddress(traceGLUT_handle, "__glutCreateMenuWithExit");
  traceGLUT_Native.glutDestroyMenu = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutDestroyMenu");
  traceGLUT_Native.glutGetMenu = (int (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutGetMenu");
  traceGLUT_Native.glutSetMenu = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSetMenu");
  traceGLUT_Native.glutAddMenuEntry = (void (GLUTAPIENTRY *)(const char *, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutAddMenuEntry");
  traceGLUT_Native.glutAddSubMenu = (void (GLUTAPIENTRY *)(const char *, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutAddSubMenu");
  traceGLUT_Native.glutChangeToMenuEntry = (void (GLUTAPIENTRY *)(int, const char *, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutChangeToMenuEntry");
  traceGLUT_Native.glutChangeToSubMenu = (void (GLUTAPIENTRY *)(int, const char *, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutChangeToSubMenu");
  traceGLUT_Native.glutRemoveMenuItem = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutRemoveMenuItem");
  traceGLUT_Native.glutAttachMenu = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutAttachMenu");
  traceGLUT_Native.glutDetachMenu = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutDetachMenu");
  traceGLUT_Native.glutDisplayFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(void))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutDisplayFunc");
  traceGLUT_Native.glutReshapeFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int width, int height))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutReshapeFunc");
  traceGLUT_Native.glutKeyboardFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(unsigned char key, int x, int y))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutKeyboardFunc");
  traceGLUT_Native.glutMouseFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int button, int state, int x, int y))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutMouseFunc");
  traceGLUT_Native.glutMotionFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int x, int y))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutMotionFunc");
  traceGLUT_Native.glutPassiveMotionFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int x, int y))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutPassiveMotionFunc");
  traceGLUT_Native.glutEntryFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int state))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutEntryFunc");
  traceGLUT_Native.glutVisibilityFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int state))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutVisibilityFunc");
  traceGLUT_Native.glutIdleFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(void))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutIdleFunc");
  traceGLUT_Native.glutTimerFunc = (void (GLUTAPIENTRY *)(unsigned int, void (GLUTCALLBACK *)(int value), int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutTimerFunc");
  traceGLUT_Native.glutMenuStateFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int state))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutMenuStateFunc");
  traceGLUT_Native.glutSpecialFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int key, int x, int y))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSpecialFunc");
  traceGLUT_Native.glutSpaceballMotionFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int x, int y, int z))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSpaceballMotionFunc");
  traceGLUT_Native.glutSpaceballRotateFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int x, int y, int z))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSpaceballRotateFunc");
  traceGLUT_Native.glutSpaceballButtonFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int button,int state))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSpaceballButtonFunc");
  traceGLUT_Native.glutButtonBoxFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int button, int state))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutButtonBoxFunc");
  traceGLUT_Native.glutDialsFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int dial, int value))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutDialsFunc");
  traceGLUT_Native.glutTabletMotionFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int x, int y))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutTabletMotionFunc");
  traceGLUT_Native.glutTabletButtonFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int button, int state, int x, int y))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutTabletButtonFunc");
  traceGLUT_Native.glutMenuStatusFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int status, int x, int y))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutMenuStatusFunc");
  traceGLUT_Native.glutOverlayDisplayFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(void))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutOverlayDisplayFunc");
  traceGLUT_Native.glutWindowStatusFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int state))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWindowStatusFunc");
  traceGLUT_Native.glutKeyboardUpFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(unsigned char key, int x, int y))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutKeyboardUpFunc");
  traceGLUT_Native.glutSpecialUpFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(int key, int x, int y))) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSpecialUpFunc");
  traceGLUT_Native.glutJoystickFunc = (void (GLUTAPIENTRY *)(void (GLUTCALLBACK *)(unsigned int buttonMask, int x, int y, int z), int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutJoystickFunc");
  traceGLUT_Native.glutSetColor = (void (GLUTAPIENTRY *)(int, GLfloat, GLfloat, GLfloat)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSetColor");
  traceGLUT_Native.glutGetColor = (GLfloat (GLUTAPIENTRY *)(int, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutGetColor");
  traceGLUT_Native.glutCopyColormap = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutCopyColormap");
  traceGLUT_Native.glutGet = (int (GLUTAPIENTRY *)(GLenum)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutGet");
  traceGLUT_Native.glutDeviceGet = (int (GLUTAPIENTRY *)(GLenum)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutDeviceGet");
  traceGLUT_Native.glutExtensionSupported = (int (GLUTAPIENTRY *)(const char *)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutExtensionSupported");
  traceGLUT_Native.glutGetModifiers = (int (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutGetModifiers");
  traceGLUT_Native.glutLayerGet = (int (GLUTAPIENTRY *)(GLenum)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutLayerGet");
  traceGLUT_Native.glutBitmapCharacter = (void (GLUTAPIENTRY *)(void *, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutBitmapCharacter");
  traceGLUT_Native.glutBitmapWidth = (int (GLUTAPIENTRY *)(void *, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutBitmapWidth");
  traceGLUT_Native.glutStrokeCharacter = (void (GLUTAPIENTRY *)(void *, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutStrokeCharacter");
  traceGLUT_Native.glutStrokeWidth = (int (GLUTAPIENTRY *)(void *, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutStrokeWidth");
  traceGLUT_Native.glutBitmapLength = (int (GLUTAPIENTRY *)(void *, const unsigned char *)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutBitmapLength");
  traceGLUT_Native.glutStrokeLength = (int (GLUTAPIENTRY *)(void *, const unsigned char *)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutStrokeLength");
  traceGLUT_Native.glutStrokeWidthf = (float (GLUTAPIENTRY *)(void *, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutStrokeWidthf");
  traceGLUT_Native.glutStrokeLengthf = (float (GLUTAPIENTRY *)(void *, const unsigned char *)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutStrokeLengthf");
  traceGLUT_Native.glutWireSphere = (void (GLUTAPIENTRY *)(GLdouble, GLint, GLint)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWireSphere");
  traceGLUT_Native.glutSolidSphere = (void (GLUTAPIENTRY *)(GLdouble, GLint, GLint)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSolidSphere");
  traceGLUT_Native.glutWireCone = (void (GLUTAPIENTRY *)(GLdouble, GLdouble, GLint, GLint)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWireCone");
  traceGLUT_Native.glutSolidCone = (void (GLUTAPIENTRY *)(GLdouble, GLdouble, GLint, GLint)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSolidCone");
  traceGLUT_Native.glutWireCube = (void (GLUTAPIENTRY *)(GLdouble)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWireCube");
  traceGLUT_Native.glutSolidCube = (void (GLUTAPIENTRY *)(GLdouble)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSolidCube");
  traceGLUT_Native.glutWireTorus = (void (GLUTAPIENTRY *)(GLdouble, GLdouble, GLint, GLint)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWireTorus");
  traceGLUT_Native.glutSolidTorus = (void (GLUTAPIENTRY *)(GLdouble, GLdouble, GLint, GLint)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSolidTorus");
  traceGLUT_Native.glutWireDodecahedron = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWireDodecahedron");
  traceGLUT_Native.glutSolidDodecahedron = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSolidDodecahedron");
  traceGLUT_Native.glutWireTeapot = (void (GLUTAPIENTRY *)(GLdouble)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWireTeapot");
  traceGLUT_Native.glutSolidTeapot = (void (GLUTAPIENTRY *)(GLdouble)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSolidTeapot");
  traceGLUT_Native.glutWireOctahedron = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWireOctahedron");
  traceGLUT_Native.glutSolidOctahedron = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSolidOctahedron");
  traceGLUT_Native.glutWireTetrahedron = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWireTetrahedron");
  traceGLUT_Native.glutSolidTetrahedron = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSolidTetrahedron");
  traceGLUT_Native.glutWireIcosahedron = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutWireIcosahedron");
  traceGLUT_Native.glutSolidIcosahedron = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSolidIcosahedron");
  traceGLUT_Native.glutVideoResizeGet = (int (GLUTAPIENTRY *)(GLenum)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutVideoResizeGet");
  traceGLUT_Native.glutSetupVideoResizing = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSetupVideoResizing");
  traceGLUT_Native.glutStopVideoResizing = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutStopVideoResizing");
  traceGLUT_Native.glutVideoResize = (void (GLUTAPIENTRY *)(int, int, int, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutVideoResize");
  traceGLUT_Native.glutVideoPan = (void (GLUTAPIENTRY *)(int, int, int, int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutVideoPan");
  traceGLUT_Native.glutReportErrors = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutReportErrors");
  traceGLUT_Native.glutIgnoreKeyRepeat = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutIgnoreKeyRepeat");
  traceGLUT_Native.glutSetKeyRepeat = (void (GLUTAPIENTRY *)(int)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutSetKeyRepeat");
  traceGLUT_Native.glutForceJoystickFunc = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutForceJoystickFunc");
  traceGLUT_Native.glutGameModeString = (void (GLUTAPIENTRY *)(const char *)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutGameModeString");
  traceGLUT_Native.glutEnterGameMode = (int (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutEnterGameMode");
  traceGLUT_Native.glutLeaveGameMode = (void (GLUTAPIENTRY *)(void)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutLeaveGameMode");
  traceGLUT_Native.glutGameModeGet = (int (GLUTAPIENTRY *)(GLenum)) traceGLUT_GetProcAddress(traceGLUT_handle, "glutGameModeGet");

  /* Validate GLUT API functions. */

  if (traceGLUT_Native.glutInit)
  {
    if (traceGLUT_Native.glutInit == glutInit)
    {
      traceWarning("Ignoring glutInit loaded from traceGLUT library.");
      traceGLUT_Native.glutInit = NULL;
    }
  }
  else
  {
    traceWarning("glutInit not loaded.");
  }
  if (traceGLUT_Native.__glutInitWithExit)
  {
    if (traceGLUT_Native.__glutInitWithExit == __glutInitWithExit)
    {
      traceWarning("Ignoring __glutInitWithExit loaded from traceGLUT library.");
      traceGLUT_Native.__glutInitWithExit = NULL;
    }
  }
  else
  {
    traceWarning("__glutInitWithExit not loaded.");
  }
  if (traceGLUT_Native.glutInitDisplayMode)
  {
    if (traceGLUT_Native.glutInitDisplayMode == glutInitDisplayMode)
    {
      traceWarning("Ignoring glutInitDisplayMode loaded from traceGLUT library.");
      traceGLUT_Native.glutInitDisplayMode = NULL;
    }
  }
  else
  {
    traceWarning("glutInitDisplayMode not loaded.");
  }
  if (traceGLUT_Native.glutInitDisplayString)
  {
    if (traceGLUT_Native.glutInitDisplayString == glutInitDisplayString)
    {
      traceWarning("Ignoring glutInitDisplayString loaded from traceGLUT library.");
      traceGLUT_Native.glutInitDisplayString = NULL;
    }
  }
  else
  {
    traceWarning("glutInitDisplayString not loaded.");
  }
  if (traceGLUT_Native.glutInitWindowPosition)
  {
    if (traceGLUT_Native.glutInitWindowPosition == glutInitWindowPosition)
    {
      traceWarning("Ignoring glutInitWindowPosition loaded from traceGLUT library.");
      traceGLUT_Native.glutInitWindowPosition = NULL;
    }
  }
  else
  {
    traceWarning("glutInitWindowPosition not loaded.");
  }
  if (traceGLUT_Native.glutInitWindowSize)
  {
    if (traceGLUT_Native.glutInitWindowSize == glutInitWindowSize)
    {
      traceWarning("Ignoring glutInitWindowSize loaded from traceGLUT library.");
      traceGLUT_Native.glutInitWindowSize = NULL;
    }
  }
  else
  {
    traceWarning("glutInitWindowSize not loaded.");
  }
  if (traceGLUT_Native.glutMainLoop)
  {
    if (traceGLUT_Native.glutMainLoop == glutMainLoop)
    {
      traceWarning("Ignoring glutMainLoop loaded from traceGLUT library.");
      traceGLUT_Native.glutMainLoop = NULL;
    }
  }
  else
  {
    traceWarning("glutMainLoop not loaded.");
  }
  if (traceGLUT_Native.glutCreateWindow)
  {
    if (traceGLUT_Native.glutCreateWindow == glutCreateWindow)
    {
      traceWarning("Ignoring glutCreateWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutCreateWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutCreateWindow not loaded.");
  }
  if (traceGLUT_Native.__glutCreateWindowWithExit)
  {
    if (traceGLUT_Native.__glutCreateWindowWithExit == __glutCreateWindowWithExit)
    {
      traceWarning("Ignoring __glutCreateWindowWithExit loaded from traceGLUT library.");
      traceGLUT_Native.__glutCreateWindowWithExit = NULL;
    }
  }
  else
  {
    traceWarning("__glutCreateWindowWithExit not loaded.");
  }
  if (traceGLUT_Native.glutCreateSubWindow)
  {
    if (traceGLUT_Native.glutCreateSubWindow == glutCreateSubWindow)
    {
      traceWarning("Ignoring glutCreateSubWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutCreateSubWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutCreateSubWindow not loaded.");
  }
  if (traceGLUT_Native.glutDestroyWindow)
  {
    if (traceGLUT_Native.glutDestroyWindow == glutDestroyWindow)
    {
      traceWarning("Ignoring glutDestroyWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutDestroyWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutDestroyWindow not loaded.");
  }
  if (traceGLUT_Native.glutPostRedisplay)
  {
    if (traceGLUT_Native.glutPostRedisplay == glutPostRedisplay)
    {
      traceWarning("Ignoring glutPostRedisplay loaded from traceGLUT library.");
      traceGLUT_Native.glutPostRedisplay = NULL;
    }
  }
  else
  {
    traceWarning("glutPostRedisplay not loaded.");
  }
  if (traceGLUT_Native.glutPostWindowRedisplay)
  {
    if (traceGLUT_Native.glutPostWindowRedisplay == glutPostWindowRedisplay)
    {
      traceWarning("Ignoring glutPostWindowRedisplay loaded from traceGLUT library.");
      traceGLUT_Native.glutPostWindowRedisplay = NULL;
    }
  }
  else
  {
    traceWarning("glutPostWindowRedisplay not loaded.");
  }
  if (traceGLUT_Native.glutSwapBuffers)
  {
    if (traceGLUT_Native.glutSwapBuffers == glutSwapBuffers)
    {
      traceWarning("Ignoring glutSwapBuffers loaded from traceGLUT library.");
      traceGLUT_Native.glutSwapBuffers = NULL;
    }
  }
  else
  {
    traceWarning("glutSwapBuffers not loaded.");
  }
  if (traceGLUT_Native.glutGetWindow)
  {
    if (traceGLUT_Native.glutGetWindow == glutGetWindow)
    {
      traceWarning("Ignoring glutGetWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutGetWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutGetWindow not loaded.");
  }
  if (traceGLUT_Native.glutSetWindow)
  {
    if (traceGLUT_Native.glutSetWindow == glutSetWindow)
    {
      traceWarning("Ignoring glutSetWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutSetWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutSetWindow not loaded.");
  }
  if (traceGLUT_Native.glutSetWindowTitle)
  {
    if (traceGLUT_Native.glutSetWindowTitle == glutSetWindowTitle)
    {
      traceWarning("Ignoring glutSetWindowTitle loaded from traceGLUT library.");
      traceGLUT_Native.glutSetWindowTitle = NULL;
    }
  }
  else
  {
    traceWarning("glutSetWindowTitle not loaded.");
  }
  if (traceGLUT_Native.glutSetIconTitle)
  {
    if (traceGLUT_Native.glutSetIconTitle == glutSetIconTitle)
    {
      traceWarning("Ignoring glutSetIconTitle loaded from traceGLUT library.");
      traceGLUT_Native.glutSetIconTitle = NULL;
    }
  }
  else
  {
    traceWarning("glutSetIconTitle not loaded.");
  }
  if (traceGLUT_Native.glutPositionWindow)
  {
    if (traceGLUT_Native.glutPositionWindow == glutPositionWindow)
    {
      traceWarning("Ignoring glutPositionWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutPositionWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutPositionWindow not loaded.");
  }
  if (traceGLUT_Native.glutReshapeWindow)
  {
    if (traceGLUT_Native.glutReshapeWindow == glutReshapeWindow)
    {
      traceWarning("Ignoring glutReshapeWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutReshapeWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutReshapeWindow not loaded.");
  }
  if (traceGLUT_Native.glutPopWindow)
  {
    if (traceGLUT_Native.glutPopWindow == glutPopWindow)
    {
      traceWarning("Ignoring glutPopWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutPopWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutPopWindow not loaded.");
  }
  if (traceGLUT_Native.glutPushWindow)
  {
    if (traceGLUT_Native.glutPushWindow == glutPushWindow)
    {
      traceWarning("Ignoring glutPushWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutPushWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutPushWindow not loaded.");
  }
  if (traceGLUT_Native.glutIconifyWindow)
  {
    if (traceGLUT_Native.glutIconifyWindow == glutIconifyWindow)
    {
      traceWarning("Ignoring glutIconifyWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutIconifyWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutIconifyWindow not loaded.");
  }
  if (traceGLUT_Native.glutShowWindow)
  {
    if (traceGLUT_Native.glutShowWindow == glutShowWindow)
    {
      traceWarning("Ignoring glutShowWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutShowWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutShowWindow not loaded.");
  }
  if (traceGLUT_Native.glutHideWindow)
  {
    if (traceGLUT_Native.glutHideWindow == glutHideWindow)
    {
      traceWarning("Ignoring glutHideWindow loaded from traceGLUT library.");
      traceGLUT_Native.glutHideWindow = NULL;
    }
  }
  else
  {
    traceWarning("glutHideWindow not loaded.");
  }
  if (traceGLUT_Native.glutFullScreen)
  {
    if (traceGLUT_Native.glutFullScreen == glutFullScreen)
    {
      traceWarning("Ignoring glutFullScreen loaded from traceGLUT library.");
      traceGLUT_Native.glutFullScreen = NULL;
    }
  }
  else
  {
    traceWarning("glutFullScreen not loaded.");
  }
  if (traceGLUT_Native.glutSetCursor)
  {
    if (traceGLUT_Native.glutSetCursor == glutSetCursor)
    {
      traceWarning("Ignoring glutSetCursor loaded from traceGLUT library.");
      traceGLUT_Native.glutSetCursor = NULL;
    }
  }
  else
  {
    traceWarning("glutSetCursor not loaded.");
  }
  if (traceGLUT_Native.glutWarpPointer)
  {
    if (traceGLUT_Native.glutWarpPointer == glutWarpPointer)
    {
      traceWarning("Ignoring glutWarpPointer loaded from traceGLUT library.");
      traceGLUT_Native.glutWarpPointer = NULL;
    }
  }
  else
  {
    traceWarning("glutWarpPointer not loaded.");
  }
  if (traceGLUT_Native.glutEstablishOverlay)
  {
    if (traceGLUT_Native.glutEstablishOverlay == glutEstablishOverlay)
    {
      traceWarning("Ignoring glutEstablishOverlay loaded from traceGLUT library.");
      traceGLUT_Native.glutEstablishOverlay = NULL;
    }
  }
  else
  {
    traceWarning("glutEstablishOverlay not loaded.");
  }
  if (traceGLUT_Native.glutRemoveOverlay)
  {
    if (traceGLUT_Native.glutRemoveOverlay == glutRemoveOverlay)
    {
      traceWarning("Ignoring glutRemoveOverlay loaded from traceGLUT library.");
      traceGLUT_Native.glutRemoveOverlay = NULL;
    }
  }
  else
  {
    traceWarning("glutRemoveOverlay not loaded.");
  }
  if (traceGLUT_Native.glutUseLayer)
  {
    if (traceGLUT_Native.glutUseLayer == glutUseLayer)
    {
      traceWarning("Ignoring glutUseLayer loaded from traceGLUT library.");
      traceGLUT_Native.glutUseLayer = NULL;
    }
  }
  else
  {
    traceWarning("glutUseLayer not loaded.");
  }
  if (traceGLUT_Native.glutPostOverlayRedisplay)
  {
    if (traceGLUT_Native.glutPostOverlayRedisplay == glutPostOverlayRedisplay)
    {
      traceWarning("Ignoring glutPostOverlayRedisplay loaded from traceGLUT library.");
      traceGLUT_Native.glutPostOverlayRedisplay = NULL;
    }
  }
  else
  {
    traceWarning("glutPostOverlayRedisplay not loaded.");
  }
  if (traceGLUT_Native.glutPostWindowOverlayRedisplay)
  {
    if (traceGLUT_Native.glutPostWindowOverlayRedisplay == glutPostWindowOverlayRedisplay)
    {
      traceWarning("Ignoring glutPostWindowOverlayRedisplay loaded from traceGLUT library.");
      traceGLUT_Native.glutPostWindowOverlayRedisplay = NULL;
    }
  }
  else
  {
    traceWarning("glutPostWindowOverlayRedisplay not loaded.");
  }
  if (traceGLUT_Native.glutShowOverlay)
  {
    if (traceGLUT_Native.glutShowOverlay == glutShowOverlay)
    {
      traceWarning("Ignoring glutShowOverlay loaded from traceGLUT library.");
      traceGLUT_Native.glutShowOverlay = NULL;
    }
  }
  else
  {
    traceWarning("glutShowOverlay not loaded.");
  }
  if (traceGLUT_Native.glutHideOverlay)
  {
    if (traceGLUT_Native.glutHideOverlay == glutHideOverlay)
    {
      traceWarning("Ignoring glutHideOverlay loaded from traceGLUT library.");
      traceGLUT_Native.glutHideOverlay = NULL;
    }
  }
  else
  {
    traceWarning("glutHideOverlay not loaded.");
  }
  if (traceGLUT_Native.glutCreateMenu)
  {
    if (traceGLUT_Native.glutCreateMenu == glutCreateMenu)
    {
      traceWarning("Ignoring glutCreateMenu loaded from traceGLUT library.");
      traceGLUT_Native.glutCreateMenu = NULL;
    }
  }
  else
  {
    traceWarning("glutCreateMenu not loaded.");
  }
  if (traceGLUT_Native.__glutCreateMenuWithExit)
  {
    if (traceGLUT_Native.__glutCreateMenuWithExit == __glutCreateMenuWithExit)
    {
      traceWarning("Ignoring __glutCreateMenuWithExit loaded from traceGLUT library.");
      traceGLUT_Native.__glutCreateMenuWithExit = NULL;
    }
  }
  else
  {
    traceWarning("__glutCreateMenuWithExit not loaded.");
  }
  if (traceGLUT_Native.glutDestroyMenu)
  {
    if (traceGLUT_Native.glutDestroyMenu == glutDestroyMenu)
    {
      traceWarning("Ignoring glutDestroyMenu loaded from traceGLUT library.");
      traceGLUT_Native.glutDestroyMenu = NULL;
    }
  }
  else
  {
    traceWarning("glutDestroyMenu not loaded.");
  }
  if (traceGLUT_Native.glutGetMenu)
  {
    if (traceGLUT_Native.glutGetMenu == glutGetMenu)
    {
      traceWarning("Ignoring glutGetMenu loaded from traceGLUT library.");
      traceGLUT_Native.glutGetMenu = NULL;
    }
  }
  else
  {
    traceWarning("glutGetMenu not loaded.");
  }
  if (traceGLUT_Native.glutSetMenu)
  {
    if (traceGLUT_Native.glutSetMenu == glutSetMenu)
    {
      traceWarning("Ignoring glutSetMenu loaded from traceGLUT library.");
      traceGLUT_Native.glutSetMenu = NULL;
    }
  }
  else
  {
    traceWarning("glutSetMenu not loaded.");
  }
  if (traceGLUT_Native.glutAddMenuEntry)
  {
    if (traceGLUT_Native.glutAddMenuEntry == glutAddMenuEntry)
    {
      traceWarning("Ignoring glutAddMenuEntry loaded from traceGLUT library.");
      traceGLUT_Native.glutAddMenuEntry = NULL;
    }
  }
  else
  {
    traceWarning("glutAddMenuEntry not loaded.");
  }
  if (traceGLUT_Native.glutAddSubMenu)
  {
    if (traceGLUT_Native.glutAddSubMenu == glutAddSubMenu)
    {
      traceWarning("Ignoring glutAddSubMenu loaded from traceGLUT library.");
      traceGLUT_Native.glutAddSubMenu = NULL;
    }
  }
  else
  {
    traceWarning("glutAddSubMenu not loaded.");
  }
  if (traceGLUT_Native.glutChangeToMenuEntry)
  {
    if (traceGLUT_Native.glutChangeToMenuEntry == glutChangeToMenuEntry)
    {
      traceWarning("Ignoring glutChangeToMenuEntry loaded from traceGLUT library.");
      traceGLUT_Native.glutChangeToMenuEntry = NULL;
    }
  }
  else
  {
    traceWarning("glutChangeToMenuEntry not loaded.");
  }
  if (traceGLUT_Native.glutChangeToSubMenu)
  {
    if (traceGLUT_Native.glutChangeToSubMenu == glutChangeToSubMenu)
    {
      traceWarning("Ignoring glutChangeToSubMenu loaded from traceGLUT library.");
      traceGLUT_Native.glutChangeToSubMenu = NULL;
    }
  }
  else
  {
    traceWarning("glutChangeToSubMenu not loaded.");
  }
  if (traceGLUT_Native.glutRemoveMenuItem)
  {
    if (traceGLUT_Native.glutRemoveMenuItem == glutRemoveMenuItem)
    {
      traceWarning("Ignoring glutRemoveMenuItem loaded from traceGLUT library.");
      traceGLUT_Native.glutRemoveMenuItem = NULL;
    }
  }
  else
  {
    traceWarning("glutRemoveMenuItem not loaded.");
  }
  if (traceGLUT_Native.glutAttachMenu)
  {
    if (traceGLUT_Native.glutAttachMenu == glutAttachMenu)
    {
      traceWarning("Ignoring glutAttachMenu loaded from traceGLUT library.");
      traceGLUT_Native.glutAttachMenu = NULL;
    }
  }
  else
  {
    traceWarning("glutAttachMenu not loaded.");
  }
  if (traceGLUT_Native.glutDetachMenu)
  {
    if (traceGLUT_Native.glutDetachMenu == glutDetachMenu)
    {
      traceWarning("Ignoring glutDetachMenu loaded from traceGLUT library.");
      traceGLUT_Native.glutDetachMenu = NULL;
    }
  }
  else
  {
    traceWarning("glutDetachMenu not loaded.");
  }
  if (traceGLUT_Native.glutDisplayFunc)
  {
    if (traceGLUT_Native.glutDisplayFunc == glutDisplayFunc)
    {
      traceWarning("Ignoring glutDisplayFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutDisplayFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutDisplayFunc not loaded.");
  }
  if (traceGLUT_Native.glutReshapeFunc)
  {
    if (traceGLUT_Native.glutReshapeFunc == glutReshapeFunc)
    {
      traceWarning("Ignoring glutReshapeFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutReshapeFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutReshapeFunc not loaded.");
  }
  if (traceGLUT_Native.glutKeyboardFunc)
  {
    if (traceGLUT_Native.glutKeyboardFunc == glutKeyboardFunc)
    {
      traceWarning("Ignoring glutKeyboardFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutKeyboardFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutKeyboardFunc not loaded.");
  }
  if (traceGLUT_Native.glutMouseFunc)
  {
    if (traceGLUT_Native.glutMouseFunc == glutMouseFunc)
    {
      traceWarning("Ignoring glutMouseFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutMouseFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutMouseFunc not loaded.");
  }
  if (traceGLUT_Native.glutMotionFunc)
  {
    if (traceGLUT_Native.glutMotionFunc == glutMotionFunc)
    {
      traceWarning("Ignoring glutMotionFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutMotionFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutMotionFunc not loaded.");
  }
  if (traceGLUT_Native.glutPassiveMotionFunc)
  {
    if (traceGLUT_Native.glutPassiveMotionFunc == glutPassiveMotionFunc)
    {
      traceWarning("Ignoring glutPassiveMotionFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutPassiveMotionFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutPassiveMotionFunc not loaded.");
  }
  if (traceGLUT_Native.glutEntryFunc)
  {
    if (traceGLUT_Native.glutEntryFunc == glutEntryFunc)
    {
      traceWarning("Ignoring glutEntryFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutEntryFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutEntryFunc not loaded.");
  }
  if (traceGLUT_Native.glutVisibilityFunc)
  {
    if (traceGLUT_Native.glutVisibilityFunc == glutVisibilityFunc)
    {
      traceWarning("Ignoring glutVisibilityFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutVisibilityFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutVisibilityFunc not loaded.");
  }
  if (traceGLUT_Native.glutIdleFunc)
  {
    if (traceGLUT_Native.glutIdleFunc == glutIdleFunc)
    {
      traceWarning("Ignoring glutIdleFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutIdleFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutIdleFunc not loaded.");
  }
  if (traceGLUT_Native.glutTimerFunc)
  {
    if (traceGLUT_Native.glutTimerFunc == glutTimerFunc)
    {
      traceWarning("Ignoring glutTimerFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutTimerFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutTimerFunc not loaded.");
  }
  if (traceGLUT_Native.glutMenuStateFunc)
  {
    if (traceGLUT_Native.glutMenuStateFunc == glutMenuStateFunc)
    {
      traceWarning("Ignoring glutMenuStateFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutMenuStateFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutMenuStateFunc not loaded.");
  }
  if (traceGLUT_Native.glutSpecialFunc)
  {
    if (traceGLUT_Native.glutSpecialFunc == glutSpecialFunc)
    {
      traceWarning("Ignoring glutSpecialFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutSpecialFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutSpecialFunc not loaded.");
  }
  if (traceGLUT_Native.glutSpaceballMotionFunc)
  {
    if (traceGLUT_Native.glutSpaceballMotionFunc == glutSpaceballMotionFunc)
    {
      traceWarning("Ignoring glutSpaceballMotionFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutSpaceballMotionFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutSpaceballMotionFunc not loaded.");
  }
  if (traceGLUT_Native.glutSpaceballRotateFunc)
  {
    if (traceGLUT_Native.glutSpaceballRotateFunc == glutSpaceballRotateFunc)
    {
      traceWarning("Ignoring glutSpaceballRotateFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutSpaceballRotateFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutSpaceballRotateFunc not loaded.");
  }
  if (traceGLUT_Native.glutSpaceballButtonFunc)
  {
    if (traceGLUT_Native.glutSpaceballButtonFunc == glutSpaceballButtonFunc)
    {
      traceWarning("Ignoring glutSpaceballButtonFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutSpaceballButtonFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutSpaceballButtonFunc not loaded.");
  }
  if (traceGLUT_Native.glutButtonBoxFunc)
  {
    if (traceGLUT_Native.glutButtonBoxFunc == glutButtonBoxFunc)
    {
      traceWarning("Ignoring glutButtonBoxFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutButtonBoxFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutButtonBoxFunc not loaded.");
  }
  if (traceGLUT_Native.glutDialsFunc)
  {
    if (traceGLUT_Native.glutDialsFunc == glutDialsFunc)
    {
      traceWarning("Ignoring glutDialsFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutDialsFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutDialsFunc not loaded.");
  }
  if (traceGLUT_Native.glutTabletMotionFunc)
  {
    if (traceGLUT_Native.glutTabletMotionFunc == glutTabletMotionFunc)
    {
      traceWarning("Ignoring glutTabletMotionFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutTabletMotionFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutTabletMotionFunc not loaded.");
  }
  if (traceGLUT_Native.glutTabletButtonFunc)
  {
    if (traceGLUT_Native.glutTabletButtonFunc == glutTabletButtonFunc)
    {
      traceWarning("Ignoring glutTabletButtonFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutTabletButtonFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutTabletButtonFunc not loaded.");
  }
  if (traceGLUT_Native.glutMenuStatusFunc)
  {
    if (traceGLUT_Native.glutMenuStatusFunc == glutMenuStatusFunc)
    {
      traceWarning("Ignoring glutMenuStatusFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutMenuStatusFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutMenuStatusFunc not loaded.");
  }
  if (traceGLUT_Native.glutOverlayDisplayFunc)
  {
    if (traceGLUT_Native.glutOverlayDisplayFunc == glutOverlayDisplayFunc)
    {
      traceWarning("Ignoring glutOverlayDisplayFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutOverlayDisplayFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutOverlayDisplayFunc not loaded.");
  }
  if (traceGLUT_Native.glutWindowStatusFunc)
  {
    if (traceGLUT_Native.glutWindowStatusFunc == glutWindowStatusFunc)
    {
      traceWarning("Ignoring glutWindowStatusFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutWindowStatusFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutWindowStatusFunc not loaded.");
  }
  if (traceGLUT_Native.glutKeyboardUpFunc)
  {
    if (traceGLUT_Native.glutKeyboardUpFunc == glutKeyboardUpFunc)
    {
      traceWarning("Ignoring glutKeyboardUpFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutKeyboardUpFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutKeyboardUpFunc not loaded.");
  }
  if (traceGLUT_Native.glutSpecialUpFunc)
  {
    if (traceGLUT_Native.glutSpecialUpFunc == glutSpecialUpFunc)
    {
      traceWarning("Ignoring glutSpecialUpFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutSpecialUpFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutSpecialUpFunc not loaded.");
  }
  if (traceGLUT_Native.glutJoystickFunc)
  {
    if (traceGLUT_Native.glutJoystickFunc == glutJoystickFunc)
    {
      traceWarning("Ignoring glutJoystickFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutJoystickFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutJoystickFunc not loaded.");
  }
  if (traceGLUT_Native.glutSetColor)
  {
    if (traceGLUT_Native.glutSetColor == glutSetColor)
    {
      traceWarning("Ignoring glutSetColor loaded from traceGLUT library.");
      traceGLUT_Native.glutSetColor = NULL;
    }
  }
  else
  {
    traceWarning("glutSetColor not loaded.");
  }
  if (traceGLUT_Native.glutGetColor)
  {
    if (traceGLUT_Native.glutGetColor == glutGetColor)
    {
      traceWarning("Ignoring glutGetColor loaded from traceGLUT library.");
      traceGLUT_Native.glutGetColor = NULL;
    }
  }
  else
  {
    traceWarning("glutGetColor not loaded.");
  }
  if (traceGLUT_Native.glutCopyColormap)
  {
    if (traceGLUT_Native.glutCopyColormap == glutCopyColormap)
    {
      traceWarning("Ignoring glutCopyColormap loaded from traceGLUT library.");
      traceGLUT_Native.glutCopyColormap = NULL;
    }
  }
  else
  {
    traceWarning("glutCopyColormap not loaded.");
  }
  if (traceGLUT_Native.glutGet)
  {
    if (traceGLUT_Native.glutGet == glutGet)
    {
      traceWarning("Ignoring glutGet loaded from traceGLUT library.");
      traceGLUT_Native.glutGet = NULL;
    }
  }
  else
  {
    traceWarning("glutGet not loaded.");
  }
  if (traceGLUT_Native.glutDeviceGet)
  {
    if (traceGLUT_Native.glutDeviceGet == glutDeviceGet)
    {
      traceWarning("Ignoring glutDeviceGet loaded from traceGLUT library.");
      traceGLUT_Native.glutDeviceGet = NULL;
    }
  }
  else
  {
    traceWarning("glutDeviceGet not loaded.");
  }
  if (traceGLUT_Native.glutExtensionSupported)
  {
    if (traceGLUT_Native.glutExtensionSupported == glutExtensionSupported)
    {
      traceWarning("Ignoring glutExtensionSupported loaded from traceGLUT library.");
      traceGLUT_Native.glutExtensionSupported = NULL;
    }
  }
  else
  {
    traceWarning("glutExtensionSupported not loaded.");
  }
  if (traceGLUT_Native.glutGetModifiers)
  {
    if (traceGLUT_Native.glutGetModifiers == glutGetModifiers)
    {
      traceWarning("Ignoring glutGetModifiers loaded from traceGLUT library.");
      traceGLUT_Native.glutGetModifiers = NULL;
    }
  }
  else
  {
    traceWarning("glutGetModifiers not loaded.");
  }
  if (traceGLUT_Native.glutLayerGet)
  {
    if (traceGLUT_Native.glutLayerGet == glutLayerGet)
    {
      traceWarning("Ignoring glutLayerGet loaded from traceGLUT library.");
      traceGLUT_Native.glutLayerGet = NULL;
    }
  }
  else
  {
    traceWarning("glutLayerGet not loaded.");
  }
  if (traceGLUT_Native.glutBitmapCharacter)
  {
    if (traceGLUT_Native.glutBitmapCharacter == glutBitmapCharacter)
    {
      traceWarning("Ignoring glutBitmapCharacter loaded from traceGLUT library.");
      traceGLUT_Native.glutBitmapCharacter = NULL;
    }
  }
  else
  {
    traceWarning("glutBitmapCharacter not loaded.");
  }
  if (traceGLUT_Native.glutBitmapWidth)
  {
    if (traceGLUT_Native.glutBitmapWidth == glutBitmapWidth)
    {
      traceWarning("Ignoring glutBitmapWidth loaded from traceGLUT library.");
      traceGLUT_Native.glutBitmapWidth = NULL;
    }
  }
  else
  {
    traceWarning("glutBitmapWidth not loaded.");
  }
  if (traceGLUT_Native.glutStrokeCharacter)
  {
    if (traceGLUT_Native.glutStrokeCharacter == glutStrokeCharacter)
    {
      traceWarning("Ignoring glutStrokeCharacter loaded from traceGLUT library.");
      traceGLUT_Native.glutStrokeCharacter = NULL;
    }
  }
  else
  {
    traceWarning("glutStrokeCharacter not loaded.");
  }
  if (traceGLUT_Native.glutStrokeWidth)
  {
    if (traceGLUT_Native.glutStrokeWidth == glutStrokeWidth)
    {
      traceWarning("Ignoring glutStrokeWidth loaded from traceGLUT library.");
      traceGLUT_Native.glutStrokeWidth = NULL;
    }
  }
  else
  {
    traceWarning("glutStrokeWidth not loaded.");
  }
  if (traceGLUT_Native.glutBitmapLength)
  {
    if (traceGLUT_Native.glutBitmapLength == glutBitmapLength)
    {
      traceWarning("Ignoring glutBitmapLength loaded from traceGLUT library.");
      traceGLUT_Native.glutBitmapLength = NULL;
    }
  }
  else
  {
    traceWarning("glutBitmapLength not loaded.");
  }
  if (traceGLUT_Native.glutStrokeLength)
  {
    if (traceGLUT_Native.glutStrokeLength == glutStrokeLength)
    {
      traceWarning("Ignoring glutStrokeLength loaded from traceGLUT library.");
      traceGLUT_Native.glutStrokeLength = NULL;
    }
  }
  else
  {
    traceWarning("glutStrokeLength not loaded.");
  }
  if (traceGLUT_Native.glutStrokeWidthf)
  {
    if (traceGLUT_Native.glutStrokeWidthf == glutStrokeWidthf)
    {
      traceWarning("Ignoring glutStrokeWidthf loaded from traceGLUT library.");
      traceGLUT_Native.glutStrokeWidthf = NULL;
    }
  }
  else
  {
    traceWarning("glutStrokeWidthf not loaded.");
  }
  if (traceGLUT_Native.glutStrokeLengthf)
  {
    if (traceGLUT_Native.glutStrokeLengthf == glutStrokeLengthf)
    {
      traceWarning("Ignoring glutStrokeLengthf loaded from traceGLUT library.");
      traceGLUT_Native.glutStrokeLengthf = NULL;
    }
  }
  else
  {
    traceWarning("glutStrokeLengthf not loaded.");
  }
  if (traceGLUT_Native.glutWireSphere)
  {
    if (traceGLUT_Native.glutWireSphere == glutWireSphere)
    {
      traceWarning("Ignoring glutWireSphere loaded from traceGLUT library.");
      traceGLUT_Native.glutWireSphere = NULL;
    }
  }
  else
  {
    traceWarning("glutWireSphere not loaded.");
  }
  if (traceGLUT_Native.glutSolidSphere)
  {
    if (traceGLUT_Native.glutSolidSphere == glutSolidSphere)
    {
      traceWarning("Ignoring glutSolidSphere loaded from traceGLUT library.");
      traceGLUT_Native.glutSolidSphere = NULL;
    }
  }
  else
  {
    traceWarning("glutSolidSphere not loaded.");
  }
  if (traceGLUT_Native.glutWireCone)
  {
    if (traceGLUT_Native.glutWireCone == glutWireCone)
    {
      traceWarning("Ignoring glutWireCone loaded from traceGLUT library.");
      traceGLUT_Native.glutWireCone = NULL;
    }
  }
  else
  {
    traceWarning("glutWireCone not loaded.");
  }
  if (traceGLUT_Native.glutSolidCone)
  {
    if (traceGLUT_Native.glutSolidCone == glutSolidCone)
    {
      traceWarning("Ignoring glutSolidCone loaded from traceGLUT library.");
      traceGLUT_Native.glutSolidCone = NULL;
    }
  }
  else
  {
    traceWarning("glutSolidCone not loaded.");
  }
  if (traceGLUT_Native.glutWireCube)
  {
    if (traceGLUT_Native.glutWireCube == glutWireCube)
    {
      traceWarning("Ignoring glutWireCube loaded from traceGLUT library.");
      traceGLUT_Native.glutWireCube = NULL;
    }
  }
  else
  {
    traceWarning("glutWireCube not loaded.");
  }
  if (traceGLUT_Native.glutSolidCube)
  {
    if (traceGLUT_Native.glutSolidCube == glutSolidCube)
    {
      traceWarning("Ignoring glutSolidCube loaded from traceGLUT library.");
      traceGLUT_Native.glutSolidCube = NULL;
    }
  }
  else
  {
    traceWarning("glutSolidCube not loaded.");
  }
  if (traceGLUT_Native.glutWireTorus)
  {
    if (traceGLUT_Native.glutWireTorus == glutWireTorus)
    {
      traceWarning("Ignoring glutWireTorus loaded from traceGLUT library.");
      traceGLUT_Native.glutWireTorus = NULL;
    }
  }
  else
  {
    traceWarning("glutWireTorus not loaded.");
  }
  if (traceGLUT_Native.glutSolidTorus)
  {
    if (traceGLUT_Native.glutSolidTorus == glutSolidTorus)
    {
      traceWarning("Ignoring glutSolidTorus loaded from traceGLUT library.");
      traceGLUT_Native.glutSolidTorus = NULL;
    }
  }
  else
  {
    traceWarning("glutSolidTorus not loaded.");
  }
  if (traceGLUT_Native.glutWireDodecahedron)
  {
    if (traceGLUT_Native.glutWireDodecahedron == glutWireDodecahedron)
    {
      traceWarning("Ignoring glutWireDodecahedron loaded from traceGLUT library.");
      traceGLUT_Native.glutWireDodecahedron = NULL;
    }
  }
  else
  {
    traceWarning("glutWireDodecahedron not loaded.");
  }
  if (traceGLUT_Native.glutSolidDodecahedron)
  {
    if (traceGLUT_Native.glutSolidDodecahedron == glutSolidDodecahedron)
    {
      traceWarning("Ignoring glutSolidDodecahedron loaded from traceGLUT library.");
      traceGLUT_Native.glutSolidDodecahedron = NULL;
    }
  }
  else
  {
    traceWarning("glutSolidDodecahedron not loaded.");
  }
  if (traceGLUT_Native.glutWireTeapot)
  {
    if (traceGLUT_Native.glutWireTeapot == glutWireTeapot)
    {
      traceWarning("Ignoring glutWireTeapot loaded from traceGLUT library.");
      traceGLUT_Native.glutWireTeapot = NULL;
    }
  }
  else
  {
    traceWarning("glutWireTeapot not loaded.");
  }
  if (traceGLUT_Native.glutSolidTeapot)
  {
    if (traceGLUT_Native.glutSolidTeapot == glutSolidTeapot)
    {
      traceWarning("Ignoring glutSolidTeapot loaded from traceGLUT library.");
      traceGLUT_Native.glutSolidTeapot = NULL;
    }
  }
  else
  {
    traceWarning("glutSolidTeapot not loaded.");
  }
  if (traceGLUT_Native.glutWireOctahedron)
  {
    if (traceGLUT_Native.glutWireOctahedron == glutWireOctahedron)
    {
      traceWarning("Ignoring glutWireOctahedron loaded from traceGLUT library.");
      traceGLUT_Native.glutWireOctahedron = NULL;
    }
  }
  else
  {
    traceWarning("glutWireOctahedron not loaded.");
  }
  if (traceGLUT_Native.glutSolidOctahedron)
  {
    if (traceGLUT_Native.glutSolidOctahedron == glutSolidOctahedron)
    {
      traceWarning("Ignoring glutSolidOctahedron loaded from traceGLUT library.");
      traceGLUT_Native.glutSolidOctahedron = NULL;
    }
  }
  else
  {
    traceWarning("glutSolidOctahedron not loaded.");
  }
  if (traceGLUT_Native.glutWireTetrahedron)
  {
    if (traceGLUT_Native.glutWireTetrahedron == glutWireTetrahedron)
    {
      traceWarning("Ignoring glutWireTetrahedron loaded from traceGLUT library.");
      traceGLUT_Native.glutWireTetrahedron = NULL;
    }
  }
  else
  {
    traceWarning("glutWireTetrahedron not loaded.");
  }
  if (traceGLUT_Native.glutSolidTetrahedron)
  {
    if (traceGLUT_Native.glutSolidTetrahedron == glutSolidTetrahedron)
    {
      traceWarning("Ignoring glutSolidTetrahedron loaded from traceGLUT library.");
      traceGLUT_Native.glutSolidTetrahedron = NULL;
    }
  }
  else
  {
    traceWarning("glutSolidTetrahedron not loaded.");
  }
  if (traceGLUT_Native.glutWireIcosahedron)
  {
    if (traceGLUT_Native.glutWireIcosahedron == glutWireIcosahedron)
    {
      traceWarning("Ignoring glutWireIcosahedron loaded from traceGLUT library.");
      traceGLUT_Native.glutWireIcosahedron = NULL;
    }
  }
  else
  {
    traceWarning("glutWireIcosahedron not loaded.");
  }
  if (traceGLUT_Native.glutSolidIcosahedron)
  {
    if (traceGLUT_Native.glutSolidIcosahedron == glutSolidIcosahedron)
    {
      traceWarning("Ignoring glutSolidIcosahedron loaded from traceGLUT library.");
      traceGLUT_Native.glutSolidIcosahedron = NULL;
    }
  }
  else
  {
    traceWarning("glutSolidIcosahedron not loaded.");
  }
  if (traceGLUT_Native.glutVideoResizeGet)
  {
    if (traceGLUT_Native.glutVideoResizeGet == glutVideoResizeGet)
    {
      traceWarning("Ignoring glutVideoResizeGet loaded from traceGLUT library.");
      traceGLUT_Native.glutVideoResizeGet = NULL;
    }
  }
  else
  {
    traceWarning("glutVideoResizeGet not loaded.");
  }
  if (traceGLUT_Native.glutSetupVideoResizing)
  {
    if (traceGLUT_Native.glutSetupVideoResizing == glutSetupVideoResizing)
    {
      traceWarning("Ignoring glutSetupVideoResizing loaded from traceGLUT library.");
      traceGLUT_Native.glutSetupVideoResizing = NULL;
    }
  }
  else
  {
    traceWarning("glutSetupVideoResizing not loaded.");
  }
  if (traceGLUT_Native.glutStopVideoResizing)
  {
    if (traceGLUT_Native.glutStopVideoResizing == glutStopVideoResizing)
    {
      traceWarning("Ignoring glutStopVideoResizing loaded from traceGLUT library.");
      traceGLUT_Native.glutStopVideoResizing = NULL;
    }
  }
  else
  {
    traceWarning("glutStopVideoResizing not loaded.");
  }
  if (traceGLUT_Native.glutVideoResize)
  {
    if (traceGLUT_Native.glutVideoResize == glutVideoResize)
    {
      traceWarning("Ignoring glutVideoResize loaded from traceGLUT library.");
      traceGLUT_Native.glutVideoResize = NULL;
    }
  }
  else
  {
    traceWarning("glutVideoResize not loaded.");
  }
  if (traceGLUT_Native.glutVideoPan)
  {
    if (traceGLUT_Native.glutVideoPan == glutVideoPan)
    {
      traceWarning("Ignoring glutVideoPan loaded from traceGLUT library.");
      traceGLUT_Native.glutVideoPan = NULL;
    }
  }
  else
  {
    traceWarning("glutVideoPan not loaded.");
  }
  if (traceGLUT_Native.glutReportErrors)
  {
    if (traceGLUT_Native.glutReportErrors == glutReportErrors)
    {
      traceWarning("Ignoring glutReportErrors loaded from traceGLUT library.");
      traceGLUT_Native.glutReportErrors = NULL;
    }
  }
  else
  {
    traceWarning("glutReportErrors not loaded.");
  }
  if (traceGLUT_Native.glutIgnoreKeyRepeat)
  {
    if (traceGLUT_Native.glutIgnoreKeyRepeat == glutIgnoreKeyRepeat)
    {
      traceWarning("Ignoring glutIgnoreKeyRepeat loaded from traceGLUT library.");
      traceGLUT_Native.glutIgnoreKeyRepeat = NULL;
    }
  }
  else
  {
    traceWarning("glutIgnoreKeyRepeat not loaded.");
  }
  if (traceGLUT_Native.glutSetKeyRepeat)
  {
    if (traceGLUT_Native.glutSetKeyRepeat == glutSetKeyRepeat)
    {
      traceWarning("Ignoring glutSetKeyRepeat loaded from traceGLUT library.");
      traceGLUT_Native.glutSetKeyRepeat = NULL;
    }
  }
  else
  {
    traceWarning("glutSetKeyRepeat not loaded.");
  }
  if (traceGLUT_Native.glutForceJoystickFunc)
  {
    if (traceGLUT_Native.glutForceJoystickFunc == glutForceJoystickFunc)
    {
      traceWarning("Ignoring glutForceJoystickFunc loaded from traceGLUT library.");
      traceGLUT_Native.glutForceJoystickFunc = NULL;
    }
  }
  else
  {
    traceWarning("glutForceJoystickFunc not loaded.");
  }
  if (traceGLUT_Native.glutGameModeString)
  {
    if (traceGLUT_Native.glutGameModeString == glutGameModeString)
    {
      traceWarning("Ignoring glutGameModeString loaded from traceGLUT library.");
      traceGLUT_Native.glutGameModeString = NULL;
    }
  }
  else
  {
    traceWarning("glutGameModeString not loaded.");
  }
  if (traceGLUT_Native.glutEnterGameMode)
  {
    if (traceGLUT_Native.glutEnterGameMode == glutEnterGameMode)
    {
      traceWarning("Ignoring glutEnterGameMode loaded from traceGLUT library.");
      traceGLUT_Native.glutEnterGameMode = NULL;
    }
  }
  else
  {
    traceWarning("glutEnterGameMode not loaded.");
  }
  if (traceGLUT_Native.glutLeaveGameMode)
  {
    if (traceGLUT_Native.glutLeaveGameMode == glutLeaveGameMode)
    {
      traceWarning("Ignoring glutLeaveGameMode loaded from traceGLUT library.");
      traceGLUT_Native.glutLeaveGameMode = NULL;
    }
  }
  else
  {
    traceWarning("glutLeaveGameMode not loaded.");
  }
  if (traceGLUT_Native.glutGameModeGet)
  {
    if (traceGLUT_Native.glutGameModeGet == glutGameModeGet)
    {
      traceWarning("Ignoring glutGameModeGet loaded from traceGLUT library.");
      traceGLUT_Native.glutGameModeGet = NULL;
    }
  }
  else
  {
    traceWarning("glutGameModeGet not loaded.");
  }

  traceGLUT_initialized = 1;
}

/* GLUT API wrapper functions. */

DLLEXPORT void GLUTAPIENTRY
glutInit(int *count, char **argv)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutInit",&traceParam);

  if (!traceGLUT_Native.glutInit)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutInit");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("count", "%d[%d]", count, 1);
      traceInputParameter("argv", "%s[]", argv);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutInit(count, argv);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
__glutInitWithExit(int *count, char **argv, void (CDECL *exitfunc)(int))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutInit",&traceParam);

  if (!traceGLUT_Native.__glutInitWithExit)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutInit");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("count", "%d[%d]", count, 1);
      traceInputParameter("argv", "%s[]", argv);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.__glutInitWithExit(count, argv, exitfunc);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutInitDisplayMode(unsigned int mode)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutInitDisplayMode",&traceParam);

  if (!traceGLUT_Native.glutInitDisplayMode)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutInitDisplayMode");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("mode", "%u", mode);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutInitDisplayMode(mode);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutInitDisplayString(const char *string)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutInitDisplayString",&traceParam);

  if (!traceGLUT_Native.glutInitDisplayString)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutInitDisplayString");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("string", "%s", string);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutInitDisplayString(string);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutInitWindowPosition(int x, int y)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutInitWindowPosition",&traceParam);

  if (!traceGLUT_Native.glutInitWindowPosition)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutInitWindowPosition");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("x", "%d", x);
      traceInputParameter("y", "%d", y);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutInitWindowPosition(x, y);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutInitWindowSize(int width, int height)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutInitWindowSize",&traceParam);

  if (!traceGLUT_Native.glutInitWindowSize)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutInitWindowSize");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("width", "%d", width);
      traceInputParameter("height", "%d", height);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutInitWindowSize(width, height);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutMainLoop()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutMainLoop",&traceParam);

  if (!traceGLUT_Native.glutMainLoop)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutMainLoop");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutMainLoop();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT int GLUTAPIENTRY
glutCreateWindow(const char *title)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutCreateWindow",&traceParam);

  if (!traceGLUT_Native.glutCreateWindow)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutCreateWindow");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("title", "%s", title);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutCreateWindow(title);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT int GLUTAPIENTRY
__glutCreateWindowWithExit(const char *title, void (CDECL *exitfunc)(int))
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutCreateWindow",&traceParam);

  if (!traceGLUT_Native.__glutCreateWindowWithExit)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutCreateWindow");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("title", "%s", title);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.__glutCreateWindowWithExit(title, exitfunc);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT int GLUTAPIENTRY
glutCreateSubWindow(int win, int x, int y, int width, int height)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutCreateSubWindow",&traceParam);

  if (!traceGLUT_Native.glutCreateSubWindow)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutCreateSubWindow");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("win", "%d", win);
      traceInputParameter("x", "%d", x);
      traceInputParameter("y", "%d", y);
      traceInputParameter("width", "%d", width);
      traceInputParameter("height", "%d", height);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutCreateSubWindow(win, x, y, width, height);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT void GLUTAPIENTRY
glutDestroyWindow(int win)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutDestroyWindow",&traceParam);

  if (!traceGLUT_Native.glutDestroyWindow)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutDestroyWindow");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("win", "%d", win);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutDestroyWindow(win);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutPostRedisplay()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutPostRedisplay",&traceParam);

  if (!traceGLUT_Native.glutPostRedisplay)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutPostRedisplay");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutPostRedisplay();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutPostWindowRedisplay(int win)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutPostWindowRedisplay",&traceParam);

  if (!traceGLUT_Native.glutPostWindowRedisplay)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutPostWindowRedisplay");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("win", "%d", win);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutPostWindowRedisplay(win);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSwapBuffers()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSwapBuffers",&traceParam);

  if (!traceGLUT_Native.glutSwapBuffers)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSwapBuffers");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSwapBuffers();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT int GLUTAPIENTRY
glutGetWindow()
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutGetWindow",&traceParam);

  if (!traceGLUT_Native.glutGetWindow)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutGetWindow");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutGetWindow();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT void GLUTAPIENTRY
glutSetWindow(int win)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSetWindow",&traceParam);

  if (!traceGLUT_Native.glutSetWindow)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSetWindow");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("win", "%d", win);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSetWindow(win);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSetWindowTitle(const char *title)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSetWindowTitle",&traceParam);

  if (!traceGLUT_Native.glutSetWindowTitle)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSetWindowTitle");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("title", "%s", title);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSetWindowTitle(title);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSetIconTitle(const char *title)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSetIconTitle",&traceParam);

  if (!traceGLUT_Native.glutSetIconTitle)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSetIconTitle");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("title", "%s", title);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSetIconTitle(title);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutPositionWindow(int x, int y)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutPositionWindow",&traceParam);

  if (!traceGLUT_Native.glutPositionWindow)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutPositionWindow");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("x", "%d", x);
      traceInputParameter("y", "%d", y);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutPositionWindow(x, y);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutReshapeWindow(int width, int height)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutReshapeWindow",&traceParam);

  if (!traceGLUT_Native.glutReshapeWindow)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutReshapeWindow");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("width", "%d", width);
      traceInputParameter("height", "%d", height);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutReshapeWindow(width, height);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutPopWindow()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutPopWindow",&traceParam);

  if (!traceGLUT_Native.glutPopWindow)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutPopWindow");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutPopWindow();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutPushWindow()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutPushWindow",&traceParam);

  if (!traceGLUT_Native.glutPushWindow)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutPushWindow");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutPushWindow();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutIconifyWindow()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutIconifyWindow",&traceParam);

  if (!traceGLUT_Native.glutIconifyWindow)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutIconifyWindow");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutIconifyWindow();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutShowWindow()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutShowWindow",&traceParam);

  if (!traceGLUT_Native.glutShowWindow)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutShowWindow");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutShowWindow();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutHideWindow()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutHideWindow",&traceParam);

  if (!traceGLUT_Native.glutHideWindow)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutHideWindow");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutHideWindow();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutFullScreen()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutFullScreen",&traceParam);

  if (!traceGLUT_Native.glutFullScreen)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutFullScreen");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutFullScreen();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSetCursor(int cursor)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSetCursor",&traceParam);

  if (!traceGLUT_Native.glutSetCursor)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSetCursor");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("cursor", "%d", cursor);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSetCursor(cursor);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutWarpPointer(int x, int y)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWarpPointer",&traceParam);

  if (!traceGLUT_Native.glutWarpPointer)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWarpPointer");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("x", "%d", x);
      traceInputParameter("y", "%d", y);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWarpPointer(x, y);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutEstablishOverlay()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutEstablishOverlay",&traceParam);

  if (!traceGLUT_Native.glutEstablishOverlay)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutEstablishOverlay");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutEstablishOverlay();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutRemoveOverlay()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutRemoveOverlay",&traceParam);

  if (!traceGLUT_Native.glutRemoveOverlay)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutRemoveOverlay");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutRemoveOverlay();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutUseLayer(GLenum layer)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutUseLayer",&traceParam);

  if (!traceGLUT_Native.glutUseLayer)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutUseLayer");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("layer", "%u", layer);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutUseLayer(layer);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutPostOverlayRedisplay()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutPostOverlayRedisplay",&traceParam);

  if (!traceGLUT_Native.glutPostOverlayRedisplay)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutPostOverlayRedisplay");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutPostOverlayRedisplay();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutPostWindowOverlayRedisplay(int win)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutPostWindowOverlayRedisplay",&traceParam);

  if (!traceGLUT_Native.glutPostWindowOverlayRedisplay)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutPostWindowOverlayRedisplay");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("win", "%d", win);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutPostWindowOverlayRedisplay(win);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutShowOverlay()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutShowOverlay",&traceParam);

  if (!traceGLUT_Native.glutShowOverlay)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutShowOverlay");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutShowOverlay();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutHideOverlay()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutHideOverlay",&traceParam);

  if (!traceGLUT_Native.glutHideOverlay)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutHideOverlay");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutHideOverlay();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT int GLUTAPIENTRY
glutCreateMenu(void (GLUTCALLBACK *func)(int))
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutCreateMenu",&traceParam);

  if (!traceGLUT_Native.glutCreateMenu)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutCreateMenu");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutCreateMenu(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT int GLUTAPIENTRY
__glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (CDECL *exitfunc)(int))
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutCreateMenu",&traceParam);

  if (!traceGLUT_Native.__glutCreateMenuWithExit)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutCreateMenu");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.__glutCreateMenuWithExit(func, exitfunc);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT void GLUTAPIENTRY
glutDestroyMenu(int menu)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutDestroyMenu",&traceParam);

  if (!traceGLUT_Native.glutDestroyMenu)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutDestroyMenu");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("menu", "%d", menu);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutDestroyMenu(menu);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT int GLUTAPIENTRY
glutGetMenu()
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutGetMenu",&traceParam);

  if (!traceGLUT_Native.glutGetMenu)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutGetMenu");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutGetMenu();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT void GLUTAPIENTRY
glutSetMenu(int menu)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSetMenu",&traceParam);

  if (!traceGLUT_Native.glutSetMenu)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSetMenu");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("menu", "%d", menu);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSetMenu(menu);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutAddMenuEntry(const char *label, int value)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutAddMenuEntry",&traceParam);

  if (!traceGLUT_Native.glutAddMenuEntry)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutAddMenuEntry");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("label", "%s", label);
      traceInputParameter("value", "%d", value);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutAddMenuEntry(label, value);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutAddSubMenu(const char *label, int submenu)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutAddSubMenu",&traceParam);

  if (!traceGLUT_Native.glutAddSubMenu)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutAddSubMenu");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("label", "%s", label);
      traceInputParameter("submenu", "%d", submenu);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutAddSubMenu(label, submenu);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutChangeToMenuEntry(int item, const char *label, int value)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutChangeToMenuEntry",&traceParam);

  if (!traceGLUT_Native.glutChangeToMenuEntry)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutChangeToMenuEntry");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("item", "%d", item);
      traceInputParameter("label", "%s", label);
      traceInputParameter("value", "%d", value);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutChangeToMenuEntry(item, label, value);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutChangeToSubMenu(int item, const char *label, int submenu)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutChangeToSubMenu",&traceParam);

  if (!traceGLUT_Native.glutChangeToSubMenu)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutChangeToSubMenu");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("item", "%d", item);
      traceInputParameter("label", "%s", label);
      traceInputParameter("submenu", "%d", submenu);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutChangeToSubMenu(item, label, submenu);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutRemoveMenuItem(int item)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutRemoveMenuItem",&traceParam);

  if (!traceGLUT_Native.glutRemoveMenuItem)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutRemoveMenuItem");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("item", "%d", item);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutRemoveMenuItem(item);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutAttachMenu(int button)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutAttachMenu",&traceParam);

  if (!traceGLUT_Native.glutAttachMenu)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutAttachMenu");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("button", "%d", button);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutAttachMenu(button);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutDetachMenu(int button)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutDetachMenu",&traceParam);

  if (!traceGLUT_Native.glutDetachMenu)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutDetachMenu");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("button", "%d", button);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutDetachMenu(button);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutDisplayFunc(void (GLUTCALLBACK *func)(void))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutDisplayFunc",&traceParam);

  if (!traceGLUT_Native.glutDisplayFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutDisplayFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutDisplayFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutReshapeFunc",&traceParam);

  if (!traceGLUT_Native.glutReshapeFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutReshapeFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutReshapeFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutKeyboardFunc",&traceParam);

  if (!traceGLUT_Native.glutKeyboardFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutKeyboardFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutKeyboardFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutMouseFunc",&traceParam);

  if (!traceGLUT_Native.glutMouseFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutMouseFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutMouseFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutMotionFunc",&traceParam);

  if (!traceGLUT_Native.glutMotionFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutMotionFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutMotionFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutPassiveMotionFunc",&traceParam);

  if (!traceGLUT_Native.glutPassiveMotionFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutPassiveMotionFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutPassiveMotionFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutEntryFunc(void (GLUTCALLBACK *func)(int state))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutEntryFunc",&traceParam);

  if (!traceGLUT_Native.glutEntryFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutEntryFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutEntryFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutVisibilityFunc(void (GLUTCALLBACK *func)(int state))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutVisibilityFunc",&traceParam);

  if (!traceGLUT_Native.glutVisibilityFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutVisibilityFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutVisibilityFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutIdleFunc(void (GLUTCALLBACK *func)(void))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutIdleFunc",&traceParam);

  if (!traceGLUT_Native.glutIdleFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutIdleFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutIdleFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutTimerFunc",&traceParam);

  if (!traceGLUT_Native.glutTimerFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutTimerFunc");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("millis", "%u", millis);
      traceInputParameter("value", "%d", value);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutTimerFunc(millis, func, value);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutMenuStateFunc(void (GLUTCALLBACK *func)(int state))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutMenuStateFunc",&traceParam);

  if (!traceGLUT_Native.glutMenuStateFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutMenuStateFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutMenuStateFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSpecialFunc",&traceParam);

  if (!traceGLUT_Native.glutSpecialFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSpecialFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSpecialFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSpaceballMotionFunc",&traceParam);

  if (!traceGLUT_Native.glutSpaceballMotionFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSpaceballMotionFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSpaceballMotionFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSpaceballRotateFunc",&traceParam);

  if (!traceGLUT_Native.glutSpaceballRotateFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSpaceballRotateFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSpaceballRotateFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button,int state))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSpaceballButtonFunc",&traceParam);

  if (!traceGLUT_Native.glutSpaceballButtonFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSpaceballButtonFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSpaceballButtonFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutButtonBoxFunc",&traceParam);

  if (!traceGLUT_Native.glutButtonBoxFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutButtonBoxFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutButtonBoxFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutDialsFunc",&traceParam);

  if (!traceGLUT_Native.glutDialsFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutDialsFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutDialsFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutTabletMotionFunc",&traceParam);

  if (!traceGLUT_Native.glutTabletMotionFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutTabletMotionFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutTabletMotionFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutTabletButtonFunc",&traceParam);

  if (!traceGLUT_Native.glutTabletButtonFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutTabletButtonFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutTabletButtonFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutMenuStatusFunc",&traceParam);

  if (!traceGLUT_Native.glutMenuStatusFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutMenuStatusFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutMenuStatusFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutOverlayDisplayFunc",&traceParam);

  if (!traceGLUT_Native.glutOverlayDisplayFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutOverlayDisplayFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutOverlayDisplayFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWindowStatusFunc",&traceParam);

  if (!traceGLUT_Native.glutWindowStatusFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWindowStatusFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWindowStatusFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutKeyboardUpFunc",&traceParam);

  if (!traceGLUT_Native.glutKeyboardUpFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutKeyboardUpFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutKeyboardUpFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y))
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSpecialUpFunc",&traceParam);

  if (!traceGLUT_Native.glutSpecialUpFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSpecialUpFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSpecialUpFunc(func);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutJoystickFunc",&traceParam);

  if (!traceGLUT_Native.glutJoystickFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutJoystickFunc");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("pollInterval", "%d", pollInterval);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutJoystickFunc(func, pollInterval);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSetColor(int index, GLfloat red, GLfloat green, GLfloat blue)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSetColor",&traceParam);

  if (!traceGLUT_Native.glutSetColor)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSetColor");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("index", "%d", index);
      traceInputParameter("red", "%f", red);
      traceInputParameter("green", "%f", green);
      traceInputParameter("blue", "%f", blue);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSetColor(index, red, green, blue);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT GLfloat GLUTAPIENTRY
glutGetColor(int index, int component)
{
  GLfloat ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutGetColor",&traceParam);

  if (!traceGLUT_Native.glutGetColor)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutGetColor");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("index", "%d", index);
      traceInputParameter("component", "%d", component);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutGetColor(index, component);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%f", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT void GLUTAPIENTRY
glutCopyColormap(int win)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutCopyColormap",&traceParam);

  if (!traceGLUT_Native.glutCopyColormap)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutCopyColormap");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("win", "%d", win);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutCopyColormap(win);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT int GLUTAPIENTRY
glutGet(GLenum type)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutGet",&traceParam);

  if (!traceGLUT_Native.glutGet)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutGet");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("type", "%u", type);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutGet(type);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT int GLUTAPIENTRY
glutDeviceGet(GLenum type)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutDeviceGet",&traceParam);

  if (!traceGLUT_Native.glutDeviceGet)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutDeviceGet");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("type", "%u", type);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutDeviceGet(type);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT int GLUTAPIENTRY
glutExtensionSupported(const char *name)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutExtensionSupported",&traceParam);

  if (!traceGLUT_Native.glutExtensionSupported)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutExtensionSupported");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("name", "%s", name);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutExtensionSupported(name);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT int GLUTAPIENTRY
glutGetModifiers()
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutGetModifiers",&traceParam);

  if (!traceGLUT_Native.glutGetModifiers)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutGetModifiers");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutGetModifiers();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT int GLUTAPIENTRY
glutLayerGet(GLenum type)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutLayerGet",&traceParam);

  if (!traceGLUT_Native.glutLayerGet)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutLayerGet");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("type", "%u", type);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutLayerGet(type);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT void GLUTAPIENTRY
glutBitmapCharacter(void *font, int character)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutBitmapCharacter",&traceParam);

  if (!traceGLUT_Native.glutBitmapCharacter)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutBitmapCharacter");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("font", "%zu", font);
      traceInputParameter("character", "%d", character);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutBitmapCharacter(font, character);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT int GLUTAPIENTRY
glutBitmapWidth(void *font, int character)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutBitmapWidth",&traceParam);

  if (!traceGLUT_Native.glutBitmapWidth)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutBitmapWidth");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("font", "%zu", font);
      traceInputParameter("character", "%d", character);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutBitmapWidth(font, character);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT void GLUTAPIENTRY
glutStrokeCharacter(void *font, int character)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutStrokeCharacter",&traceParam);

  if (!traceGLUT_Native.glutStrokeCharacter)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutStrokeCharacter");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("font", "%zu", font);
      traceInputParameter("character", "%d", character);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutStrokeCharacter(font, character);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT int GLUTAPIENTRY
glutStrokeWidth(void *font, int character)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutStrokeWidth",&traceParam);

  if (!traceGLUT_Native.glutStrokeWidth)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutStrokeWidth");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("font", "%zu", font);
      traceInputParameter("character", "%d", character);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutStrokeWidth(font, character);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT int GLUTAPIENTRY
glutBitmapLength(void *font, const unsigned char *string)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutBitmapLength",&traceParam);

  if (!traceGLUT_Native.glutBitmapLength)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutBitmapLength");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("font", "%zu", font);
      traceInputParameter("string", "%s", string);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutBitmapLength(font, string);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT int GLUTAPIENTRY
glutStrokeLength(void *font, const unsigned char *string)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutStrokeLength",&traceParam);

  if (!traceGLUT_Native.glutStrokeLength)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutStrokeLength");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("font", "%zu", font);
      traceInputParameter("string", "%s", string);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutStrokeLength(font, string);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT float GLUTAPIENTRY
glutStrokeWidthf(void *font, int character)
{
  float ret = (float) 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutStrokeWidthf",&traceParam);

  if (!traceGLUT_Native.glutStrokeWidthf)
    return (float) 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutStrokeWidthf");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("font", "%zu", font);
      traceInputParameter("character", "%d", character);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutStrokeWidthf(font, character);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%f", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT float GLUTAPIENTRY
glutStrokeLengthf(void *font, const unsigned char *string)
{
  float ret = (float) 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutStrokeLengthf",&traceParam);

  if (!traceGLUT_Native.glutStrokeLengthf)
    return (float) 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutStrokeLengthf");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("font", "%zu", font);
      traceInputParameter("string", "%s", string);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutStrokeLengthf(font, string);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%f", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT void GLUTAPIENTRY
glutWireSphere(GLdouble radius, GLint slices, GLint stacks)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWireSphere",&traceParam);

  if (!traceGLUT_Native.glutWireSphere)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWireSphere");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("radius", "%lf", radius);
      traceInputParameter("slices", "%d", slices);
      traceInputParameter("stacks", "%d", stacks);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWireSphere(radius, slices, stacks);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSolidSphere(GLdouble radius, GLint slices, GLint stacks)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSolidSphere",&traceParam);

  if (!traceGLUT_Native.glutSolidSphere)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSolidSphere");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("radius", "%lf", radius);
      traceInputParameter("slices", "%d", slices);
      traceInputParameter("stacks", "%d", stacks);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSolidSphere(radius, slices, stacks);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWireCone",&traceParam);

  if (!traceGLUT_Native.glutWireCone)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWireCone");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("base", "%lf", base);
      traceInputParameter("height", "%lf", height);
      traceInputParameter("slices", "%d", slices);
      traceInputParameter("stacks", "%d", stacks);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWireCone(base, height, slices, stacks);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSolidCone",&traceParam);

  if (!traceGLUT_Native.glutSolidCone)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSolidCone");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("base", "%lf", base);
      traceInputParameter("height", "%lf", height);
      traceInputParameter("slices", "%d", slices);
      traceInputParameter("stacks", "%d", stacks);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSolidCone(base, height, slices, stacks);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutWireCube(GLdouble size)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWireCube",&traceParam);

  if (!traceGLUT_Native.glutWireCube)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWireCube");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("size", "%lf", size);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWireCube(size);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSolidCube(GLdouble size)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSolidCube",&traceParam);

  if (!traceGLUT_Native.glutSolidCube)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSolidCube");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("size", "%lf", size);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSolidCube(size);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWireTorus",&traceParam);

  if (!traceGLUT_Native.glutWireTorus)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWireTorus");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("innerRadius", "%lf", innerRadius);
      traceInputParameter("outerRadius", "%lf", outerRadius);
      traceInputParameter("sides", "%d", sides);
      traceInputParameter("rings", "%d", rings);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWireTorus(innerRadius, outerRadius, sides, rings);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSolidTorus",&traceParam);

  if (!traceGLUT_Native.glutSolidTorus)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSolidTorus");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("innerRadius", "%lf", innerRadius);
      traceInputParameter("outerRadius", "%lf", outerRadius);
      traceInputParameter("sides", "%d", sides);
      traceInputParameter("rings", "%d", rings);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSolidTorus(innerRadius, outerRadius, sides, rings);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutWireDodecahedron()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWireDodecahedron",&traceParam);

  if (!traceGLUT_Native.glutWireDodecahedron)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWireDodecahedron");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWireDodecahedron();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSolidDodecahedron()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSolidDodecahedron",&traceParam);

  if (!traceGLUT_Native.glutSolidDodecahedron)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSolidDodecahedron");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSolidDodecahedron();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutWireTeapot(GLdouble size)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWireTeapot",&traceParam);

  if (!traceGLUT_Native.glutWireTeapot)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWireTeapot");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("size", "%lf", size);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWireTeapot(size);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSolidTeapot(GLdouble size)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSolidTeapot",&traceParam);

  if (!traceGLUT_Native.glutSolidTeapot)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSolidTeapot");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("size", "%lf", size);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSolidTeapot(size);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutWireOctahedron()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWireOctahedron",&traceParam);

  if (!traceGLUT_Native.glutWireOctahedron)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWireOctahedron");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWireOctahedron();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSolidOctahedron()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSolidOctahedron",&traceParam);

  if (!traceGLUT_Native.glutSolidOctahedron)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSolidOctahedron");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSolidOctahedron();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutWireTetrahedron()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWireTetrahedron",&traceParam);

  if (!traceGLUT_Native.glutWireTetrahedron)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWireTetrahedron");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWireTetrahedron();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSolidTetrahedron()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSolidTetrahedron",&traceParam);

  if (!traceGLUT_Native.glutSolidTetrahedron)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSolidTetrahedron");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSolidTetrahedron();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutWireIcosahedron()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutWireIcosahedron",&traceParam);

  if (!traceGLUT_Native.glutWireIcosahedron)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutWireIcosahedron");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutWireIcosahedron();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSolidIcosahedron()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSolidIcosahedron",&traceParam);

  if (!traceGLUT_Native.glutSolidIcosahedron)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSolidIcosahedron");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSolidIcosahedron();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT int GLUTAPIENTRY
glutVideoResizeGet(GLenum param)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutVideoResizeGet",&traceParam);

  if (!traceGLUT_Native.glutVideoResizeGet)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutVideoResizeGet");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("param", "%u", param);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutVideoResizeGet(param);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT void GLUTAPIENTRY
glutSetupVideoResizing()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSetupVideoResizing",&traceParam);

  if (!traceGLUT_Native.glutSetupVideoResizing)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSetupVideoResizing");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSetupVideoResizing();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutStopVideoResizing()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutStopVideoResizing",&traceParam);

  if (!traceGLUT_Native.glutStopVideoResizing)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutStopVideoResizing");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutStopVideoResizing();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutVideoResize(int x, int y, int width, int height)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutVideoResize",&traceParam);

  if (!traceGLUT_Native.glutVideoResize)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutVideoResize");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("x", "%d", x);
      traceInputParameter("y", "%d", y);
      traceInputParameter("width", "%d", width);
      traceInputParameter("height", "%d", height);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutVideoResize(x, y, width, height);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutVideoPan(int x, int y, int width, int height)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutVideoPan",&traceParam);

  if (!traceGLUT_Native.glutVideoPan)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutVideoPan");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
    {
      traceInputParameter("x", "%d", x);
      traceInputParameter("y", "%d", y);
      traceInputParameter("width", "%d", width);
      traceInputParameter("height", "%d", height);
    }

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutVideoPan(x, y, width, height);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutReportErrors()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutReportErrors",&traceParam);

  if (!traceGLUT_Native.glutReportErrors)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutReportErrors");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutReportErrors();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutIgnoreKeyRepeat(int ignore)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutIgnoreKeyRepeat",&traceParam);

  if (!traceGLUT_Native.glutIgnoreKeyRepeat)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutIgnoreKeyRepeat");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("ignore", "%d", ignore);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutIgnoreKeyRepeat(ignore);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutSetKeyRepeat(int repeatMode)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutSetKeyRepeat",&traceParam);

  if (!traceGLUT_Native.glutSetKeyRepeat)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutSetKeyRepeat");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("repeatMode", "%d", repeatMode);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutSetKeyRepeat(repeatMode);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutForceJoystickFunc()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutForceJoystickFunc",&traceParam);

  if (!traceGLUT_Native.glutForceJoystickFunc)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutForceJoystickFunc");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutForceJoystickFunc();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT void GLUTAPIENTRY
glutGameModeString(const char *string)
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutGameModeString",&traceParam);

  if (!traceGLUT_Native.glutGameModeString)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutGameModeString");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("string", "%s", string);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutGameModeString(string);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT int GLUTAPIENTRY
glutEnterGameMode()
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutEnterGameMode",&traceParam);

  if (!traceGLUT_Native.glutEnterGameMode)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutEnterGameMode");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutEnterGameMode();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}

DLLEXPORT void GLUTAPIENTRY
glutLeaveGameMode()
{
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutLeaveGameMode",&traceParam);

  if (!traceGLUT_Native.glutLeaveGameMode)
    return;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutLeaveGameMode");
    traceBegin();

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  traceGLUT_Native.glutLeaveGameMode();

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Trace function end. */

    traceEnd();
  }
}

DLLEXPORT int GLUTAPIENTRY
glutGameModeGet(GLenum mode)
{
  int ret = 0;
  int traceThis;
  int traceParam;

  if (!traceGLUT_initialized)
    traceGLUT_init();

  traceThis = traceEnabled("glutGameModeGet",&traceParam);

  if (!traceGLUT_Native.glutGameModeGet)
    return 0;

  if (traceThis)
  {
    /* Trace function name and begin. */

    traceFunction("glutGameModeGet");
    traceBegin();

    /* Encode input parameters. */

    if (traceParam)
      traceInputParameter("mode", "%u", mode);

    /* Pre Condition. */

    tracePreCondition();
  }

  /* Call the function. */

  ret = traceGLUT_Native.glutGameModeGet(mode);

  if (traceThis)
  {
    /* Post Condition. */

    tracePostCondition();

    /* Encode output parameters. */

    if (traceParam)
      traceReturn("%d", ret);

    /* Trace function end. */

    traceEnd();
  }

  return ret;
}
