Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit 1d0a933

Browse files
deriamismohawk2
authored andcommitted
On more recent releases of MacOS, several warnings and errors are
emitted due to duplicate definiions when building against AGL. This commit removes the duplicate definitions with AGL, relying instead on AGL.Framework to provide them.
1 parent ee76a30 commit 1d0a933

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

gl_util.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
/* Include prototype flag */
99
#if (defined(_WIN32) || defined(HAVE_W32API))
1010
#define GL_GLEXT_PROCS
11-
#else
11+
#elif !defined(HAVE_AGL_GLUT)
1212
#define GL_GLEXT_PROTOTYPES
1313
#endif
1414

1515
/* Provide GL header files for Windows and Apple */
16-
#define INCLUDE_LOCAL_HEADER defined(HAVE_W32API) || defined(__APPLE__)
16+
#if defined(HAVE_W32API) || defined(__APPLE__)
17+
#define INCLUDE_LOCAL_HEADER 1
18+
#endif
1719
#if INCLUDE_LOCAL_HEADER
1820
#include "./include/GL/gl.h"
1921
#else

glext_procs.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
#ifndef HAVE_AGL_GLUT
13
#ifndef __glext_procs_h_
24
#define __glext_procs_h_
35

@@ -16244,3 +16246,5 @@ static PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC glReplace
1624416246
#endif
1624516247

1624616248
#endif
16249+
16250+
#endif /* HAVE_AGL_GLUT */

utils/glext_procs.pl

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
}
2626
close(EXPS);
2727

28+
print EXTS "\n#ifndef HAVE_AGL_GLUT\n";
29+
2830
# Header
2931
my $header = qq
3032
{#ifndef %s
@@ -188,5 +190,7 @@
188190
}
189191
}
190192

193+
print EXTS "\n#endif /* HAVE_AGL_GLUT */\n";
194+
191195
close(EXTS);
192196
close(FILE);

0 commit comments

Comments
 (0)