From cd1283f5151749db87edadb16a2aab4ed3b46363 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Wed, 29 Oct 2008 09:22:05 -0600 Subject: glu: fix compilation problem when using Windows gl.h (sf bug 2204589) --- include/GL/glu.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/GL/glu.h b/include/GL/glu.h index 3cd1113509f..cd967ac5ed4 100644 --- a/include/GL/glu.h +++ b/include/GL/glu.h @@ -38,8 +38,12 @@ #include #ifndef GLAPIENTRY +#if defined(_MSC_VER) || defined(__MINGW32__) +#define GLAPIENTRY __stdcall +#else #define GLAPIENTRY #endif +#endif #ifndef GLAPIENTRYP #define GLAPIENTRYP GLAPIENTRY * -- cgit v1.2.3 From 239ce2240af37e768e855680777872f6f4e7b71d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 29 Oct 2008 15:49:19 -0600 Subject: glx: added PFNGL*PROC typedefs for GLX 1.3 functions Since we define GLX_VERSION_1_3 in glx.h, the typedefs in the glxext.h header were getting skipped. --- include/GL/glx.h | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/GL/glx.h b/include/GL/glx.h index c70a29497cf..28844014069 100644 --- a/include/GL/glx.h +++ b/include/GL/glx.h @@ -290,17 +290,25 @@ extern void glXSelectEvent( Display *dpy, GLXDrawable drawable, extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable, unsigned long *mask ); - -/* GLX 1.4 and later */ -extern void (*glXGetProcAddress(const GLubyte *procname))( void ); - - -#ifndef GLX_GLXEXT_LEGACY - -#include - -#else - +/* GLX 1.3 function pointer typedefs */ +typedef GLXFBConfig * (* PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); +typedef GLXFBConfig * (* PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); +typedef int (* PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); +typedef XVisualInfo * (* PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); +typedef GLXWindow (* PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +typedef void (* PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); +typedef GLXPixmap (* PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +typedef void (* PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); +typedef GLXPbuffer (* PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); +typedef void (* PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); +typedef void (* PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +typedef GLXContext (* PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +typedef Bool (* PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable (* PFNGLXGETCURRENTREADDRAWABLEPROC) (void); +typedef Display * (* PFNGLXGETCURRENTDISPLAYPROC) (void); +typedef int (* PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); +typedef void (* PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); +typedef void (* PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); /* @@ -316,6 +324,17 @@ extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); +/* GLX 1.4 and later */ +extern void (*glXGetProcAddress(const GLubyte *procname))( void ); + +/* GLX 1.4 function pointer typedefs */ +typedef __GLXextFuncPtr (* PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); + + +#ifndef GLX_GLXEXT_LEGACY + +#include + #endif /* GLX_GLXEXT_LEGACY */ -- cgit v1.2.3