Browse Source

Modified to build better with Mesa wgl functions

tags/mesa_3_1_beta_3
Ted Jump 26 years ago
parent
commit
477da9eff1
1 changed files with 16 additions and 23 deletions
  1. 16
    23
      src/glut/glx/glutint.h

+ 16
- 23
src/glut/glx/glutint.h 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

Loading…
Cancel
Save