summaryrefslogtreecommitdiff
path: root/src/glut
diff options
context:
space:
mode:
authorTed Jump <tjump@users.sourceforge.net>1999-09-17 04:27:02 +0000
committerTed Jump <tjump@users.sourceforge.net>1999-09-17 04:27:02 +0000
commit477da9eff1bbe6e1a4a3f2cfd6d791557ce15a6a (patch)
treee6534af89769780895956aefb4b5fb6e18538488 /src/glut
parent6799ecb6753f2ec5b1b66c9e8c447bc82035f94c (diff)
Modified to build better with Mesa wgl functions
Diffstat (limited to 'src/glut')
-rw-r--r--src/glut/glx/glutint.h39
1 files changed, 16 insertions, 23 deletions
diff --git a/src/glut/glx/glutint.h b/src/glut/glx/glutint.h
index df92f191a3..49e965349e 100644
--- a/src/glut/glx/glutint.h
+++ b/src/glut/glx/glutint.h
@@ -21,6 +21,13 @@
#include <GL/glx.h>
#endif
+#define GLUT_BUILDING_LIB /* Building the GLUT library itself. */
+#include <GL/glut.h>
+
+#ifdef MESA
+#include <gl/mesa_wgl.h>
+#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 <GL/glut.h> to 1) not #pragma link
with the GLUT library, and 2) avoid the Win32 atexit hack. */
-#include <GL/glut.h>
-
/* 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. */
-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