X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglut%2Fglx%2Fglutint.h;h=ba30af60f0abc9ea08d5e7caa18902ad4fac9a6b;hb=694f05ac18c54253910678709f2dd35c36f1e912;hp=6c825819c09495291045ba1661051cc57b0fe4c8;hpb=66ae25078ef01bcfa2e9eb1ccdbbb5f038c71179;p=mesa.git diff --git a/src/glut/glx/glutint.h b/src/glut/glx/glutint.h index 6c825819c09..ba30af60f0a 100644 --- a/src/glut/glx/glutint.h +++ b/src/glut/glx/glutint.h @@ -7,6 +7,10 @@ and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. */ +#ifdef __VMS +#include +#endif + #if defined(__CYGWIN32__) #include #endif @@ -18,19 +22,21 @@ #else #include #include +#define GLX_GLXEXT_PROTOTYPES #include #endif +#ifndef GLUT_BUILDING_LIB #define GLUT_BUILDING_LIB /* Building the GLUT library itself. */ -#include - -#if defined(MESA) && defined(_WIN32) && !defined(__CYGWIN32__) -#include #endif +#include + #ifndef _WIN32 /* added by BrianP: */ +#ifndef APIENTRY #define APIENTRY GLAPIENTRY +#endif #define __cdecl GLAPIENTRY #define CDECL GLAPIENTRY #endif @@ -38,40 +44,23 @@ /* GLUT_BUILDING_LIB is used by to 1) not #pragma link with the GLUT library, and 2) avoid the Win32 atexit hack. */ -/* This must be done after is included. MESA is defined - if the 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 #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 #endif #else #include -#if !defined(_WIN32) +#if !defined(_WIN32) || defined(__CYGWIN32__) #include #else #include @@ -523,8 +512,12 @@ struct _GLUTmenuItem { 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 */ @@ -557,27 +550,27 @@ typedef struct { #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) \ @@ -649,6 +642,7 @@ extern unsigned int __glutModifierMask; #ifdef _WIN32 extern void (__cdecl *__glutExitFunc)(int retval); #endif +extern char *__glutPPMFile; /* private variables from glut_menu.c */ extern GLUTmenuItem *__glutItemSelected; @@ -665,9 +659,13 @@ extern GLUTwindow *__glutMenuWindow; 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; @@ -697,6 +695,7 @@ extern void __glutPutOnWorkList(GLUTwindow * window, 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) @@ -704,7 +703,11 @@ extern void __glutOpenXConnection(char *display); #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) @@ -746,6 +749,29 @@ extern void __glutDestroyWindow( #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 */ @@ -755,7 +781,12 @@ extern void __glutUpdateInputDeviceMask(GLUTwindow * window); 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 */ @@ -763,4 +794,5 @@ extern LONG WINAPI __glutWindowProc(HWND win, UINT msg, WPARAM w, LPARAM l); extern HDC XHDC; #endif + #endif /* __glutint_h__ */