|
| 1 | + This module is a testing and integration version of POGL only. |
| 2 | + See POGL for the official release. This interface will likely |
| 3 | + change radically before the full POGL functionality is |
| 4 | + integrated with PDL. Thanks! |
| 5 | + |
| 6 | + Visit the Perl OpenGL (POGL) Developer's Site for more information: |
| 7 | + http://graphcomp.com/opengl |
| 8 | + |
| 9 | + To install the OpenGL module, please follow these instructions: |
| 10 | + |
| 11 | + 1. Update your development environment with the latest OpenGL header |
| 12 | + and lib files. If you are using a GPU, get the latest drivers |
| 13 | + from your vendor. |
| 14 | + |
| 15 | + Install FreeGLUT (or compatible) - you can find this at |
| 16 | + http://freeglut.sourceforge.net/. |
| 17 | + |
| 18 | + On Windows, FreeGLUT is installed automatically by this module if |
| 19 | + needed. On Mac OS X (Leopard and newer), GLUT is built in. On |
| 20 | + Linux distributions FreeGLUT is available via their package |
| 21 | + installers. |
| 22 | + |
| 23 | + The 'include' subfolder provided with this module contains headers |
| 24 | + that this module has been tested with. |
| 25 | + |
| 26 | + This module looks for libGL.so, libGLU.so and libglut.so |
| 27 | + (opengl32.dll, glu32.dll and freeglut.dll on Windows) in the normal |
| 28 | + places for your OS installation; you may need to symlink libraries |
| 29 | + from various vendors to the proper place/names. |
| 30 | + |
| 31 | + Note: it is strongly recommended, but not required, that you |
| 32 | + install PerlMagick (6.3.5 or newer) first, as this will |
| 33 | + dramatically simplify and enhance your ability/performance in |
| 34 | + loading/saving images/textures via OpenGL::Image - see INSTALL |
| 35 | + note in the OpenGL::Image module. |
| 36 | + |
| 37 | + |
| 38 | + 2. Run 'perl Makefile.PL' |
| 39 | + |
| 40 | + Makefile.PL attempts to detemine your OS and available libs. |
| 41 | + You can override these defaults by specifying: |
| 42 | + |
| 43 | + perl Makefile.PL interface=XFACE [verbose] |
| 44 | + |
| 45 | + where XFACE is one of the following constants: |
| 46 | + |
| 47 | + FREEGLUT Default window interface |
| 48 | + GLUT Fallback if FreeGLUT is not available |
| 49 | + GLX Unix X11 |
| 50 | + W32API Windows via CYGWIN |
| 51 | + AGL Mac OS X |
| 52 | + |
| 53 | + Makefile.PL will attempt to build and run a glversion utility to |
| 54 | + determine what version and extensions your OpenGL installation |
| 55 | + supports, and will create an gl_exclude.h header file to exclude |
| 56 | + APIs your libraries do not support. You can manually edit this |
| 57 | + file to override excluded extensions. |
| 58 | + |
| 59 | + The "verbose" option provides additional info for troubleshooting. |
| 60 | + |
| 61 | + Note: glversion assumes libGL.so and libglut.so |
| 62 | + (opengl32.dll and freeglut.dll on Windows) - and that it will |
| 63 | + be run via a GUI window (eg. X11 on Unix). This will impact |
| 64 | + automated build systems. |
| 65 | + |
| 66 | + |
| 67 | + For building POGL without extension exclusions, use: |
| 68 | + |
| 69 | + perl Makefile.PL dist=NO_EXCLUSIONS |
| 70 | + |
| 71 | + Note: NO_EXCLUSIONS is the default for Windows; this can be |
| 72 | + overridden by using the EXCLUSIONS option. |
| 73 | + |
| 74 | + |
| 75 | + To install in non-standard locations, use the PREFIX and LIB options |
| 76 | + when generating the Makefiles: |
| 77 | + |
| 78 | + perl Makefile.PL prefix=/PREFIXPATH [LIB=/PREFIXPATH/perl/lib] |
| 79 | + |
| 80 | + where PREFIXPATH is the path of the directory where you wish |
| 81 | + the module to be installed (e.g. binary executables in /PREFIXPATH/bin, |
| 82 | + manual pages in /PREFIXPATH/man, library files in /PREFIXPATH/lib...). |
| 83 | + The LIB option allows you to control where the perl module stuff goes |
| 84 | + rather than the default /PREFIXPATH/lib/perl5). |
| 85 | + |
| 86 | + Then either set the PERL5LIB environment variable before you run |
| 87 | + scripts that use the modules/libraries (see perlrun) or in your |
| 88 | + programs say: |
| 89 | + |
| 90 | + use lib '/PREFIXPATH/perl/lib'; |
| 91 | + |
| 92 | + |
| 93 | + 3. Run 'make' ('nmake' on Windows) to build OpenGL.pm. |
| 94 | + |
| 95 | + |
| 96 | + 4. Run 'make test' ('nmake test' on Windows) to test your |
| 97 | + installation. You must have GLUT installed in order to run |
| 98 | + this test. You should see a spinning cube with textured surfaces. |
| 99 | + Press 'q' to quit/complete the test (the test window must have focus). |
| 100 | + |
| 101 | + Note: Automated builds will normally fail this test, as it requires |
| 102 | + the ability to open a GL context (window) and provide user input. |
| 103 | + |
| 104 | + |
| 105 | + 5. If all is well, run 'sudo make install' ('nmake install on Windows') |
| 106 | + to intall the OpenGL module onto your system. |
| 107 | + |
| 108 | + |
| 109 | + 6. It is recommended (not required) that you also install the OpenGL::Image |
| 110 | + and OpenGL::Shader modules to enhance POGL's features. |
| 111 | + |
| 112 | + |
| 113 | +Read the included README files for additional notes on your particular |
| 114 | +platform. |
| 115 | + |
| 116 | + |
| 117 | +If you get an error about __eprintf missing, add |
| 118 | + |
| 119 | + -L/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.7/2.96/ -lgcc |
| 120 | + |
| 121 | +to the @LIBS initializer in Makefile.PL (change the directory for the |
| 122 | +appropriate one for your system). |
0 commit comments