This script extracts the function signatures from glew-2.0.0/include/GL/glew.h and creates XS stubs for each.
This should also autogenerate stub documentation by adding links to the OpenGL documentation for each function via
https://www.opengl.org/sdk/docs/man/html/glShaderSource.xhtml
Also, it should parse the feature groups of OpenGL and generate a data structure that shows which features are associated with which functions.
We should think about how to ideally enable the typemap to automatically perlify the API. Or just handwrite it for the _p functions?!
We should move the function existence check into the AUTOLOAD part so the check is made only once instead of on every call. Microoptimization, I know.
To install OpenGL::Modern, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenGL::Modern
CPAN shell
perl -MCPAN -e shell install OpenGL::Modern
For more information on module installation, please visit the detailed CPAN module installation guide.