[ create a new paste ] login | about

Link: http://codepad.org/lt7l2JdW    [ raw code | fork ]

Perl, pasted on Feb 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
has glut => sub {
    my $self = shift;
    my $system = $self->load_system('GLUT');
    $self->opengl->on(render => sub { $system->swap_buffers });
    return $system;
};

has opengl => sub {
    my $self = shift;
    my $system = $self->load_system('OpenGL');
    $self->glut->on(resize=> sub { shift; $system->resize(@_) });
    return $self;
};


Create a new paste based on this one


Comments: