Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 03f933ea541abb1d8d43e5d01295402e > files > 44

perl-OpenGL-0.700.0-5.mga7.armv7hl.rpm

#!/usr/local/bin/perl
#
# simple example that opens up a window then goes into interpretor mode
#

BEGIN{ unshift(@INC,"../blib"); }  # in case OpenGL is built but not installed
BEGIN{ unshift(@INC,"../blib/arch"); } # 5.002 gamma needs this
BEGIN{ unshift(@INC,"../blib/lib"); } # 5.002 gamma needs this
use OpenGL;

glpOpenWindow;
glClearColor(0,0,1,1);
glClear(GL_COLOR_BUFFER_BIT);
glpFlush();

print "OpenGL window open, perl interpretor ready!\n";
print "Try entering some GL commands to draw stuff:\n";
while(<STDIN>){
	$e=eval;
	print "EVAL:  $e\n";
	print "ERROR: $@" if $@;
}