Modified to build better with Mesa wgl functions

This commit is contained in:
Ted Jump
1999-09-17 04:27:02 +00:00
parent 6799ecb675
commit 477da9eff1
+16 -23
View File
@@ -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