While attempting to build some test packaging for the new freeglut 2.6.0-rc1 release on Intel Darwin, I discovered that their build fails in the freeglut demo programs with the error... Making all in smooth_opengl3 gcc -DHAVE_CONFIG_H -I. -I../../.. -I/sw/include -I../../../include -I/usr/X11R6/include -O3 -DTARGET_HOST_POSIX_X11 -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo './'`smooth_opengl3.c smooth_opengl3.c:101: error: redefinition of typedef 'PFNGLGENBUFFERSPROC' /usr/X11R6/include/GL/gl.h:1884: error: previous declaration of 'PFNGLGENBUFFERSPROC' was here smooth_opengl3.c:104: error: redefinition of typedef 'PFNGLBINDBUFFERPROC' /usr/X11R6/include/GL/gl.h:1882: error: previous declaration of 'PFNGLBINDBUFFERPROC' was here smooth_opengl3.c:107: error: redefinition of typedef 'PFNGLBUFFERDATAPROC' /usr/X11R6/include/GL/gl.h:1886: error: previous declaration of 'PFNGLBUFFERDATAPROC' was here smooth_opengl3.c:110: error: redefinition of typedef 'PFNGLCREATESHADERPROC' /usr/X11R6/include/GL/gl.h:1939: error: previous declaration of 'PFNGLCREATESHADERPROC' was here smooth_opengl3.c:113: error: redefinition of typedef 'PFNGLSHADERSOURCEPROC' /usr/X11R6/include/GL/gl.h:1940: error: previous declaration of 'PFNGLSHADERSOURCEPROC' was here smooth_opengl3.c:116: error: redefinition of typedef 'PFNGLCOMPILESHADERPROC' /usr/X11R6/include/GL/gl.h:1941: error: previous declaration of 'PFNGLCOMPILESHADERPROC' was here smooth_opengl3.c:119: error: redefinition of typedef 'PFNGLCREATEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1942: error: previous declaration of 'PFNGLCREATEPROGRAMPROC' was here smooth_opengl3.c:122: error: redefinition of typedef 'PFNGLATTACHSHADERPROC' /usr/X11R6/include/GL/gl.h:1943: error: previous declaration of 'PFNGLATTACHSHADERPROC' was here smooth_opengl3.c:125: error: redefinition of typedef 'PFNGLLINKPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1944: error: previous declaration of 'PFNGLLINKPROGRAMPROC' was here smooth_opengl3.c:128: error: redefinition of typedef 'PFNGLUSEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1945: error: previous declaration of 'PFNGLUSEPROGRAMPROC' was here smooth_opengl3.c:131: error: redefinition of typedef 'PFNGLGETSHADERIVPROC' /usr/X11R6/include/GL/gl.h:1969: error: previous declaration of 'PFNGLGETSHADERIVPROC' was here smooth_opengl3.c:134: error: redefinition of typedef 'PFNGLGETSHADERINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1972: error: previous declaration of 'PFNGLGETSHADERINFOLOGPROC' was here smooth_opengl3.c:137: error: redefinition of typedef 'PFNGLGETPROGRAMIVPROC' /usr/X11R6/include/GL/gl.h:1970: error: previous declaration of 'PFNGLGETPROGRAMIVPROC' was here smooth_opengl3.c:140: error: redefinition of typedef 'PFNGLGETPROGRAMINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1973: error: previous declaration of 'PFNGLGETPROGRAMINFOLOGPROC' was here smooth_opengl3.c:143: error: redefinition of typedef 'PFNGLGETATTRIBLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1981: error: previous declaration of 'PFNGLGETATTRIBLOCATIONPROC' was here smooth_opengl3.c:146: error: redefinition of typedef 'PFNGLVERTEXATTRIBPOINTERPROC' /usr/X11R6/include/GL/gl.h:1930: error: previous declaration of 'PFNGLVERTEXATTRIBPOINTERPROC' was here smooth_opengl3.c:149: error: redefinition of typedef 'PFNGLENABLEVERTEXATTRIBARRAYPROC' /usr/X11R6/include/GL/gl.h:1931: error: previous declaration of 'PFNGLENABLEVERTEXATTRIBARRAYPROC' was here smooth_opengl3.c:152: error: redefinition of typedef 'PFNGLGETUNIFORMLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1974: error: previous declaration of 'PFNGLGETUNIFORMLOCATIONPROC' was here smooth_opengl3.c:155: error: redefinition of typedef 'PFNGLUNIFORMMATRIX4FVPROC' /usr/X11R6/include/GL/gl.h:1966: error: previous declaration of 'PFNGLUNIFORMMATRIX4FVPROC' was here smooth_opengl3.c: In function 'main': smooth_opengl3.c:425: error: 'GLUT_FORWARD_COMPATIBLE' undeclared (first use in this function) smooth_opengl3.c:425: error: (Each undeclared identifier is reported only once smooth_opengl3.c:425: error: for each function it appears in.) smooth_opengl3.c:425: error: 'GLUT_DEBUG' undeclared (first use in this function) make[4]: *** [smooth_opengl3-smooth_opengl3.o] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 This appears to be coming from the definitions that exist in our gl.h. These definitions don't exist in the gl.h of Fedora 10 but are in glext.h instead. I noticed we have the comment... /* The following macros exist to address conflicts between the names given to * function pointers by the MESA API and OpenGL.framework's API. */ We should probably make the freeglut developers aware of this issue so we don't have to heavily patch the freeglut 2.6.0 release. Any particular comments on this? Jack
On Sat, Apr 25, 2009 at 11:03:03PM -0400, Jack Howarth wrote:
While attempting to build some test packaging for the new freeglut 2.6.0-rc1 release on Intel Darwin, I discovered that their build fails in the freeglut demo programs with the error...
Making all in smooth_opengl3 gcc -DHAVE_CONFIG_H -I. -I../../.. -I/sw/include -I../../../include -I/usr/X11R6/include -O3 -DTARGET_HOST_POSIX_X11 -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo './'`smooth_opengl3.c smooth_opengl3.c:101: error: redefinition of typedef 'PFNGLGENBUFFERSPROC' /usr/X11R6/include/GL/gl.h:1884: error: previous declaration of 'PFNGLGENBUFFERSPROC' was here smooth_opengl3.c:104: error: redefinition of typedef 'PFNGLBINDBUFFERPROC' /usr/X11R6/include/GL/gl.h:1882: error: previous declaration of 'PFNGLBINDBUFFERPROC' was here smooth_opengl3.c:107: error: redefinition of typedef 'PFNGLBUFFERDATAPROC' /usr/X11R6/include/GL/gl.h:1886: error: previous declaration of 'PFNGLBUFFERDATAPROC' was here smooth_opengl3.c:110: error: redefinition of typedef 'PFNGLCREATESHADERPROC' /usr/X11R6/include/GL/gl.h:1939: error: previous declaration of 'PFNGLCREATESHADERPROC' was here smooth_opengl3.c:113: error: redefinition of typedef 'PFNGLSHADERSOURCEPROC' /usr/X11R6/include/GL/gl.h:1940: error: previous declaration of 'PFNGLSHADERSOURCEPROC' was here smooth_opengl3.c:116: error: redefinition of typedef 'PFNGLCOMPILESHADERPROC' /usr/X11R6/include/GL/gl.h:1941: error: previous declaration of 'PFNGLCOMPILESHADERPROC' was here smooth_opengl3.c:119: error: redefinition of typedef 'PFNGLCREATEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1942: error: previous declaration of 'PFNGLCREATEPROGRAMPROC' was here smooth_opengl3.c:122: error: redefinition of typedef 'PFNGLATTACHSHADERPROC' /usr/X11R6/include/GL/gl.h:1943: error: previous declaration of 'PFNGLATTACHSHADERPROC' was here smooth_opengl3.c:125: error: redefinition of typedef 'PFNGLLINKPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1944: error: previous declaration of 'PFNGLLINKPROGRAMPROC' was here smooth_opengl3.c:128: error: redefinition of typedef 'PFNGLUSEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1945: error: previous declaration of 'PFNGLUSEPROGRAMPROC' was here smooth_opengl3.c:131: error: redefinition of typedef 'PFNGLGETSHADERIVPROC' /usr/X11R6/include/GL/gl.h:1969: error: previous declaration of 'PFNGLGETSHADERIVPROC' was here smooth_opengl3.c:134: error: redefinition of typedef 'PFNGLGETSHADERINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1972: error: previous declaration of 'PFNGLGETSHADERINFOLOGPROC' was here smooth_opengl3.c:137: error: redefinition of typedef 'PFNGLGETPROGRAMIVPROC' /usr/X11R6/include/GL/gl.h:1970: error: previous declaration of 'PFNGLGETPROGRAMIVPROC' was here smooth_opengl3.c:140: error: redefinition of typedef 'PFNGLGETPROGRAMINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1973: error: previous declaration of 'PFNGLGETPROGRAMINFOLOGPROC' was here smooth_opengl3.c:143: error: redefinition of typedef 'PFNGLGETATTRIBLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1981: error: previous declaration of 'PFNGLGETATTRIBLOCATIONPROC' was here smooth_opengl3.c:146: error: redefinition of typedef 'PFNGLVERTEXATTRIBPOINTERPROC' /usr/X11R6/include/GL/gl.h:1930: error: previous declaration of 'PFNGLVERTEXATTRIBPOINTERPROC' was here smooth_opengl3.c:149: error: redefinition of typedef 'PFNGLENABLEVERTEXATTRIBARRAYPROC' /usr/X11R6/include/GL/gl.h:1931: error: previous declaration of 'PFNGLENABLEVERTEXATTRIBARRAYPROC' was here smooth_opengl3.c:152: error: redefinition of typedef 'PFNGLGETUNIFORMLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1974: error: previous declaration of 'PFNGLGETUNIFORMLOCATIONPROC' was here smooth_opengl3.c:155: error: redefinition of typedef 'PFNGLUNIFORMMATRIX4FVPROC' /usr/X11R6/include/GL/gl.h:1966: error: previous declaration of 'PFNGLUNIFORMMATRIX4FVPROC' was here smooth_opengl3.c: In function 'main': smooth_opengl3.c:425: error: 'GLUT_FORWARD_COMPATIBLE' undeclared (first use in this function) smooth_opengl3.c:425: error: (Each undeclared identifier is reported only once smooth_opengl3.c:425: error: for each function it appears in.) smooth_opengl3.c:425: error: 'GLUT_DEBUG' undeclared (first use in this function) make[4]: *** [smooth_opengl3-smooth_opengl3.o] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1
This appears to be coming from the definitions that exist in our gl.h. These definitions don't exist in the gl.h of Fedora 10 but are in glext.h instead. I noticed we have the comment...
/* The following macros exist to address conflicts between the names given to * function pointers by the MESA API and OpenGL.framework's API. */
We should probably make the freeglut developers aware of this issue so we don't have to heavily patch the freeglut 2.6.0 release. Any particular comments on this? Jack
Disabling the problem demo, I am able to completely build the freeglut 2.6.0-rc1 under fink unstable and it appears to run all the pre-existing binaries without issue as drop in replacement for 2.4.0. I have no issues with pymol, molmol or ccpnmr built against fink's freeglut. If anyone is interested, here is the freeglut.info file I used in fink unstable... Package: freeglut Version: 2.6.0 Revision: 0rc1 Maintainer: Jack Howarth <howarth@bromo.med.uc.edu> Source: mirror:sourceforge:freeglut/%N-%v-rc1.tar.gz Source-MD5: b1a8107f99b5d953e8418a5409462294 SourceDirectory: %n-%v Depends: %N-shlibs (= %v-%r) BuildDepends: fink (>= 0.24.12), x11-dev Conflicts: glut, openglut Replaces: glut, openglut ConfigureParams: --disable-replace-glut --disable-warnings --disable-dependency-tracking --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib RANLIB='ranlib -c' --build=%m-apple-darwin`uname -r|cut -f1 -d.` --host=%m-apple-darwin`uname -r|cut -f1 -d.` SetCFLAGS: -O3 -DTARGET_HOST_POSIX_X11 SetLDFLAGS: -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib PatchScript: << perl -pi -e 's/hardcode_direct=yes/hardcode_direct=no/g' configure perl -pi -e 's/ smooth_opengl3//g' ./progs/demos/Makefile.in << DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README TODO BuildDependsOnly: True InstallScript: << make install DESTDIR=%d ln -s libfreeglut.3.dylib %i/lib/libglut.dylib ln -s libfreeglut.a %i/lib/libglut.a ln -s libfreeglut.la %i/lib/libglut.la ln -s freeglut.h %i/include/GL/glut.h ln -s freeglut_ext.h %i/include/GL/glut_ext.h ln -s freeglut_std.h %i/include/GL/glut_std.h << SplitOff: << Package: %N-shlibs Depends: libgl, x11 Files: lib/libfreeglut.3.9.0.dylib lib/libfreeglut.3.dylib Shlibs: %p/lib/libfreeglut.3.dylib 13.0.0 %n (>= 2.6.0-Orc1) DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README TODO << Description: Opengl utility toolkit DescDetail: << Freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library released under the X-Consortium license. The original GLUT library seems to have been abandoned with the most recent version (3.7) dating back to August 1998. Its license does not allow anyone to distribute modified library code. Freeglut is actively developed and doesn't suffer the license restrictions. The goal is to gradually depreciate the current glut package out of fink replacing it with freeglut. << DescPackaging: << This package is NOT binary compatible with glut/glut-shlibs and can not replace for them. Packages that wish to use freeglut as a replacement for glut cannot have "BuildDepends: glut|freeglut" and "Depends: glut-shlibs|freeglut-shlibs" in their info file, but need to pick one self-consistently. This package builds the freeglut libraries named as freeglut rather than glut to allow the co-existance with glut since the shared library versioning is identical. I have adopted the use of symlinks for the libraries and headers to allow freeglut to used as a drop in replace for glut without requiring changes in the source code of programs which require glut. Patch fixes crash in flightgear (taken from RH's Fedora 7 package). << License: OSI-Approved Homepage: http://freeglut.sourceforge.net/
That is an "interesting" issue... I'm guessing that freeglut test probably has something like: #ifdef __APPLE__ #define PFNGLGENBUFFERSPROC ... ... #endif That's because Apple's OpenGL.framework doesn't use the same naming convention for the OpenGL function pointer types as Mesa/Windows does. We exist in an awkward state bridging the two... in order to be as compatible as possible at the source level, I decided to support both conventions. It looks like the freeglut test tried to be too clever for its own good... On 04/25/2009 08:22 PM, Jack Howarth wrote:
On Sat, Apr 25, 2009 at 11:03:03PM -0400, Jack Howarth wrote:
While attempting to build some test packaging for the new freeglut 2.6.0-rc1 release on Intel Darwin, I discovered that their build fails in the freeglut demo programs with the error...
Making all in smooth_opengl3 gcc -DHAVE_CONFIG_H -I. -I../../.. -I/sw/include -I../../../include -I/usr/X11R6/include -O3 -DTARGET_HOST_POSIX_X11 -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo './'`smooth_opengl3.c smooth_opengl3.c:101: error: redefinition of typedef 'PFNGLGENBUFFERSPROC' /usr/X11R6/include/GL/gl.h:1884: error: previous declaration of 'PFNGLGENBUFFERSPROC' was here smooth_opengl3.c:104: error: redefinition of typedef 'PFNGLBINDBUFFERPROC' /usr/X11R6/include/GL/gl.h:1882: error: previous declaration of 'PFNGLBINDBUFFERPROC' was here smooth_opengl3.c:107: error: redefinition of typedef 'PFNGLBUFFERDATAPROC' /usr/X11R6/include/GL/gl.h:1886: error: previous declaration of 'PFNGLBUFFERDATAPROC' was here smooth_opengl3.c:110: error: redefinition of typedef 'PFNGLCREATESHADERPROC' /usr/X11R6/include/GL/gl.h:1939: error: previous declaration of 'PFNGLCREATESHADERPROC' was here smooth_opengl3.c:113: error: redefinition of typedef 'PFNGLSHADERSOURCEPROC' /usr/X11R6/include/GL/gl.h:1940: error: previous declaration of 'PFNGLSHADERSOURCEPROC' was here smooth_opengl3.c:116: error: redefinition of typedef 'PFNGLCOMPILESHADERPROC' /usr/X11R6/include/GL/gl.h:1941: error: previous declaration of 'PFNGLCOMPILESHADERPROC' was here smooth_opengl3.c:119: error: redefinition of typedef 'PFNGLCREATEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1942: error: previous declaration of 'PFNGLCREATEPROGRAMPROC' was here smooth_opengl3.c:122: error: redefinition of typedef 'PFNGLATTACHSHADERPROC' /usr/X11R6/include/GL/gl.h:1943: error: previous declaration of 'PFNGLATTACHSHADERPROC' was here smooth_opengl3.c:125: error: redefinition of typedef 'PFNGLLINKPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1944: error: previous declaration of 'PFNGLLINKPROGRAMPROC' was here smooth_opengl3.c:128: error: redefinition of typedef 'PFNGLUSEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1945: error: previous declaration of 'PFNGLUSEPROGRAMPROC' was here smooth_opengl3.c:131: error: redefinition of typedef 'PFNGLGETSHADERIVPROC' /usr/X11R6/include/GL/gl.h:1969: error: previous declaration of 'PFNGLGETSHADERIVPROC' was here smooth_opengl3.c:134: error: redefinition of typedef 'PFNGLGETSHADERINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1972: error: previous declaration of 'PFNGLGETSHADERINFOLOGPROC' was here smooth_opengl3.c:137: error: redefinition of typedef 'PFNGLGETPROGRAMIVPROC' /usr/X11R6/include/GL/gl.h:1970: error: previous declaration of 'PFNGLGETPROGRAMIVPROC' was here smooth_opengl3.c:140: error: redefinition of typedef 'PFNGLGETPROGRAMINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1973: error: previous declaration of 'PFNGLGETPROGRAMINFOLOGPROC' was here smooth_opengl3.c:143: error: redefinition of typedef 'PFNGLGETATTRIBLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1981: error: previous declaration of 'PFNGLGETATTRIBLOCATIONPROC' was here smooth_opengl3.c:146: error: redefinition of typedef 'PFNGLVERTEXATTRIBPOINTERPROC' /usr/X11R6/include/GL/gl.h:1930: error: previous declaration of 'PFNGLVERTEXATTRIBPOINTERPROC' was here smooth_opengl3.c:149: error: redefinition of typedef 'PFNGLENABLEVERTEXATTRIBARRAYPROC' /usr/X11R6/include/GL/gl.h:1931: error: previous declaration of 'PFNGLENABLEVERTEXATTRIBARRAYPROC' was here smooth_opengl3.c:152: error: redefinition of typedef 'PFNGLGETUNIFORMLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1974: error: previous declaration of 'PFNGLGETUNIFORMLOCATIONPROC' was here smooth_opengl3.c:155: error: redefinition of typedef 'PFNGLUNIFORMMATRIX4FVPROC' /usr/X11R6/include/GL/gl.h:1966: error: previous declaration of 'PFNGLUNIFORMMATRIX4FVPROC' was here smooth_opengl3.c: In function 'main': smooth_opengl3.c:425: error: 'GLUT_FORWARD_COMPATIBLE' undeclared (first use in this function) smooth_opengl3.c:425: error: (Each undeclared identifier is reported only once smooth_opengl3.c:425: error: for each function it appears in.) smooth_opengl3.c:425: error: 'GLUT_DEBUG' undeclared (first use in this function) make[4]: *** [smooth_opengl3-smooth_opengl3.o] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1
This appears to be coming from the definitions that exist in our gl.h. These definitions don't exist in the gl.h of Fedora 10 but are in glext.h instead. I noticed we have the comment...
/* The following macros exist to address conflicts between the names given to * function pointers by the MESA API and OpenGL.framework's API. */
We should probably make the freeglut developers aware of this issue so we don't have to heavily patch the freeglut 2.6.0 release. Any particular comments on this? Jack
Disabling the problem demo, I am able to completely build the freeglut 2.6.0-rc1 under fink unstable and it appears to run all the pre-existing binaries without issue as drop in replacement for 2.4.0. I have no issues with pymol, molmol or ccpnmr built against fink's freeglut. If anyone is interested, here is the freeglut.info file I used in fink unstable...
Package: freeglut Version: 2.6.0 Revision: 0rc1 Maintainer: Jack Howarth<howarth@bromo.med.uc.edu> Source: mirror:sourceforge:freeglut/%N-%v-rc1.tar.gz Source-MD5: b1a8107f99b5d953e8418a5409462294 SourceDirectory: %n-%v Depends: %N-shlibs (= %v-%r) BuildDepends: fink (>= 0.24.12), x11-dev Conflicts: glut, openglut Replaces: glut, openglut ConfigureParams: --disable-replace-glut --disable-warnings --disable-dependency-tracking --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib RANLIB='ranlib -c' --build=%m-apple-darwin`uname -r|cut -f1 -d.` --host=%m-apple-darwin`uname -r|cut -f1 -d.` SetCFLAGS: -O3 -DTARGET_HOST_POSIX_X11 SetLDFLAGS: -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib PatchScript:<< perl -pi -e 's/hardcode_direct=yes/hardcode_direct=no/g' configure perl -pi -e 's/ smooth_opengl3//g' ./progs/demos/Makefile.in << DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README TODO BuildDependsOnly: True InstallScript:<< make install DESTDIR=%d ln -s libfreeglut.3.dylib %i/lib/libglut.dylib ln -s libfreeglut.a %i/lib/libglut.a ln -s libfreeglut.la %i/lib/libglut.la ln -s freeglut.h %i/include/GL/glut.h ln -s freeglut_ext.h %i/include/GL/glut_ext.h ln -s freeglut_std.h %i/include/GL/glut_std.h << SplitOff:<< Package: %N-shlibs Depends: libgl, x11 Files: lib/libfreeglut.3.9.0.dylib lib/libfreeglut.3.dylib Shlibs: %p/lib/libfreeglut.3.dylib 13.0.0 %n (>= 2.6.0-Orc1) DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README TODO << Description: Opengl utility toolkit DescDetail:<< Freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library released under the X-Consortium license. The original GLUT library seems to have been abandoned with the most recent version (3.7) dating back to August 1998. Its license does not allow anyone to distribute modified library code. Freeglut is actively developed and doesn't suffer the license restrictions. The goal is to gradually depreciate the current glut package out of fink replacing it with freeglut. << DescPackaging:<< This package is NOT binary compatible with glut/glut-shlibs and can not replace for them. Packages that wish to use freeglut as a replacement for glut cannot have "BuildDepends: glut|freeglut" and "Depends: glut-shlibs|freeglut-shlibs" in their info file, but need to pick one self-consistently.
This package builds the freeglut libraries named as freeglut rather than glut to allow the co-existance with glut since the shared library versioning is identical. I have adopted the use of symlinks for the libraries and headers to allow freeglut to used as a drop in replace for glut without requiring changes in the source code of programs which require glut.
Patch fixes crash in flightgear (taken from RH's Fedora 7 package). << License: OSI-Approved Homepage: http://freeglut.sourceforge.net/
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
Jeremy, could this have something to do with my inability to build Mesa 7.4_1? see trac #19143 WSD On Apr 26, 2009, at 1:47 AM, Jeremy Huddleston wrote:
That is an "interesting" issue... I'm guessing that freeglut test probably has something like:
#ifdef __APPLE__ #define PFNGLGENBUFFERSPROC ... ... #endif
That's because Apple's OpenGL.framework doesn't use the same naming convention for the OpenGL function pointer types as Mesa/Windows does. We exist in an awkward state bridging the two... in order to be as compatible as possible at the source level, I decided to support both conventions.
It looks like the freeglut test tried to be too clever for its own good...
On 04/25/2009 08:22 PM, Jack Howarth wrote:
On Sat, Apr 25, 2009 at 11:03:03PM -0400, Jack Howarth wrote:
While attempting to build some test packaging for the new freeglut 2.6.0-rc1 release on Intel Darwin, I discovered that their build fails in the freeglut demo programs with the error...
Making all in smooth_opengl3 gcc -DHAVE_CONFIG_H -I. -I../../.. -I/sw/include -I../../../ include -I/usr/X11R6/include -O3 -DTARGET_HOST_POSIX_X11 -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo './'`smooth_opengl3.c smooth_opengl3.c:101: error: redefinition of typedef 'PFNGLGENBUFFERSPROC' /usr/X11R6/include/GL/gl.h:1884: error: previous declaration of 'PFNGLGENBUFFERSPROC' was here smooth_opengl3.c:104: error: redefinition of typedef 'PFNGLBINDBUFFERPROC' /usr/X11R6/include/GL/gl.h:1882: error: previous declaration of 'PFNGLBINDBUFFERPROC' was here smooth_opengl3.c:107: error: redefinition of typedef 'PFNGLBUFFERDATAPROC' /usr/X11R6/include/GL/gl.h:1886: error: previous declaration of 'PFNGLBUFFERDATAPROC' was here smooth_opengl3.c:110: error: redefinition of typedef 'PFNGLCREATESHADERPROC' /usr/X11R6/include/GL/gl.h:1939: error: previous declaration of 'PFNGLCREATESHADERPROC' was here smooth_opengl3.c:113: error: redefinition of typedef 'PFNGLSHADERSOURCEPROC' /usr/X11R6/include/GL/gl.h:1940: error: previous declaration of 'PFNGLSHADERSOURCEPROC' was here smooth_opengl3.c:116: error: redefinition of typedef 'PFNGLCOMPILESHADERPROC' /usr/X11R6/include/GL/gl.h:1941: error: previous declaration of 'PFNGLCOMPILESHADERPROC' was here smooth_opengl3.c:119: error: redefinition of typedef 'PFNGLCREATEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1942: error: previous declaration of 'PFNGLCREATEPROGRAMPROC' was here smooth_opengl3.c:122: error: redefinition of typedef 'PFNGLATTACHSHADERPROC' /usr/X11R6/include/GL/gl.h:1943: error: previous declaration of 'PFNGLATTACHSHADERPROC' was here smooth_opengl3.c:125: error: redefinition of typedef 'PFNGLLINKPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1944: error: previous declaration of 'PFNGLLINKPROGRAMPROC' was here smooth_opengl3.c:128: error: redefinition of typedef 'PFNGLUSEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1945: error: previous declaration of 'PFNGLUSEPROGRAMPROC' was here smooth_opengl3.c:131: error: redefinition of typedef 'PFNGLGETSHADERIVPROC' /usr/X11R6/include/GL/gl.h:1969: error: previous declaration of 'PFNGLGETSHADERIVPROC' was here smooth_opengl3.c:134: error: redefinition of typedef 'PFNGLGETSHADERINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1972: error: previous declaration of 'PFNGLGETSHADERINFOLOGPROC' was here smooth_opengl3.c:137: error: redefinition of typedef 'PFNGLGETPROGRAMIVPROC' /usr/X11R6/include/GL/gl.h:1970: error: previous declaration of 'PFNGLGETPROGRAMIVPROC' was here smooth_opengl3.c:140: error: redefinition of typedef 'PFNGLGETPROGRAMINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1973: error: previous declaration of 'PFNGLGETPROGRAMINFOLOGPROC' was here smooth_opengl3.c:143: error: redefinition of typedef 'PFNGLGETATTRIBLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1981: error: previous declaration of 'PFNGLGETATTRIBLOCATIONPROC' was here smooth_opengl3.c:146: error: redefinition of typedef 'PFNGLVERTEXATTRIBPOINTERPROC' /usr/X11R6/include/GL/gl.h:1930: error: previous declaration of 'PFNGLVERTEXATTRIBPOINTERPROC' was here smooth_opengl3.c:149: error: redefinition of typedef 'PFNGLENABLEVERTEXATTRIBARRAYPROC' /usr/X11R6/include/GL/gl.h:1931: error: previous declaration of 'PFNGLENABLEVERTEXATTRIBARRAYPROC' was here smooth_opengl3.c:152: error: redefinition of typedef 'PFNGLGETUNIFORMLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1974: error: previous declaration of 'PFNGLGETUNIFORMLOCATIONPROC' was here smooth_opengl3.c:155: error: redefinition of typedef 'PFNGLUNIFORMMATRIX4FVPROC' /usr/X11R6/include/GL/gl.h:1966: error: previous declaration of 'PFNGLUNIFORMMATRIX4FVPROC' was here smooth_opengl3.c: In function 'main': smooth_opengl3.c:425: error: 'GLUT_FORWARD_COMPATIBLE' undeclared (first use in this function) smooth_opengl3.c:425: error: (Each undeclared identifier is reported only once smooth_opengl3.c:425: error: for each function it appears in.) smooth_opengl3.c:425: error: 'GLUT_DEBUG' undeclared (first use in this function) make[4]: *** [smooth_opengl3-smooth_opengl3.o] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1
This appears to be coming from the definitions that exist in our gl.h. These definitions don't exist in the gl.h of Fedora 10 but are in glext.h instead. I noticed we have the comment...
/* The following macros exist to address conflicts between the names given to * function pointers by the MESA API and OpenGL.framework's API. */
We should probably make the freeglut developers aware of this issue so we don't have to heavily patch the freeglut 2.6.0 release. Any particular comments on this? Jack
Disabling the problem demo, I am able to completely build the freeglut 2.6.0-rc1 under fink unstable and it appears to run all the pre-existing binaries without issue as drop in replacement for 2.4.0. I have no issues with pymol, molmol or ccpnmr built against fink's freeglut. If anyone is interested, here is the freeglut.info file I used in fink unstable...
Package: freeglut Version: 2.6.0 Revision: 0rc1 Maintainer: Jack Howarth <howarth@bromo.med.uc.edu> Source: mirror:sourceforge:freeglut/%N-%v-rc1.tar.gz Source-MD5: b1a8107f99b5d953e8418a5409462294 SourceDirectory: %n-%v Depends: %N-shlibs (= %v-%r) BuildDepends: fink (>= 0.24.12), x11-dev Conflicts: glut, openglut Replaces: glut, openglut ConfigureParams: --disable-replace-glut --disable-warnings -- disable-dependency-tracking --x-includes=/usr/X11R6/include --x- libraries=/usr/X11R6/lib RANLIB='ranlib -c' --build=%m-apple- darwin`uname -r|cut -f1 -d.` --host=%m-apple-darwin`uname -r|cut - f1 -d.` SetCFLAGS: -O3 -DTARGET_HOST_POSIX_X11 SetLDFLAGS: -Wl,-dylib_file,/System/Library/Frameworks/ OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/ Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib PatchScript: << perl -pi -e 's/hardcode_direct=yes/hardcode_direct=no/g' configure perl -pi -e 's/ smooth_opengl3//g' ./progs/demos/Makefile.in << DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README TODO BuildDependsOnly: True InstallScript: << make install DESTDIR=%d ln -s libfreeglut.3.dylib %i/lib/libglut.dylib ln -s libfreeglut.a %i/lib/libglut.a ln -s libfreeglut.la %i/lib/libglut.la ln -s freeglut.h %i/include/GL/glut.h ln -s freeglut_ext.h %i/include/GL/glut_ext.h ln -s freeglut_std.h %i/include/GL/glut_std.h << SplitOff: << Package: %N-shlibs Depends: libgl, x11 Files: lib/libfreeglut.3.9.0.dylib lib/libfreeglut.3.dylib Shlibs: %p/lib/libfreeglut.3.dylib 13.0.0 %n (>= 2.6.0-Orc1) DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README TODO << Description: Opengl utility toolkit DescDetail: << Freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library released under the X-Consortium license. The original GLUT library seems to have been abandoned with the most recent version (3.7) dating back to August 1998. Its license does not allow anyone to distribute modified library code. Freeglut is actively developed and doesn't suffer the license restrictions. The goal is to gradually depreciate the current glut package out of fink replacing it with freeglut. << DescPackaging: << This package is NOT binary compatible with glut/glut-shlibs and can not replace for them. Packages that wish to use freeglut as a replacement for glut cannot have "BuildDepends: glut|freeglut" and "Depends: glut-shlibs|freeglut-shlibs" in their info file, but need to pick one self-consistently.
This package builds the freeglut libraries named as freeglut rather than glut to allow the co-existance with glut since the shared library versioning is identical. I have adopted the use of symlinks for the libraries and headers to allow freeglut to used as a drop in replace for glut without requiring changes in the source code of programs which require glut.
Patch fixes crash in flightgear (taken from RH's Fedora 7 package). << License: OSI-Approved Homepage: http://freeglut.sourceforge.net/
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
William Davis frstanATbellsouthDOTnet Mac OS X.5.6 Darwin 9.5.0 XQuartz 2.3.3_rc5 (xorg-server 1.4.2-apple41) Mac Mini Intel Duo @ 1.86 GHz Mundus vult decepi, ego non
It should have absolutely nothing to do with building mesa since mesa doesn't use those headers. 19143 is just an issue of a missing dependency on libXfixes (see comment #9). Sorry, but my spam filter caught that bug report email for some reason... On Apr 25, 2009, at 23:53, William Davis wrote:
Jeremy, could this have something to do with my inability to build Mesa 7.4_1? see trac #19143 WSD On Apr 26, 2009, at 1:47 AM, Jeremy Huddleston wrote:
That is an "interesting" issue... I'm guessing that freeglut test probably has something like:
#ifdef __APPLE__ #define PFNGLGENBUFFERSPROC ... ... #endif
That's because Apple's OpenGL.framework doesn't use the same naming convention for the OpenGL function pointer types as Mesa/Windows does. We exist in an awkward state bridging the two... in order to be as compatible as possible at the source level, I decided to support both conventions.
It looks like the freeglut test tried to be too clever for its own good...
On 04/25/2009 08:22 PM, Jack Howarth wrote:
On Sat, Apr 25, 2009 at 11:03:03PM -0400, Jack Howarth wrote:
While attempting to build some test packaging for the new freeglut 2.6.0-rc1 release on Intel Darwin, I discovered that their build fails in the freeglut demo programs with the error...
Making all in smooth_opengl3 gcc -DHAVE_CONFIG_H -I. -I../../.. -I/sw/include -I../../../ include -I/usr/X11R6/include -O3 -DTARGET_HOST_POSIX_X11 -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo './'`smooth_opengl3.c smooth_opengl3.c:101: error: redefinition of typedef 'PFNGLGENBUFFERSPROC' /usr/X11R6/include/GL/gl.h:1884: error: previous declaration of 'PFNGLGENBUFFERSPROC' was here smooth_opengl3.c:104: error: redefinition of typedef 'PFNGLBINDBUFFERPROC' /usr/X11R6/include/GL/gl.h:1882: error: previous declaration of 'PFNGLBINDBUFFERPROC' was here smooth_opengl3.c:107: error: redefinition of typedef 'PFNGLBUFFERDATAPROC' /usr/X11R6/include/GL/gl.h:1886: error: previous declaration of 'PFNGLBUFFERDATAPROC' was here smooth_opengl3.c:110: error: redefinition of typedef 'PFNGLCREATESHADERPROC' /usr/X11R6/include/GL/gl.h:1939: error: previous declaration of 'PFNGLCREATESHADERPROC' was here smooth_opengl3.c:113: error: redefinition of typedef 'PFNGLSHADERSOURCEPROC' /usr/X11R6/include/GL/gl.h:1940: error: previous declaration of 'PFNGLSHADERSOURCEPROC' was here smooth_opengl3.c:116: error: redefinition of typedef 'PFNGLCOMPILESHADERPROC' /usr/X11R6/include/GL/gl.h:1941: error: previous declaration of 'PFNGLCOMPILESHADERPROC' was here smooth_opengl3.c:119: error: redefinition of typedef 'PFNGLCREATEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1942: error: previous declaration of 'PFNGLCREATEPROGRAMPROC' was here smooth_opengl3.c:122: error: redefinition of typedef 'PFNGLATTACHSHADERPROC' /usr/X11R6/include/GL/gl.h:1943: error: previous declaration of 'PFNGLATTACHSHADERPROC' was here smooth_opengl3.c:125: error: redefinition of typedef 'PFNGLLINKPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1944: error: previous declaration of 'PFNGLLINKPROGRAMPROC' was here smooth_opengl3.c:128: error: redefinition of typedef 'PFNGLUSEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1945: error: previous declaration of 'PFNGLUSEPROGRAMPROC' was here smooth_opengl3.c:131: error: redefinition of typedef 'PFNGLGETSHADERIVPROC' /usr/X11R6/include/GL/gl.h:1969: error: previous declaration of 'PFNGLGETSHADERIVPROC' was here smooth_opengl3.c:134: error: redefinition of typedef 'PFNGLGETSHADERINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1972: error: previous declaration of 'PFNGLGETSHADERINFOLOGPROC' was here smooth_opengl3.c:137: error: redefinition of typedef 'PFNGLGETPROGRAMIVPROC' /usr/X11R6/include/GL/gl.h:1970: error: previous declaration of 'PFNGLGETPROGRAMIVPROC' was here smooth_opengl3.c:140: error: redefinition of typedef 'PFNGLGETPROGRAMINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1973: error: previous declaration of 'PFNGLGETPROGRAMINFOLOGPROC' was here smooth_opengl3.c:143: error: redefinition of typedef 'PFNGLGETATTRIBLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1981: error: previous declaration of 'PFNGLGETATTRIBLOCATIONPROC' was here smooth_opengl3.c:146: error: redefinition of typedef 'PFNGLVERTEXATTRIBPOINTERPROC' /usr/X11R6/include/GL/gl.h:1930: error: previous declaration of 'PFNGLVERTEXATTRIBPOINTERPROC' was here smooth_opengl3.c:149: error: redefinition of typedef 'PFNGLENABLEVERTEXATTRIBARRAYPROC' /usr/X11R6/include/GL/gl.h:1931: error: previous declaration of 'PFNGLENABLEVERTEXATTRIBARRAYPROC' was here smooth_opengl3.c:152: error: redefinition of typedef 'PFNGLGETUNIFORMLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1974: error: previous declaration of 'PFNGLGETUNIFORMLOCATIONPROC' was here smooth_opengl3.c:155: error: redefinition of typedef 'PFNGLUNIFORMMATRIX4FVPROC' /usr/X11R6/include/GL/gl.h:1966: error: previous declaration of 'PFNGLUNIFORMMATRIX4FVPROC' was here smooth_opengl3.c: In function 'main': smooth_opengl3.c:425: error: 'GLUT_FORWARD_COMPATIBLE' undeclared (first use in this function) smooth_opengl3.c:425: error: (Each undeclared identifier is reported only once smooth_opengl3.c:425: error: for each function it appears in.) smooth_opengl3.c:425: error: 'GLUT_DEBUG' undeclared (first use in this function) make[4]: *** [smooth_opengl3-smooth_opengl3.o] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1
This appears to be coming from the definitions that exist in our gl.h. These definitions don't exist in the gl.h of Fedora 10 but are in glext.h instead. I noticed we have the comment...
/* The following macros exist to address conflicts between the names given to * function pointers by the MESA API and OpenGL.framework's API. */
We should probably make the freeglut developers aware of this issue so we don't have to heavily patch the freeglut 2.6.0 release. Any particular comments on this? Jack
Disabling the problem demo, I am able to completely build the freeglut 2.6.0-rc1 under fink unstable and it appears to run all the pre-existing binaries without issue as drop in replacement for 2.4.0. I have no issues with pymol, molmol or ccpnmr built against fink's freeglut. If anyone is interested, here is the freeglut.info file I used in fink unstable...
Package: freeglut Version: 2.6.0 Revision: 0rc1 Maintainer: Jack Howarth <howarth@bromo.med.uc.edu> Source: mirror:sourceforge:freeglut/%N-%v-rc1.tar.gz Source-MD5: b1a8107f99b5d953e8418a5409462294 SourceDirectory: %n-%v Depends: %N-shlibs (= %v-%r) BuildDepends: fink (>= 0.24.12), x11-dev Conflicts: glut, openglut Replaces: glut, openglut ConfigureParams: --disable-replace-glut --disable-warnings -- disable-dependency-tracking --x-includes=/usr/X11R6/include --x- libraries=/usr/X11R6/lib RANLIB='ranlib -c' --build=%m-apple- darwin`uname -r|cut -f1 -d.` --host=%m-apple-darwin`uname -r|cut - f1 -d.` SetCFLAGS: -O3 -DTARGET_HOST_POSIX_X11 SetLDFLAGS: -Wl,-dylib_file,/System/Library/Frameworks/ OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/ Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib PatchScript: << perl -pi -e 's/hardcode_direct=yes/hardcode_direct=no/g' configure perl -pi -e 's/ smooth_opengl3//g' ./progs/demos/Makefile.in << DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README TODO BuildDependsOnly: True InstallScript: << make install DESTDIR=%d ln -s libfreeglut.3.dylib %i/lib/libglut.dylib ln -s libfreeglut.a %i/lib/libglut.a ln -s libfreeglut.la %i/lib/libglut.la ln -s freeglut.h %i/include/GL/glut.h ln -s freeglut_ext.h %i/include/GL/glut_ext.h ln -s freeglut_std.h %i/include/GL/glut_std.h << SplitOff: << Package: %N-shlibs Depends: libgl, x11 Files: lib/libfreeglut.3.9.0.dylib lib/libfreeglut.3.dylib Shlibs: %p/lib/libfreeglut.3.dylib 13.0.0 %n (>= 2.6.0-Orc1) DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README TODO << Description: Opengl utility toolkit DescDetail: << Freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library released under the X-Consortium license. The original GLUT library seems to have been abandoned with the most recent version (3.7) dating back to August 1998. Its license does not allow anyone to distribute modified library code. Freeglut is actively developed and doesn't suffer the license restrictions. The goal is to gradually depreciate the current glut package out of fink replacing it with freeglut. << DescPackaging: << This package is NOT binary compatible with glut/glut-shlibs and can not replace for them. Packages that wish to use freeglut as a replacement for glut cannot have "BuildDepends: glut|freeglut" and "Depends: glut-shlibs|freeglut-shlibs" in their info file, but need to pick one self-consistently.
This package builds the freeglut libraries named as freeglut rather than glut to allow the co-existance with glut since the shared library versioning is identical. I have adopted the use of symlinks for the libraries and headers to allow freeglut to used as a drop in replace for glut without requiring changes in the source code of programs which require glut.
Patch fixes crash in flightgear (taken from RH's Fedora 7 package). << License: OSI-Approved Homepage: http://freeglut.sourceforge.net/
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
William Davis frstanATbellsouthDOTnet Mac OS X.5.6 Darwin 9.5.0 XQuartz 2.3.3_rc5 (xorg-server 1.4.2-apple41) Mac Mini Intel Duo @ 1.86 GHz
Mundus vult decepi, ego non
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
well Jeremy in that case: please see ticket Ticket #19448 (new defect) and see all the error messages about gl WSD On Apr 26, 2009, at 3:38 AM, Jeremy Huddleston wrote:
It should have absolutely nothing to do with building mesa since mesa doesn't use those headers.
19143 is just an issue of a missing dependency on libXfixes (see comment #9). Sorry, but my spam filter caught that bug report email for some reason...
On Apr 25, 2009, at 23:53, William Davis wrote:
Jeremy, could this have something to do with my inability to build Mesa 7.4_1? see trac #19143 WSD On Apr 26, 2009, at 1:47 AM, Jeremy Huddleston wrote:
That is an "interesting" issue... I'm guessing that freeglut test probably has something like:
#ifdef __APPLE__ #define PFNGLGENBUFFERSPROC ... ... #endif
That's because Apple's OpenGL.framework doesn't use the same naming convention for the OpenGL function pointer types as Mesa/ Windows does. We exist in an awkward state bridging the two... in order to be as compatible as possible at the source level, I decided to support both conventions.
It looks like the freeglut test tried to be too clever for its own good...
On 04/25/2009 08:22 PM, Jack Howarth wrote:
On Sat, Apr 25, 2009 at 11:03:03PM -0400, Jack Howarth wrote:
While attempting to build some test packaging for the new freeglut 2.6.0-rc1 release on Intel Darwin, I discovered that their build fails in the freeglut demo programs with the error...
Making all in smooth_opengl3 gcc -DHAVE_CONFIG_H -I. -I../../.. -I/sw/include -I../../../ include -I/usr/X11R6/include -O3 -DTARGET_HOST_POSIX_X11 -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo './'`smooth_opengl3.c smooth_opengl3.c:101: error: redefinition of typedef 'PFNGLGENBUFFERSPROC' /usr/X11R6/include/GL/gl.h:1884: error: previous declaration of 'PFNGLGENBUFFERSPROC' was here smooth_opengl3.c:104: error: redefinition of typedef 'PFNGLBINDBUFFERPROC' /usr/X11R6/include/GL/gl.h:1882: error: previous declaration of 'PFNGLBINDBUFFERPROC' was here smooth_opengl3.c:107: error: redefinition of typedef 'PFNGLBUFFERDATAPROC' /usr/X11R6/include/GL/gl.h:1886: error: previous declaration of 'PFNGLBUFFERDATAPROC' was here smooth_opengl3.c:110: error: redefinition of typedef 'PFNGLCREATESHADERPROC' /usr/X11R6/include/GL/gl.h:1939: error: previous declaration of 'PFNGLCREATESHADERPROC' was here smooth_opengl3.c:113: error: redefinition of typedef 'PFNGLSHADERSOURCEPROC' /usr/X11R6/include/GL/gl.h:1940: error: previous declaration of 'PFNGLSHADERSOURCEPROC' was here smooth_opengl3.c:116: error: redefinition of typedef 'PFNGLCOMPILESHADERPROC' /usr/X11R6/include/GL/gl.h:1941: error: previous declaration of 'PFNGLCOMPILESHADERPROC' was here smooth_opengl3.c:119: error: redefinition of typedef 'PFNGLCREATEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1942: error: previous declaration of 'PFNGLCREATEPROGRAMPROC' was here smooth_opengl3.c:122: error: redefinition of typedef 'PFNGLATTACHSHADERPROC' /usr/X11R6/include/GL/gl.h:1943: error: previous declaration of 'PFNGLATTACHSHADERPROC' was here smooth_opengl3.c:125: error: redefinition of typedef 'PFNGLLINKPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1944: error: previous declaration of 'PFNGLLINKPROGRAMPROC' was here smooth_opengl3.c:128: error: redefinition of typedef 'PFNGLUSEPROGRAMPROC' /usr/X11R6/include/GL/gl.h:1945: error: previous declaration of 'PFNGLUSEPROGRAMPROC' was here smooth_opengl3.c:131: error: redefinition of typedef 'PFNGLGETSHADERIVPROC' /usr/X11R6/include/GL/gl.h:1969: error: previous declaration of 'PFNGLGETSHADERIVPROC' was here smooth_opengl3.c:134: error: redefinition of typedef 'PFNGLGETSHADERINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1972: error: previous declaration of 'PFNGLGETSHADERINFOLOGPROC' was here smooth_opengl3.c:137: error: redefinition of typedef 'PFNGLGETPROGRAMIVPROC' /usr/X11R6/include/GL/gl.h:1970: error: previous declaration of 'PFNGLGETPROGRAMIVPROC' was here smooth_opengl3.c:140: error: redefinition of typedef 'PFNGLGETPROGRAMINFOLOGPROC' /usr/X11R6/include/GL/gl.h:1973: error: previous declaration of 'PFNGLGETPROGRAMINFOLOGPROC' was here smooth_opengl3.c:143: error: redefinition of typedef 'PFNGLGETATTRIBLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1981: error: previous declaration of 'PFNGLGETATTRIBLOCATIONPROC' was here smooth_opengl3.c:146: error: redefinition of typedef 'PFNGLVERTEXATTRIBPOINTERPROC' /usr/X11R6/include/GL/gl.h:1930: error: previous declaration of 'PFNGLVERTEXATTRIBPOINTERPROC' was here smooth_opengl3.c:149: error: redefinition of typedef 'PFNGLENABLEVERTEXATTRIBARRAYPROC' /usr/X11R6/include/GL/gl.h:1931: error: previous declaration of 'PFNGLENABLEVERTEXATTRIBARRAYPROC' was here smooth_opengl3.c:152: error: redefinition of typedef 'PFNGLGETUNIFORMLOCATIONPROC' /usr/X11R6/include/GL/gl.h:1974: error: previous declaration of 'PFNGLGETUNIFORMLOCATIONPROC' was here smooth_opengl3.c:155: error: redefinition of typedef 'PFNGLUNIFORMMATRIX4FVPROC' /usr/X11R6/include/GL/gl.h:1966: error: previous declaration of 'PFNGLUNIFORMMATRIX4FVPROC' was here smooth_opengl3.c: In function 'main': smooth_opengl3.c:425: error: 'GLUT_FORWARD_COMPATIBLE' undeclared (first use in this function) smooth_opengl3.c:425: error: (Each undeclared identifier is reported only once smooth_opengl3.c:425: error: for each function it appears in.) smooth_opengl3.c:425: error: 'GLUT_DEBUG' undeclared (first use in this function) make[4]: *** [smooth_opengl3-smooth_opengl3.o] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1
This appears to be coming from the definitions that exist in our gl.h. These definitions don't exist in the gl.h of Fedora 10 but are in glext.h instead. I noticed we have the comment...
/* The following macros exist to address conflicts between the names given to * function pointers by the MESA API and OpenGL.framework's API. */
We should probably make the freeglut developers aware of this issue so we don't have to heavily patch the freeglut 2.6.0 release. Any particular comments on this? Jack
Disabling the problem demo, I am able to completely build the freeglut 2.6.0-rc1 under fink unstable and it appears to run all the pre-existing binaries without issue as drop in replacement for 2.4.0. I have no issues with pymol, molmol or ccpnmr built against fink's freeglut. If anyone is interested, here is the freeglut.info file I used in fink unstable...
Package: freeglut Version: 2.6.0 Revision: 0rc1 Maintainer: Jack Howarth <howarth@bromo.med.uc.edu> Source: mirror:sourceforge:freeglut/%N-%v-rc1.tar.gz Source-MD5: b1a8107f99b5d953e8418a5409462294 SourceDirectory: %n-%v Depends: %N-shlibs (= %v-%r) BuildDepends: fink (>= 0.24.12), x11-dev Conflicts: glut, openglut Replaces: glut, openglut ConfigureParams: --disable-replace-glut --disable-warnings -- disable-dependency-tracking --x-includes=/usr/X11R6/include --x- libraries=/usr/X11R6/lib RANLIB='ranlib -c' --build=%m-apple- darwin`uname -r|cut -f1 -d.` --host=%m-apple-darwin`uname -r|cut - f1 -d.` SetCFLAGS: -O3 -DTARGET_HOST_POSIX_X11 SetLDFLAGS: -Wl,-dylib_file,/System/Library/Frameworks/ OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/ Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib PatchScript: << perl -pi -e 's/hardcode_direct=yes/hardcode_direct=no/g' configure perl -pi -e 's/ smooth_opengl3//g' ./progs/demos/Makefile.in << DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README TODO BuildDependsOnly: True InstallScript: << make install DESTDIR=%d ln -s libfreeglut.3.dylib %i/lib/libglut.dylib ln -s libfreeglut.a %i/lib/libglut.a ln -s libfreeglut.la %i/lib/libglut.la ln -s freeglut.h %i/include/GL/glut.h ln -s freeglut_ext.h %i/include/GL/glut_ext.h ln -s freeglut_std.h %i/include/GL/glut_std.h << SplitOff: << Package: %N-shlibs Depends: libgl, x11 Files: lib/libfreeglut.3.9.0.dylib lib/libfreeglut.3.dylib Shlibs: %p/lib/libfreeglut.3.dylib 13.0.0 %n (>= 2.6.0-Orc1) DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README TODO << Description: Opengl utility toolkit DescDetail: << Freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library released under the X-Consortium license. The original GLUT library seems to have been abandoned with the most recent version (3.7) dating back to August 1998. Its license does not allow anyone to distribute modified library code. Freeglut is actively developed and doesn't suffer the license restrictions. The goal is to gradually depreciate the current glut package out of fink replacing it with freeglut. << DescPackaging: << This package is NOT binary compatible with glut/glut-shlibs and can not replace for them. Packages that wish to use freeglut as a replacement for glut cannot have "BuildDepends: glut|freeglut" and "Depends: glut-shlibs|freeglut-shlibs" in their info file, but need to pick one self-consistently.
This package builds the freeglut libraries named as freeglut rather than glut to allow the co-existance with glut since the shared library versioning is identical. I have adopted the use of symlinks for the libraries and headers to allow freeglut to used as a drop in replace for glut without requiring changes in the source code of programs which require glut.
Patch fixes crash in flightgear (taken from RH's Fedora 7 package). << License: OSI-Approved Homepage: http://freeglut.sourceforge.net/
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
William Davis frstanATbellsouthDOTnet Mac OS X.5.6 Darwin 9.5.0 XQuartz 2.3.3_rc5 (xorg-server 1.4.2-apple41) Mac Mini Intel Duo @ 1.86 GHz
Mundus vult decepi, ego non
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
William Davis frstanATbellsouthDOTnet Mac OS X.5.6 Darwin 9.5.0 XQuartz 2.3.3_rc5 (xorg-server 1.4.2-apple41) Mac Mini Intel Duo @ 1.86 GHz Mundus vult decepi, ego non
Jeremy, Just to be clear, this only impacts a single demo program in freeglut and is the demo programs code and not freeglut's shared libraries code so it doesn't really impact us seriously. I'll file a bug report upstream about this. Jack On Sat, Apr 25, 2009 at 10:47:46PM -0700, Jeremy Huddleston wrote:
That is an "interesting" issue... I'm guessing that freeglut test probably has something like:
#ifdef __APPLE__ #define PFNGLGENBUFFERSPROC ... ... #endif
That's because Apple's OpenGL.framework doesn't use the same naming convention for the OpenGL function pointer types as Mesa/Windows does. We exist in an awkward state bridging the two... in order to be as compatible as possible at the source level, I decided to support both conventions.
It looks like the freeglut test tried to be too clever for its own good...
On Sat, Apr 25, 2009 at 10:47:46PM -0700, Jeremy Huddleston wrote:
That is an "interesting" issue... I'm guessing that freeglut test probably has something like:
#ifdef __APPLE__ #define PFNGLGENBUFFERSPROC ... ... #endif
That's because Apple's OpenGL.framework doesn't use the same naming convention for the OpenGL function pointer types as Mesa/Windows does. We exist in an awkward state bridging the two... in order to be as compatible as possible at the source level, I decided to support both conventions.
It looks like the freeglut test tried to be too clever for its own good...
Jeremy, I tried... --- smooth_opengl3.c.org 2009-04-26 12:11:41.000000000 -0400 +++ smooth_opengl3.c 2009-04-26 12:18:29.000000000 -0400 @@ -98,6 +98,8 @@ #define APIENTRY #endif +#ifndef __APPLE__ + typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); PFNGLGENBUFFERSPROC gl_GenBuffers; @@ -178,6 +180,8 @@ gl_UniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) glutGetProcAddress ("glUniformMatrix4fv"); } +#endif + /* vertex array data for a colored 2D triangle, consisting of RGB color values and XY coordinates */ const GLfloat varray[] = { but the compilation fails because the wrapper encloses definition for gl extensions at the end... #ifndef __APPLE__ typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); PFNGLGENBUFFERSPROC gl_GenBuffers; typedef void (APIENTRY *PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); PFNGLBINDBUFFERPROC gl_BindBuffer; typedef void (APIENTRY *PFNGLBUFFERDATAPROC) (GLenum target, ourGLsizeiptr size, const GLvoid *data, GLenum usage); PFNGLBUFFERDATAPROC gl_BufferData; typedef GLuint (APIENTRY *PFNGLCREATESHADERPROC) (GLenum type); PFNGLCREATESHADERPROC gl_CreateShader; typedef void (APIENTRY *PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const ourGLchar **string, const GLint *length); PFNGLSHADERSOURCEPROC gl_ShaderSource; typedef void (APIENTRY *PFNGLCOMPILESHADERPROC) (GLuint shader); PFNGLCOMPILESHADERPROC gl_CompileShader; typedef GLuint (APIENTRY *PFNGLCREATEPROGRAMPROC) (void); PFNGLCREATEPROGRAMPROC gl_CreateProgram; typedef void (APIENTRY *PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); PFNGLATTACHSHADERPROC gl_AttachShader; typedef void (APIENTRY *PFNGLLINKPROGRAMPROC) (GLuint program); PFNGLLINKPROGRAMPROC gl_LinkProgram; typedef void (APIENTRY *PFNGLUSEPROGRAMPROC) (GLuint program); PFNGLUSEPROGRAMPROC gl_UseProgram; typedef void (APIENTRY *PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); PFNGLGETSHADERIVPROC gl_GetShaderiv; typedef void (APIENTRY *PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, ourGLchar *infoLog); PFNGLGETSHADERINFOLOGPROC gl_GetShaderInfoLog; typedef void (APIENTRY *PFNGLGETPROGRAMIVPROC) (GLenum target, GLenum pname, GLint *params); PFNGLGETPROGRAMIVPROC gl_GetProgramiv; typedef void (APIENTRY *PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, ourGLchar *infoLog); PFNGLGETPROGRAMINFOLOGPROC gl_GetProgramInfoLog; typedef GLint (APIENTRY *PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const ourGLchar *name); PFNGLGETATTRIBLOCATIONPROC gl_GetAttribLocation; typedef void (APIENTRY *PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); PFNGLVERTEXATTRIBPOINTERPROC gl_VertexAttribPointer; typedef void (APIENTRY *PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); PFNGLENABLEVERTEXATTRIBARRAYPROC gl_EnableVertexAttribArray; typedef GLint (APIENTRY *PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const ourGLchar *name); PFNGLGETUNIFORMLOCATIONPROC gl_GetUniformLocation; typedef void (APIENTRY *PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); PFNGLUNIFORMMATRIX4FVPROC gl_UniformMatrix4fv; void initExtensionEntries(void) { gl_GenBuffers = (PFNGLGENBUFFERSPROC) glutGetProcAddress ("glGenBuffers"); gl_BindBuffer = (PFNGLBINDBUFFERPROC) glutGetProcAddress ("glBindBuffer"); gl_BufferData = (PFNGLBUFFERDATAPROC) glutGetProcAddress ("glBufferData"); gl_CreateShader = (PFNGLCREATESHADERPROC) glutGetProcAddress ("glCreateShader"); gl_ShaderSource = (PFNGLSHADERSOURCEPROC) glutGetProcAddress ("glShaderSource"); gl_CompileShader = (PFNGLCOMPILESHADERPROC) glutGetProcAddress ("glCompileShader"); gl_CreateProgram = (PFNGLCREATEPROGRAMPROC) glutGetProcAddress ("glCreateProgram"); gl_AttachShader = (PFNGLATTACHSHADERPROC) glutGetProcAddress ("glAttachShader"); gl_LinkProgram = (PFNGLLINKPROGRAMPROC) glutGetProcAddress ("glLinkProgram"); gl_UseProgram = (PFNGLUSEPROGRAMPROC) glutGetProcAddress ("glUseProgram"); gl_GetShaderiv = (PFNGLGETSHADERIVPROC) glutGetProcAddress ("glGetShaderiv"); gl_GetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) glutGetProcAddress ("glGetShaderInfoLog"); gl_GetProgramiv = (PFNGLGETPROGRAMIVPROC) glutGetProcAddress ("glGetProgramiv"); gl_GetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) glutGetProcAddress ("glGetProgramInfoLog"); gl_GetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) glutGetProcAddress ("glGetAttribLocation"); gl_VertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) glutGetProcAddress ("glVertexAttribPointer"); gl_EnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) glutGetProcAddress ("glEnableVertexAttribArray"); gl_GetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) glutGetProcAddress ("glGetUniformLocation"); gl_UniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) glutGetProcAddress ("glUniformMatrix4fv"); } #endif Should we have those initExtensionEntries avallable somewhere? I also tried... --- smooth_opengl3.c.org 2009-04-26 12:11:41.000000000 -0400 +++ smooth_opengl3.c 2009-04-26 12:21:50.000000000 -0400 @@ -98,6 +98,8 @@ #define APIENTRY #endif +#ifndef __APPLE__ + typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); PFNGLGENBUFFERSPROC gl_GenBuffers; @@ -155,6 +157,8 @@ typedef void (APIENTRY *PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); PFNGLUNIFORMMATRIX4FVPROC gl_UniformMatrix4fv; +#endif + void initExtensionEntries(void) { gl_GenBuffers = (PFNGLGENBUFFERSPROC) glutGetProcAddress ("glGenBuffers"); to allow these to be defined, I still get the compile errors... gcc -DHAVE_CONFIG_H -I. -I../../.. -I/sw/include -I../../../include -I/usr/X11R6/include -O3 -DTARGET_HOST_POSIX_X11 -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo './'`smooth_opengl3.c smooth_opengl3.c: In function ‘initExtensionEntries’: smooth_opengl3.c:164: error: ‘gl_GenBuffers’ undeclared (first use in this function) smooth_opengl3.c:164: error: (Each undeclared identifier is reported only once smooth_opengl3.c:164: error: for each function it appears in.) smooth_opengl3.c:165: error: ‘gl_BindBuffer’ undeclared (first use in this function) smooth_opengl3.c:166: error: ‘gl_BufferData’ undeclared (first use in this function) smooth_opengl3.c:167: error: ‘gl_CreateShader’ undeclared (first use in this function) smooth_opengl3.c:168: error: ‘gl_ShaderSource’ undeclared (first use in this function) smooth_opengl3.c:169: error: ‘gl_CompileShader’ undeclared (first use in this function) smooth_opengl3.c:170: error: ‘gl_CreateProgram’ undeclared (first use in this function) smooth_opengl3.c:171: error: ‘gl_AttachShader’ undeclared (first use in this function) smooth_opengl3.c:172: error: ‘gl_LinkProgram’ undeclared (first use in this function) smooth_opengl3.c:173: error: ‘gl_UseProgram’ undeclared (first use in this function) smooth_opengl3.c:174: error: ‘gl_GetShaderiv’ undeclared (first use in this function) smooth_opengl3.c:175: error: ‘gl_GetShaderInfoLog’ undeclared (first use in this function) smooth_opengl3.c:176: error: ‘gl_GetProgramiv’ undeclared (first use in this function) smooth_opengl3.c:177: error: ‘gl_GetProgramInfoLog’ undeclared (first use in this function) smooth_opengl3.c:178: error: ‘gl_GetAttribLocation’ undeclared (first use in this function) smooth_opengl3.c:179: error: ‘gl_VertexAttribPointer’ undeclared (first use in this function) smooth_opengl3.c:180: error: ‘gl_EnableVertexAttribArray’ undeclared (first use in this function) smooth_opengl3.c:181: error: ‘gl_GetUniformLocation’ undeclared (first use in this function) smooth_opengl3.c:182: error: ‘gl_UniformMatrix4fv’ undeclared (first use in this function) make: *** [smooth_opengl3-smooth_opengl3.o] Error 1 Thanks in advance for any advice. Jack
Based on the code you just provided, I suspect the demo program will fail to compile on sufficiently recent mesa as well. If you want to run the test, you need to comment out all the typedefs (not the actual code). The application should not be providing the PFNGL*PROC typedefs. Those are provided by glext.h and gl.h in mesa, windows, and our glx. The only OpenGL implementation that doesn't provide them is OSX's OpenGL.framework since they provide the typedefs under a different naming convention. Our (GLX) gl headers support both. If they're blindly doing things like "typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);" in their code, then they fail. --Jeremy On Apr 26, 2009, at 09:23, Jack Howarth wrote:
On Sat, Apr 25, 2009 at 10:47:46PM -0700, Jeremy Huddleston wrote:
That is an "interesting" issue... I'm guessing that freeglut test probably has something like:
#ifdef __APPLE__ #define PFNGLGENBUFFERSPROC ... ... #endif
That's because Apple's OpenGL.framework doesn't use the same naming convention for the OpenGL function pointer types as Mesa/Windows does. We exist in an awkward state bridging the two... in order to be as compatible as possible at the source level, I decided to support both conventions.
It looks like the freeglut test tried to be too clever for its own good...
Jeremy, I tried...
--- smooth_opengl3.c.org 2009-04-26 12:11:41.000000000 -0400 +++ smooth_opengl3.c 2009-04-26 12:18:29.000000000 -0400 @@ -98,6 +98,8 @@ #define APIENTRY #endif
+#ifndef __APPLE__ + typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); PFNGLGENBUFFERSPROC gl_GenBuffers;
@@ -178,6 +180,8 @@ gl_UniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) glutGetProcAddress ("glUniformMatrix4fv"); }
+#endif + /* vertex array data for a colored 2D triangle, consisting of RGB color values and XY coordinates */ const GLfloat varray[] = {
but the compilation fails because the wrapper encloses definition for gl extensions at the end...
#ifndef __APPLE__
typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); PFNGLGENBUFFERSPROC gl_GenBuffers;
typedef void (APIENTRY *PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); PFNGLBINDBUFFERPROC gl_BindBuffer;
typedef void (APIENTRY *PFNGLBUFFERDATAPROC) (GLenum target, ourGLsizeiptr size, const GLvoid *data, GLenum usage); PFNGLBUFFERDATAPROC gl_BufferData;
typedef GLuint (APIENTRY *PFNGLCREATESHADERPROC) (GLenum type); PFNGLCREATESHADERPROC gl_CreateShader;
typedef void (APIENTRY *PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const ourGLchar **string, const GLint *length); PFNGLSHADERSOURCEPROC gl_ShaderSource;
typedef void (APIENTRY *PFNGLCOMPILESHADERPROC) (GLuint shader); PFNGLCOMPILESHADERPROC gl_CompileShader;
typedef GLuint (APIENTRY *PFNGLCREATEPROGRAMPROC) (void); PFNGLCREATEPROGRAMPROC gl_CreateProgram;
typedef void (APIENTRY *PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); PFNGLATTACHSHADERPROC gl_AttachShader;
typedef void (APIENTRY *PFNGLLINKPROGRAMPROC) (GLuint program); PFNGLLINKPROGRAMPROC gl_LinkProgram;
typedef void (APIENTRY *PFNGLUSEPROGRAMPROC) (GLuint program); PFNGLUSEPROGRAMPROC gl_UseProgram;
typedef void (APIENTRY *PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); PFNGLGETSHADERIVPROC gl_GetShaderiv;
typedef void (APIENTRY *PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, ourGLchar *infoLog); PFNGLGETSHADERINFOLOGPROC gl_GetShaderInfoLog;
typedef void (APIENTRY *PFNGLGETPROGRAMIVPROC) (GLenum target, GLenum pname, GLint *params); PFNGLGETPROGRAMIVPROC gl_GetProgramiv;
typedef void (APIENTRY *PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, ourGLchar *infoLog); PFNGLGETPROGRAMINFOLOGPROC gl_GetProgramInfoLog;
typedef GLint (APIENTRY *PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const ourGLchar *name); PFNGLGETATTRIBLOCATIONPROC gl_GetAttribLocation;
typedef void (APIENTRY *PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); PFNGLVERTEXATTRIBPOINTERPROC gl_VertexAttribPointer;
typedef void (APIENTRY *PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); PFNGLENABLEVERTEXATTRIBARRAYPROC gl_EnableVertexAttribArray;
typedef GLint (APIENTRY *PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const ourGLchar *name); PFNGLGETUNIFORMLOCATIONPROC gl_GetUniformLocation;
typedef void (APIENTRY *PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); PFNGLUNIFORMMATRIX4FVPROC gl_UniformMatrix4fv;
void initExtensionEntries(void) { gl_GenBuffers = (PFNGLGENBUFFERSPROC) glutGetProcAddress ("glGenBuffers"); gl_BindBuffer = (PFNGLBINDBUFFERPROC) glutGetProcAddress ("glBindBuffer"); gl_BufferData = (PFNGLBUFFERDATAPROC) glutGetProcAddress ("glBufferData"); gl_CreateShader = (PFNGLCREATESHADERPROC) glutGetProcAddress ("glCreateShader"); gl_ShaderSource = (PFNGLSHADERSOURCEPROC) glutGetProcAddress ("glShaderSource"); gl_CompileShader = (PFNGLCOMPILESHADERPROC) glutGetProcAddress ("glCompileShader"); gl_CreateProgram = (PFNGLCREATEPROGRAMPROC) glutGetProcAddress ("glCreateProgram"); gl_AttachShader = (PFNGLATTACHSHADERPROC) glutGetProcAddress ("glAttachShader"); gl_LinkProgram = (PFNGLLINKPROGRAMPROC) glutGetProcAddress ("glLinkProgram"); gl_UseProgram = (PFNGLUSEPROGRAMPROC) glutGetProcAddress ("glUseProgram"); gl_GetShaderiv = (PFNGLGETSHADERIVPROC) glutGetProcAddress ("glGetShaderiv"); gl_GetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) glutGetProcAddress ("glGetShaderInfoLog"); gl_GetProgramiv = (PFNGLGETPROGRAMIVPROC) glutGetProcAddress ("glGetProgramiv"); gl_GetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) glutGetProcAddress ("glGetProgramInfoLog"); gl_GetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) glutGetProcAddress ("glGetAttribLocation"); gl_VertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) glutGetProcAddress ("glVertexAttribPointer"); gl_EnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) glutGetProcAddress ("glEnableVertexAttribArray"); gl_GetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) glutGetProcAddress ("glGetUniformLocation"); gl_UniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) glutGetProcAddress ("glUniformMatrix4fv"); }
#endif
Should we have those initExtensionEntries avallable somewhere? I also tried...
--- smooth_opengl3.c.org 2009-04-26 12:11:41.000000000 -0400 +++ smooth_opengl3.c 2009-04-26 12:21:50.000000000 -0400 @@ -98,6 +98,8 @@ #define APIENTRY #endif
+#ifndef __APPLE__ + typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); PFNGLGENBUFFERSPROC gl_GenBuffers;
@@ -155,6 +157,8 @@ typedef void (APIENTRY *PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); PFNGLUNIFORMMATRIX4FVPROC gl_UniformMatrix4fv;
+#endif + void initExtensionEntries(void) { gl_GenBuffers = (PFNGLGENBUFFERSPROC) glutGetProcAddress ("glGenBuffers");
to allow these to be defined, I still get the compile errors...
gcc -DHAVE_CONFIG_H -I. -I../../.. -I/sw/include -I../../../ include -I/usr/X11R6/include -O3 -DTARGET_HOST_POSIX_X11 -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo './'`smooth_opengl3.c smooth_opengl3.c: In function ‘initExtensionEntries’: smooth_opengl3.c:164: error: ‘gl_GenBuffers’ undeclared (first use in this function) smooth_opengl3.c:164: error: (Each undeclared identifier is reported only once smooth_opengl3.c:164: error: for each function it appears in.) smooth_opengl3.c:165: error: ‘gl_BindBuffer’ undeclared (first use in this function) smooth_opengl3.c:166: error: ‘gl_BufferData’ undeclared (first use in this function) smooth_opengl3.c:167: error: ‘gl_CreateShader’ undeclared (first use in this function) smooth_opengl3.c:168: error: ‘gl_ShaderSource’ undeclared (first use in this function) smooth_opengl3.c:169: error: ‘gl_CompileShader’ undeclared (first use in this function) smooth_opengl3.c:170: error: ‘gl_CreateProgram’ undeclared (first use in this function) smooth_opengl3.c:171: error: ‘gl_AttachShader’ undeclared (first use in this function) smooth_opengl3.c:172: error: ‘gl_LinkProgram’ undeclared (first use in this function) smooth_opengl3.c:173: error: ‘gl_UseProgram’ undeclared (first use in this function) smooth_opengl3.c:174: error: ‘gl_GetShaderiv’ undeclared (first use in this function) smooth_opengl3.c:175: error: ‘gl_GetShaderInfoLog’ undeclared (first use in this function) smooth_opengl3.c:176: error: ‘gl_GetProgramiv’ undeclared (first use in this function) smooth_opengl3.c:177: error: ‘gl_GetProgramInfoLog’ undeclared (first use in this function) smooth_opengl3.c:178: error: ‘gl_GetAttribLocation’ undeclared (first use in this function) smooth_opengl3.c:179: error: ‘gl_VertexAttribPointer’ undeclared (first use in this function) smooth_opengl3.c:180: error: ‘gl_EnableVertexAttribArray’ undeclared (first use in this function) smooth_opengl3.c:181: error: ‘gl_GetUniformLocation’ undeclared (first use in this function) smooth_opengl3.c:182: error: ‘gl_UniformMatrix4fv’ undeclared (first use in this function) make: *** [smooth_opengl3-smooth_opengl3.o] Error 1
Thanks in advance for any advice. Jack _______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
participants (3)
-
Jack Howarth
-
Jeremy Huddleston
-
William Davis