12 my $app = new SDL::App -w => 800, -h => 600, -d => 16, -gl => 1;
14 my @points = ( [-4.0, -4.0, 0.0 ],
19 my $ctrlpoints = pack "d12", map { @$_ } @points;
23 glViewport(0,0,800,600);
24 glMatrixMode(GL_PROJECTION());
27 glFrustum (-0.1,0.1,-0.075,0.075,0.3,100.0 );
29 glMatrixMode(GL_MODELVIEW());
34 glClearColor(0.0, 0.0, 0.0, 0.0);
35 glShadeModel(GL_FLAT());
36 glMap1(GL_MAP1_VERTEX_3(), 0.0, 1.0, 3, 4, $ctrlpoints);
37 glEnable(GL_MAP1_VERTEX_3());
41 glClear(GL_COLOR_BUFFER_BIT);
43 glBegin(GL_LINE_STRIP);
44 for my $i ( 0 .. 30 ) {
52 for my $i ( 0 .. 3 ) {
53 glVertex( @{$points[$i]} );
62 $app->loop({ SDL_QUIT() => sub { exit(); } });