OpenGL-List

 view release on metacpan or  search on metacpan

lib/OpenGL/List.pm  view on Meta::CPAN

      glEnd();
  };

The glpLine function is used to define a block of Perl OpenGL instructions that
should be immediately compiled into a display list.

Returns a new display list name that can be passed to glCallList() later.

=cut

sub glpList(&) {
	my $code = shift;
	my $id   = OpenGL::glGenLists(1);
	OpenGL::glNewList( $id, OpenGL::GL_COMPILE() );
	$code->();
	OpenGL::glEndList();
	return $id;
}

1;



( run in 1.264 second using v1.01-cache-2.11-cpan-49f99fa48dc )