From jmichaud@chaos.hudson.sgi.com Mon Aug 18 16:54:12 2003 Received: with ECARTIS (v1.0.0; list ogl-sample); Mon, 18 Aug 2003 16:54:15 -0700 (PDT) Received: from rj.sgi.com (rj.sgi.com [192.82.208.96]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h7INsCFl006363 for ; Mon, 18 Aug 2003 16:54:12 -0700 Received: from sgihud.hudson.sgi.com (sgihud.hudson.sgi.com [169.238.41.4]) by rj.sgi.com (8.12.9/8.12.9/linux-outbound_gateway-1.1) with ESMTP id h7ILtAQa030471 for ; Mon, 18 Aug 2003 14:55:11 -0700 Received: from chaos.hudson.sgi.com (chaos.hudson.sgi.com [169.238.41.18]) by sgihud.hudson.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id TAA61484 for ; Mon, 18 Aug 2003 19:54:06 -0400 (EDT) Received: (from jmichaud@localhost) by chaos.hudson.sgi.com (SGI-8.9.3/8.9.3) id TAA29305 for ogl-sample@oss.sgi.com; Mon, 18 Aug 2003 19:54:05 -0400 (EDT) From: jmichaud@chaos.hudson.sgi.com (Joseph Michaud) Message-Id: <10308181954.ZM28780@chaos.hudson.sgi.com> Date: Mon, 18 Aug 2003 19:54:05 -0400 X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: ogl-sample@oss.sgi.com Subject: glxext.h: missing typedef Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 27 X-ecartis-version: Ecartis v1.0.0 Sender: ogl-sample-bounce@oss.sgi.com Errors-to: ogl-sample-bounce@oss.sgi.com X-original-sender: jmichaud@chaos.hudson.sgi.com Precedence: bulk X-list: ogl-sample 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 #include void foo(void) { glXGetProcAddress("func"); } Joe -- ------------------------------------------------------------------------ Joseph Michaud SGI Applications Eng jmichaud@sgi.com vmail: 650-933-9455 office: 781-839-2100