config/auto/opengl.pm - Probe for OpenGL, GLU, and GLUT libraries
Determines whether the platform supports OpenGL, GLU and GLUT. The optimal result at this time is to find OpenGL 3.2, GLU 1.3, and GLUT API version 4.
You will typically need to install the headers and libraries required for compiling OpenGL/GLU/GLUT applications as a separate step in addition to the base development tools for your platform. The following sections detail the steps needed to add OpenGL support for each platform for which we have received this information -- details for additional platforms are welcome!
You will need to install the OpenGL Framework and the GLUT Framework. With these in place, everything else should be autodetected. Mac OS X uses a proprietary GLUT variant that supports more functions than standard GLUT 3.7, but fewer than freeglut.
Linux distributions typically use freeglut (http://freeglut.sourceforge.net/) for GLUT support, and Mesa (http://www.mesa3d.org/) for GLU support. Either the Mesa headers (for open source drivers) or the vendor headers (for closed source drivers) can be used for core OpenGL/GLX support. Here are the package names for various distributions; installing each of these will typically pull in a number of prerequisites as well:
On Windows, Parrot supports four different compiler environments, each of which has different requirements for OpenGL support. Generally you should not attempt to mix the Cygwin variants (installing some X OpenGL libs and some w32api OpenGL libs) as this will almost certainly result in runtime errors like this one:
freeglut ERROR: Function <glutDisplayFunc> called without first calling 'glutInit'.
Windows SDK for Windows Server 2008 and .NET Framework 3.5
GLUT for Win32 (http://www.xmission.com/~nate/glut.html)
GLUT 3.7.6, see http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/.
Requires an X server and libglut-devel, libGL-devel, libGLU-devel, freeglut and its dependencies.
This is tried first.
Requires the opengl and w32api packages.
Cygwin/w32api for native opengl support is only tried if /usr/include/GL does not exist. The problem is that the OpenGL header files are used to create the OpenGL function list, and not the libraries themselves. If the /usr/include/GL headers are found these are used, even if the w32api GLUT libraries are defined.