| 1 | package OpenGL::Earth; | ||
| 2 | |||
| 3 | $VERSION = '0.05'; | ||
| 4 | |||
| 5 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 0 | ▶ | use OpenGL; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 8 | |||
| 9 | # Some global variables | ||
| 10 | |||
| 11 | # Window and texture IDs, window width and height. | ||
| 12 | our $WINDOW_ID; | ||
| 13 | |||
| 14 | our $WINDOW_WIDTH = 600; | ||
| 15 | our $WINDOW_HEIGHT = 600; | ||
| 16 | our @TEXTURES; | ||
| 17 | our $WII; | ||
| 18 | |||
| 19 | # Our display mode settings. | ||
| 20 | our $LIGHT_ON = 1; | ||
| 21 | our $BLEND_ON = 0; | ||
| 22 | our $TEXTURE_ON = 1; | ||
| 23 | our $FILTERING_ON = 1; | ||
| 24 | our $ALPHA_ADD = 0; | ||
| 25 | |||
| 26 | our $TEXTURE_MODE = GL_MODULATE; | ||
| 27 | |||
| 28 | our @texture_mode = (GL_DECAL, GL_MODULATE, GL_BLEND, GL_REPLACE); | ||
| 29 | our @texture_mode_str = qw(GL_DECAL GL_MODULATE GL_BLEND GL_REPLACE); | ||
| 30 | |||
| 31 | 1; | ||
| 32 | |||
| 33 | =pod | ||
| 34 | |||
| 35 | =head1 NAME | ||
| 36 | |||
| 37 | OpenGL::Earth | ||
| 38 | |||
| 39 | =head1 SYNOPSIS | ||
| 40 | |||
| 41 | Mmh... I don't think you can use this module directly. | ||
| 42 | Better look at the C<bin> folder. | ||
| 43 | |||
| 44 | =head1 DESCRIPTION | ||
| 45 | |||
| 46 | It's an attempt to write an OpenGL Perl program that can display | ||
| 47 | a fancy rotating planet, while also displaying useful | ||
| 48 | geographic information on it. | ||
| 49 | |||
| 50 | The development is in a really really early stage now (Jan 2009). | ||
| 51 | Don't expect miracles. | ||
| 52 | |||
| 53 | It's basically a 10-years old OpenGL C program, translated | ||
| 54 | to Perl like 8 years ago, and then butchered and reassembled | ||
| 55 | by yours truly during some nightly hacking sessions. | ||
| 56 | |||
| 57 | The Earth texture that comes with this distribution is a stripped | ||
| 58 | down version (1024x512) of the original hi-res (4096x2048) I | ||
| 59 | downloaded from Celestia Motherlode, if I remember correctly. | ||
| 60 | |||
| 61 | If you want to use the higher resolution texture, either find | ||
| 62 | it yourself, or write me, or generate one by yourself with the | ||
| 63 | C<bin/build_texture.pl> utility I wrote. | ||
| 64 | You will need the mighty C<Imager> module for that. | ||
| 65 | |||
| 66 | =head1 AUTHORS | ||
| 67 | |||
| 68 | Cosimo Streppone, <cosimo@cpan.org> | ||
| 69 | |||
| 70 | =head1 COPYRIGHT | ||
| 71 | |||
| 72 | This code comes with the same terms as Perl itself. | ||
| 73 | |||
| 74 | =cut | ||
| 75 | |||