Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 24 lines (17 sloc) 0.572 kb
44132c2 Initial commit of PGOPOGL module to git
Chris Marshall authored
1 use OpenGL qw(:all);
2
3 glutInit();
4
5 glutInitWindowPosition(10, 10);
6 glutInitWindowSize(200, 200);
7 glutInitDisplayMode(16);
8
9 $win = glutCreateWindow("test2");
10 glutSetWindow($win);
11
12 glutDisplayFunc(sub { print "Display!\n";
13 glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) } );
14 glutReshapeFunc(sub { print "Reshape!\n";
15 my ($width, $height) = @_;
16 glViewport(0, 0, $width, $height); } );
17 #glutIdleFunc(sub { print "Idle!\n" } );
18
19 glutCreateMenu(sub { print "Got menu ",@_,"\n" } );
20 glutAddMenuEntry("Hello", 1);
21 glutAttachMenu(0);
22
23 glutMainLoop();
Something went wrong with that request. Please try again.