Works on win32, cygwin, and x11
Ubuntu: apt-get install libgl-dev
Strawberry perl, if freeglut is not included (5.38): http://prima.eu.org/download/freeglut-win64.zip
cpan OpenGL::Modern
perl Makefile.PL
make
make test
make install
perl examples/icosahedron.pl
http://github.com/dk/Prima-OpenGL
OpenGL on MacOS can be used in two unrelated configurations - either with native OpenGL support, or via XQuartz/GLX.
Prima::OpenGL would only work with XQuartz/GLX, while by default OpenGL::Modern uses native OpenGL.
There is currently no way to compile OpenGL::Modern with XQuartz/GLX, however
I've filed a PR that allows configuring it as env WITH_XQUARTZ=1 perl Makefile.PL.
For now, you would need to add the following lines to the OpenGL::Modern's Makefile.PL
after line 17:
$define .= " -DGLEW_APPLE_GLX -I/opt/X11/include"; $libs = '-L/opt/X11/lib -lglut';
Also, in your program, never load OpenGL::Modern before Prima; for some reason that doesn't work
Dmitry Karasik, 2026