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 GLUT_BUILDING_LIB
#define GLUT_BUILDING_LIB /* Building the GLUT library itself. */
-#include <GL/glut.h>
-
-#if defined(MESA) && defined(_WIN32) && !defined(__CYGWIN32__)
-#include <gl/mesa_wgl.h>
#endif
+#include <GL/glut.h>
+
#ifndef _WIN32
/* added by BrianP: */
#ifndef APIENTRY
/* GLUT_BUILDING_LIB is used by <GL/glut.h> to 1) not #pragma link
with the GLUT library, and 2) avoid the Win32 atexit hack. */
-/* This must be done after <GL/gl.h> is included. MESA is defined
- if the <GL/gl.h> is supplied by Brian Paul's Mesa library. */
-#if defined(MESA) && defined(_WIN32)
-/* Mesa implements "wgl" versions of GDI entry points needed for
- using OpenGL. Map these "wgl" versions to the GDI names via
- macros. */
-#define ChoosePixelFormat wglChoosePixelFormat
-#define DescribePixelFormat wglDescribePixelFormat
-#define GetPixelFormat wglGetPixelFormat
-#define SetPixelFormat wglSetPixelFormat
-#define SwapBuffers wglSwapBuffers
-#define GetCurrentContext wglGetCurrentContext
-#define GetCurrentDC wglGetCurrentDC
-#define MakeCurrent wglMakeCurrent
-#define CreateContext wglCreateContext
-#define DeleteContext wglDeleteContext
-#endif /* MESA */
-
#ifdef SUPPORT_FORTRAN
#include <GL/glutf90.h>
#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
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 */
#ifdef _WIN32
#define MAKE_CURRENT_LAYER(window) \
{ \
- HGLRC currentContext = GetCurrentContext(); \
- HDC currentDc = GetCurrentDC(); \
+ HGLRC currentContext = wglGetCurrentContext(); \
+ HDC currentDc = wglGetCurrentDC(); \
\
if (currentContext != window->renderCtx \
|| currentDc != window->renderDc) { \
- MakeCurrent(window->renderDc, window->renderCtx); \
+ wglMakeCurrent(window->renderDc, window->renderCtx); \
} \
}
#define MAKE_CURRENT_WINDOW(window) \
{ \
- HGLRC currentContext = GetCurrentContext(); \
- HDC currentDc = GetCurrentDC(); \
+ HGLRC currentContext = wglGetCurrentContext(); \
+ HDC currentDc = wglGetCurrentDC(); \
\
if (currentContext != window->ctx || currentDc != window->hdc) { \
- MakeCurrent(window->hdc, window->ctx); \
+ wglMakeCurrent(window->hdc, window->ctx); \
} \
}
#define MAKE_CURRENT_OVERLAY(overlay) \
- MakeCurrent(overlay->hdc, overlay->ctx)
+ wglMakeCurrent(overlay->hdc, overlay->ctx)
#define UNMAKE_CURRENT() \
- MakeCurrent(NULL, NULL)
+ wglMakeCurrent(NULL, NULL)
#define SWAP_BUFFERS_WINDOW(window) \
SwapBuffers(window->hdc)
#define SWAP_BUFFERS_LAYER(window) \
#ifdef _WIN32
extern void (__cdecl *__glutExitFunc)(int retval);
#endif
+extern char *__glutPPMFile;
/* private variables from glut_menu.c */
extern GLUTmenuItem *__glutItemSelected;
extern GLUTmenu *__glutCurrentMenu;
extern int __glutWindowListSize;
extern void (*__glutFreeOverlayFunc) (GLUToverlay *);
+extern void __glutFreeOverlay(GLUToverlay * overlay);
extern XVisualInfo *__glutDetermineWindowVisual(Bool * treatAsSingle,
Bool * visAlloced, void **fbc);
+/* private variables from glut_ppm.c */
+extern void __glutWritePPMFile(void);
+
/* private variables from glut_mesa.c */
extern int __glutMesaSwapHackSupport;
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 */
extern HDC XHDC;
#endif
+
#endif /* __glutint_h__ */