File: try

package info (click to toggle)
libopengl-perl 0.62%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,700 kB
  • ctags: 1,405
  • sloc: perl: 9,527; ansic: 6,001; makefile: 95; sh: 48
file content (22 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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 $@;
}