Acme-MITHALDU-BleedingOpenGL
view release on metacpan or search on metacpan
On Mac OS X (Leopard and newer), GLUT is available in the default
OpenGL programming environment with sufficient extensions (added
by Apple) to support full functionality.
On most Linux distributions FreeGLUT is available via their
package installers.
The 'include' subfolder provided with this module contains
headers that this module has been tested with.
This module looks for libGL.so, libGLU.so and libglut.so
(opengl32.dll, glu32.dll and freeglut.dll on Windows) in the normal
places for your OS installation. You may need to symlink libraries
from various vendors to the proper place/names.
Note: If you will be installing OpenGL::Image, it is recommended,
but not required, that you install PerlMagick (6.3.5 or newer) first,
as this will dramatically simplify and enhance your ability/performance
in loading/saving images/textures via OpenGL::Image - see INSTALL note
in the OpenGL::Image module.
Makefile.PL view on Meta::CPAN
close(GLDATA);
foreach my $line (@gldata)
{
$line =~ s|[\r\n]+||;
my($key,$val) = split('=',$line);
$gldata->{$key} = $val;
}
die "get_extensions: no extensions found in $glv_file\n" if !keys %$gldata;
print "This looks like OpenGL Version: $gldata->{VERSION}\n";
# Parse glext_procs.h file
open GLEXT, "glext_procs.h" or die "get_extensions: could not open glext_procs.h: $!\n";
my @lines = <GLEXT>;
close(GLEXT);
my $no_ext = {};
foreach my $line (@lines)
{
next if ($line !~ m|\#ifndef NO_([^\s]+)|);
lex_stuff_pvn||5.011002|
lex_stuff_pvs||5.013005|
lex_stuff_pv||5.013006|
lex_stuff_sv||5.011002|
lex_unstuff||5.011002|
listkids|||
list|||
load_module_nocontext|||vn
load_module|5.006000||pv
localize|||
looks_like_bool|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHs|5.010001||p
mPUSHu|5.009002||p
mXPUSHi|5.009002||p
mXPUSHn|5.009002||p
mXPUSHp|5.009002||p
mXPUSHs|5.010001||p
# We need to change the projection matrix for the text rendering.
glMatrixMode(GL_PROJECTION);
# But we like our current view too; so we save it here.
glPushMatrix();
# Now we set up a new projection for the text.
glLoadIdentity();
glOrtho(0,$Window_Width,0,$Window_Height,-1.0,1.0);
# Lit or textured text looks awful.
glDisable(GL_TEXTURE_2D);
glDisable(GL_LIGHTING);
# We don'$t want depth-testing either.
glDisable(GL_DEPTH_TEST);
# But, for fun, let's make the text partially transparent too.
glColor4f(0.6,1.0,0.6,.75);
$buf = sprintf "TIME TO EXIT: %.1fs", $time_to_exit;
( run in 1.459 second using v1.01-cache-2.11-cpan-39bf76dae61 )