Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: SDL_interface
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (17 sloc) 0.572 kB
use OpenGL qw(:all);
glutInit();
glutInitWindowPosition(10, 10);
glutInitWindowSize(200, 200);
glutInitDisplayMode(16);
$win = glutCreateWindow("test2");
glutSetWindow($win);
glutDisplayFunc(sub { print "Display!\n";
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) } );
glutReshapeFunc(sub { print "Reshape!\n";
my ($width, $height) = @_;
glViewport(0, 0, $width, $height); } );
#glutIdleFunc(sub { print "Idle!\n" } );
glutCreateMenu(sub { print "Got menu ",@_,"\n" } );
glutAddMenuEntry("Hello", 1);
glutAttachMenu(0);
glutMainLoop();
Jump to Line
Something went wrong with that request. Please try again.