|
osdir.com mailing list archive F.A.Q. -since 2001! |
|
|
|
Subject: glxext.h: missing typedef - msg#00000List: video.opengl.sample.general
by Date: Date Index by Thread: Thread Index
1) Is glXGetProcAddress() (and glXGetProcAddressARB()) supposed to be defined as specified void (*glXGetProcAddressARB(const GLubyte *procName))(...) or as listed in the current glxext.h file (dated 2002/03/22) typedef void (*__GLXextFuncPtr)(void); extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); I ask because... 2) The __GLXextFuncPtr typedef is unavailable if glxext.h is used in conjunction with GL/gl.h. The current glxext.h defines the __GLXextFuncPtr typedef and the glXGetProcAddress() prototype: #ifndef GLX_ARB_get_proc_address typedef void (*__GLXextFuncPtr)(void); #endif #ifndef GLX_VERSION_1_4 #define GLX_VERSION_1_4 1 #ifdef GLX_GLXEXT_PROTOTYPES extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); #endif Unfortunately, an implementation (such as XFree86-devel-4.2.0-8) which defines the glXGetProcAddress() prototype will also define the GLX_ARB_get_proc_address macro in GL/gl.h, and the GLXextFuncPtr typedef won't get defined, causing a compile error. With the latest glxext.h, the following simple source file (foo.c) generates an error: /* cc -I. -c foo.c In file included from foo.c:13: glxext.h:362: parse error before `*' glxext.h:362: `__GLXextFuncPtr' declared as function returning a function */ #include <GL/glx.h> #include <glxext.h> void foo(void) { glXGetProcAddress("func"); } Joe -- ------------------------------------------------------------------------ Joseph Michaud SGI Applications Eng jmichaud@xxxxxxx vmail: 650-933-9455 office: 781-839-2100
Thread at a glance:
blog comments powered by Disqus
|
|