From 477da9eff1bbe6e1a4a3f2cfd6d791557ce15a6a Mon Sep 17 00:00:00 2001 From: Ted Jump Date: Fri, 17 Sep 1999 04:27:02 +0000 Subject: [PATCH] Modified to build better with Mesa wgl functions --- src/glut/glx/glutint.h | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/src/glut/glx/glutint.h b/src/glut/glx/glutint.h index df92f191a39..49e965349e7 100644 --- a/src/glut/glx/glutint.h +++ b/src/glut/glx/glutint.h @@ -21,6 +21,13 @@ #include #endif +#define GLUT_BUILDING_LIB /* Building the GLUT library itself. */ +#include + +#ifdef MESA +#include +#endif + /* added by BrianP: */ #ifndef _WIN32 #define APIENTRY GLAPIENTRY @@ -28,39 +35,25 @@ #define CDECL GLAPIENTRY #endif -#define GLUT_BUILDING_LIB /* Building the GLUT library itself. */ - /* GLUT_BUILDING_LIB is used by to 1) not #pragma link with the GLUT library, and 2) avoid the Win32 atexit hack. */ -#include - /* 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. */ -GLAPI int GLAPIENTRY wglChoosePixelFormat(HDC hdc, CONST PIXELFORMATDESCRIPTOR *ppfd); -GLAPI int GLAPIENTRY wglDescribePixelFormat(HDC hdc,int iPixelFormat,UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd); -GLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc); -GLAPI BOOL GLAPIENTRY wglSetPixelFormat(HDC hdc, int iPixelFormat, CONST PIXELFORMATDESCRIPTOR *ppfd); -GLAPI BOOL GLAPIENTRY wglSwapBuffers(HDC hdc); -GLAPI HGLRC GLWINAPI wglCreateContext(HDC hdc); -GLAPI BOOL GLWINAPI wglDeleteContext(HGLRC hglrc); -GLAPI HGLRC GLWINAPI wglGetCurrentContext(VOID); -GLAPI HDC GLWINAPI wglGetCurrentDC(VOID); -GLAPI BOOL GLWINAPI wglMakeCurrent(HDC hdc,HGLRC hglrc); -#define ChoosePixelFormat wglChoosePixelFormat +#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 +#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 -- 2.30.2