File: try.pl

package info (click to toggle)
libopengl-perl 0.7004%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,088 kB
  • sloc: perl: 9,701; ansic: 8,090; makefile: 110
file content (16 lines) | stat: -rw-r--r-- 354 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# simple example that opens up a window then goes into interpreter mode

use OpenGL;

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

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