voyageur / openglide

Git mirror of openglide CVS (http://openglide.sourceforge.net/)
GNU Lesser General Public License v2.1
48 stars 17 forks source link

October 2020 commit breaks macOS compilation #24

Open almeath opened 3 years ago

almeath commented 3 years ago

This commit from October 2020 breaks compilation in macOS, at least in Mojave 10.14.6, which seems reliant on the local glext.h:

https://github.com/voyageur/openglide/commit/a50467025dc95edb8cef6af3b788eb6a44b897f5

Terminal output is as follows:

In file included from grguTex.cpp:15:
./Glextensions.h:26:8: error: unknown type name 'PFNGLCLIENTACTIVETEXTUREARBPROC'
extern PFNGLCLIENTACTIVETEXTUREARBPROC          p_glClientActiveTexture;
       ^
./Glextensions.h:27:8: error: unknown type name 'PFNGLMULTITEXCOORD4FARBPROC'
extern PFNGLMULTITEXCOORD4FARBPROC              p_glMultiTexCoord4fARB;
       ^
./Glextensions.h:28:8: error: unknown type name 'PFNGLMULTITEXCOORD4FVARBPROC'
extern PFNGLMULTITEXCOORD4FVARBPROC             p_glMultiTexCoord4fvARB;
       ^
./Glextensions.h:29:8: error: unknown type name 'PFNGLACTIVETEXTUREARBPROC'
extern PFNGLACTIVETEXTUREARBPROC                p_glActiveTextureARB;
       ^
./Glextensions.h:30:8: error: unknown type name 'PFNGLSECONDARYCOLOR3UBVEXTPROC'
extern PFNGLSECONDARYCOLOR3UBVEXTPROC           p_glSecondaryColor3ubvEXT;
       ^
./Glextensions.h:31:8: error: unknown type name 'PFNGLSECONDARYCOLOR3UBEXTPROC'
extern PFNGLSECONDARYCOLOR3UBEXTPROC            p_glSecondaryColor3ubEXT;
       ^
./Glextensions.h:32:8: error: unknown type name 'PFNGLSECONDARYCOLORPOINTEREXTPROC'
extern PFNGLSECONDARYCOLORPOINTEREXTPROC        p_glSecondaryColorPointerEXT;
       ^
./Glextensions.h:33:8: error: unknown type name 'PFNGLFOGCOORDFEXTPROC'
extern PFNGLFOGCOORDFEXTPROC                    p_glFogCoordfEXT;
       ^
./Glextensions.h:34:8: error: unknown type name 'PFNGLFOGCOORDPOINTEREXTPROC'
extern PFNGLFOGCOORDPOINTEREXTPROC              p_glFogCoordPointerEXT;
       ^
./Glextensions.h:35:8: error: unknown type name 'PFNGLSECONDARYCOLOR3FVEXTPROC'
extern PFNGLSECONDARYCOLOR3FVEXTPROC            p_glSecondaryColor3fvEXT;
       ^
./Glextensions.h:36:8: error: unknown type name 'PFNGLSECONDARYCOLOR3FEXTPROC'
extern PFNGLSECONDARYCOLOR3FEXTPROC             p_glSecondaryColor3fEXT;
       ^
./Glextensions.h:38:8: error: unknown type name 'PFNGLCOLORTABLEEXTPROC'
extern PFNGLCOLORTABLEEXTPROC                   p_glColorTableEXT;
       ^
./Glextensions.h:39:8: error: unknown type name 'PFNGLCOLORSUBTABLEEXTPROC'
extern PFNGLCOLORSUBTABLEEXTPROC                p_glColorSubTableEXT;
       ^
./Glextensions.h:40:8: error: unknown type name 'PFNGLGETCOLORTABLEEXTPROC'
extern PFNGLGETCOLORTABLEEXTPROC                p_glGetColorTableEXT;
       ^
./Glextensions.h:41:8: error: unknown type name 'PFNGLGETCOLORTABLEPARAMETERIVEXTPROC'
extern PFNGLGETCOLORTABLEPARAMETERIVEXTPROC     p_glGetColorTableParameterivEXT;
       ^
./Glextensions.h:42:8: error: unknown type name 'PFNGLGETCOLORTABLEPARAMETERFVEXTPROC'
extern PFNGLGETCOLORTABLEPARAMETERFVEXTPROC     p_glGetColorTableParameterfvEXT;
       ^
./Glextensions.h:44:8: error: unknown type name 'PFNGLBLENDFUNCSEPARATEEXTPROC'
extern PFNGLBLENDFUNCSEPARATEEXTPROC            p_glBlendFuncSeparateEXT;
       ^
./Glextensions.h:47:6: error: variable has incomplete type 'void'
void APIENTRY DummyV( const void *a );
     ^
./Glextensions.h:47:14: error: expected ';' after top level declarator
void APIENTRY DummyV( const void *a );
             ^
             ;
grguTex.cpp:399:9: warning: 'glTexEnvf' is deprecated: first deprecated in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to
      silence these warnings) [-Wdeprecated-declarations]
        glTexEnvf( GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, bias );
        ^

Removing the changes in commit a504670 and restoring the glext.h file from the preceding source code fixes the problem.

Do the changes in this commit provide any tangible benefits at the cost of breaking compatibility in a still supported version of macOS? The install base for Mojave (10.14.6) is still significant because it is the last version of macOS to support 32-bit binaries.

I have forked the changes in case there are any macOS users that are interested.

almeath commented 3 years ago

There was some further patching needed to avoid "Severe Error" warnings being logged by OpenGlide about "GL_EXT_packed_pixels extension". This does not exist on Mac and it needed to be changed to "GL_APPLE_packed_pixels".

rderooy commented 3 years ago

@almeath see https://github.com/voyageur/openglide/issues/13 as to the reason for the fix.

almeath commented 3 years ago

Thanks .. I have not yet tested those games for the same bugs on macOS, but at the moment there appears to be no other way to successfully compile on the Mac without 'undoing' the a504670 changes.