Skip to content

Commit 03ce4b1

Browse files
bfree-githubwchristian
authored andcommitted
restored support for GLX, improve freeglut on apple
1 parent eff1e94 commit 03ce4b1

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

Makefile.PL

+15-16
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ use Config;
1111
# Supported windowing interfaces
1212
our $is_valid_interface =
1313
{
14-
'AGL' => 'GLUT framework on Mac OS X',
15-
'FREEGLUT' => 'FreeGLUT, preferred over GLUT',
16-
'GLUT' => 'GLUT; often really FreeGLUT on Linux',
17-
'GLX' => 'GLX+X11 not supported; use GLUT or FreeGLUT',
18-
'W32API' => 'Uses WGL+FreeGLUT on CYGWIN, instead of GLX+FreeGLUT',
19-
'WGL' => 'Same as W32API',
14+
'AGL' => 'Default GLUT framework on Mac OS X',
15+
'FREEGLUT' => 'FreeGLUT, preferred over GLUT',
16+
'GLUT' => 'GLUT; often really FreeGLUT on Linux',
17+
'GLX' => 'Default GLX+X11 on Linux; use XQuartz on Mac OS X',
18+
'W32API' => 'Uses WGL+FreeGLUT on CYGWIN, instead of GLX+FreeGLUT',
19+
'WGL' => 'Same as W32API',
2020
};
2121

2222

@@ -256,14 +256,6 @@ if ( grep { m/^interface=/i } @ARGV )
256256
}
257257
elsif ($interface eq 'GLX')
258258
{
259-
print "\n";
260-
print "***********************************************************************\n";
261-
print "* ERROR: GLX interface is not supported, use GLUT or FreeGLUT instead *\n";
262-
print "***********************************************************************\n";
263-
print "\n";
264-
265-
exit 0;
266-
267259
if (!$found_libs->{GL} && !$found_libs->{MESA} && !$found_libs->{GLX})
268260
{
269261
print "GLX interface requires GLX/X11 but the libraries were not found\n";
@@ -316,7 +308,7 @@ elsif ($IS_CYGWIN)
316308
die "No suitable OpenGL+GLUT interface found for CYGWIN\n";
317309
}
318310
}
319-
elsif ($^O eq 'darwin' && $found_libs->{GLUT})
311+
elsif ($^O eq 'darwin' && $found_libs->{GLUT} && !$found_libs->{FREEGLUT})
320312
{
321313
$interface_lib = 'AGL';
322314
}
@@ -658,7 +650,14 @@ sub get_libs
658650
{
659651
$found->{GL} = 'OpenGL.framework';
660652
$found->{GLU} = 'AGL.framework';
661-
$found->{GLUT} = 'GLUT.framework';
653+
if (-e '/opt/X11/lib/libglut.3.dylib')
654+
{
655+
$found->{FREEGLUT} = 'glut';
656+
}
657+
else
658+
{
659+
$found->{GLUT} = 'GLUT.framework';
660+
}
662661
return $found;
663662
}
664663

Release_Notes

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ General Notes:
1414

1515
* on win32, clean up mingw recognition and allow gmake
1616

17+
* Restored support for GLX.
18+
19+
* Fixed/improved a number of GLUT issues.
20+
1721
Highlights:
1822

1923
* Fixed multi-texture constants/APIs/exports
@@ -32,6 +36,8 @@ Highlights:
3236

3337
* Fixed/improved GLUT version reporting in util/glversion.c.
3438

39+
* Restored GLX interface support for Makefile.PL.
40+
3541
* Enhanced test.pl for OpenGL::Shader and VBOs
3642

3743
* suppress osx 10.9 deprecation warnings

0 commit comments

Comments
 (0)