and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
+#ifdef __VMS
+#include <GL/vms_x_fix.h>
+#endif
+
#if defined(__CYGWIN32__)
#include <sys/time.h>
#endif
#else
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+#define GLX_GLXEXT_PROTOTYPES
#include <GL/glx.h>
#endif
#ifndef _WIN32
/* added by BrianP: */
+#ifndef APIENTRY
#define APIENTRY GLAPIENTRY
+#endif
#define __cdecl GLAPIENTRY
#define CDECL GLAPIENTRY
#endif
#ifdef __vms
#if ( __VMS_VER < 70000000 )
-struct timeval {
+#define OLD_VMS
+struct timeval6 {
__int64 val;
};
-extern int sys$gettim(struct timeval *);
+extern int sys$gettim(struct timeval6 *);
#else
#include <time.h>
#endif
#else
#include <sys/types.h>
-#if !defined(_WIN32)
+#if !defined(_WIN32) || defined(__CYGWIN32__)
#include <sys/time.h>
#else
#include <winsock.h>
typedef struct _GLUTtimer GLUTtimer;
struct _GLUTtimer {
GLUTtimer *next; /* list of timers */
- struct timeval timeout; /* time to be called */
- GLUTtimerCB func; /* timer (value) */
+#ifdef OLD_VMS
+ struct timeval6 timeout; /* time to be called */
+#else
+ struct timeval timeout; /* time to be called */
+#endif
+ GLUTtimerCB func; /* timer (value) */
int value; /* return value */
#ifdef SUPPORT_FORTRAN
GLUTtimerFCB ffunc; /* Fortran timer */
extern GLUTmenu *__glutCurrentMenu;
extern int __glutWindowListSize;
extern void (*__glutFreeOverlayFunc) (GLUToverlay *);
+extern void __glutFreeOverlay(GLUToverlay * overlay);
extern XVisualInfo *__glutDetermineWindowVisual(Bool * treatAsSingle,
Bool * visAlloced, void **fbc);
int work_mask);
extern void __glutRegisterEventParser(GLUTeventParser * parser);
extern void __glutPostRedisplay(GLUTwindow * window, int layerMask);
+extern void handleTimeouts(void);
/* private routines from glut_init.c */
#if !defined(_WIN32)
#else
extern void __glutOpenWin32Connection(char *display);
#endif
+#ifdef OLD_VMS
+extern void __glutInitTime(struct timeval6 *beginning);
+#else
extern void __glutInitTime(struct timeval *beginning);
+#endif
/* private routines for glut_menu.c (or win32_menu.c) */
#if defined(_WIN32)
#if !defined(_WIN32)
/* private routines from glut_glxext.c */
extern int __glutIsSupportedByGLX(char *);
+extern int __glut_glXBindChannelToWindowSGIX(Display *dpy, int screen,
+ int channel, Window window);
+extern int __glut_glXChannelRectSGIX(Display *dpy, int screen, int channel,
+ int x, int y, int w, int h);
+extern int __glut_glXQueryChannelRectSGIX(Display *dpy, int screen,
+ int channel, int *x, int *y,
+ int *w, int *h);
+extern int __glut_glXQueryChannelDeltasSGIX(Display *dpy, int screen,
+ int channel, int *dx, int *dy,
+ int *dw, int *dh);
+extern int __glut_glXChannelRectSyncSGIX(Display *dpy, int screen, int channel,
+ GLenum synctype);
+extern GLXContext __glut_glXCreateContextWithConfigSGIX(Display *dpy,
+ GLXFBConfigSGIX config,
+ int render_type,
+ GLXContext share_list,
+ Bool direct);
+extern int __glut_glXGetFBConfigAttribSGIX(Display *dpy,
+ GLXFBConfigSGIX config,
+ int attribute,
+ int *value);
+extern GLXFBConfigSGIX __glut_glXGetFBConfigFromVisualSGIX(Display *dpy,
+ XVisualInfo *vis);
#endif
/* private routines from glut_input.c */
extern void __glutDetermineMesaSwapHackSupport(void);
/* private routines from glut_gameglut.c */
-extern void GLUTAPIENTRYV __glutCloseDownGameMode(void);
+extern void __glutCloseDownGameMode(void);
+
+/* private variables from glut_swap.c (BrianP) */
+extern GLint __glutFPS;
+extern GLint __glutSwapCount;
+extern GLint __glutSwapTime;
#if defined(_WIN32)
/* private routines from win32_*.c */