| 1 | package SDL::Tutorial::3DWorld::OpenGL; | ||
| 2 | |||
| 3 | =pod | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | SDL::Tutorial::3DWorld::OpenGL - Utility package for initialising OpenGL | ||
| 8 | |||
| 9 | =head1 DESCRIPTION | ||
| 10 | |||
| 11 | The current implementation of L<OpenGL> does not implement modern proper | ||
| 12 | constants. Instead, the constants it provides only come into existance one | ||
| 13 | they have been exported. | ||
| 14 | |||
| 15 | Because of the number of exports involved, this can require a hundred K or so | ||
| 16 | per package you export to. Over a large application with dozens or hundreds of | ||
| 17 | classes, this can add up to megabytes or multiple megabytes of complexity and | ||
| 18 | wasted memory. | ||
| 19 | |||
| 20 | This package has no interface, but instead tickles the internals of the | ||
| 21 | L<OpenGL> module to allow the constants inside it to work without having to | ||
| 22 | import them (repeatedly) into your packages. | ||
| 23 | |||
| 24 | Admittedly, it actually does this by exporting the constants. But this only | ||
| 25 | needs to occur once instead of having to be done dozens of times. | ||
| 26 | |||
| 27 | There is a plan to alter the way that the OpenGL packages work to remove this | ||
| 28 | flaw and allow use without function exporting. Once these fixes have been made | ||
| 29 | this module will be removed. | ||
| 30 | |||
| 31 | =cut | ||
| 32 | |||
| 33 | use 5.008; | ||
| 34 | use strict; | ||
| 35 | use warnings; | ||
| 36 | use OpenGL ':all'; | ||
| 37 | |||
| 38 | our $VERSION = '0.33'; | ||
| 39 | |||
| 40 | 1; | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | =pod | ||
| 45 | |||
| 46 | =head1 SUPPORT | ||
| 47 | |||
| 48 | Bugs should be reported via the CPAN bug tracker at | ||
| 49 | |||
| 50 | L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SDL-Tutorial-3DWorld> | ||
| 51 | |||
| 52 | =head1 AUTHOR | ||
| 53 | |||
| 54 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||
| 55 | |||
| 56 | =head1 SEE ALSO | ||
| 57 | |||
| 58 | L<SDL>, L<OpenGL> | ||
| 59 | |||
| 60 | =head1 COPYRIGHT | ||
| 61 | |||
| 62 | Copyright 2010 Adam Kennedy. | ||
| 63 | |||
| 64 | This program is free software; you can redistribute | ||
| 65 | it and/or modify it under the same terms as Perl itself. | ||
| 66 | |||
| 67 | The full text of the license can be found in the | ||
| 68 | LICENSE file included with this module. | ||
| 69 | |||
| 70 | =cut |