This file is indexed.

/usr/lib/perl5/SDL/OpenGL.pm is in libsdl-perl 2.2.5-1build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/usr/bin/env perl
#
# OpenGL.pm
#
# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
#
# ------------------------------------------------------------------------------
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
#
# ------------------------------------------------------------------------------
#
# Please feel free to send questions, suggestions or improvements to:
#
#	David J. Goehrig
#	dgoehrig@cpan.org
#

package SDL::OpenGL;

use strict;
use warnings;
use Carp;

require Exporter;
require DynaLoader;
use vars qw(
	@EXPORT
	@ISA
);
@ISA=qw(Exporter DynaLoader);

use SDL;

bootstrap SDL::OpenGL;
for ( keys %SDL::OpenGL:: ) {
	if (/^gl/) {
		push @EXPORT,$_;
	}
}

use SDL::OpenGL::Constants;

sub import {
	  my $self = shift;
	   
	    $self->export_to_level(1, @_);
      SDL::OpenGL::Constants->export_to_level(1);
      }



1;

__END__;

=pod



=head1 NAME

SDL::OpenGL - a perl extension

=head1 DESCRIPTION

L<SDL::OpenGL> is a perl module which when used by your application
exports the gl* and glu* functions into your application's primary namespace.
Most of the functions described in the OpenGL 1.3 specification are currently
supported in this fashion.  As the implementation of the OpenGL bindings that
comes with SDL_perl is largely type agnositic, there is no need to decline
the function names in the fashion that is done in the C API. For example,
glVertex3d is simply glVertex, and perl just does the right thing with regards
to types.

=head1 CAVEATS

The following methods work different in Perl than in C:

=over 2

=item glCallLists

        glCallLists(@array_of_numbers);

Unlike the C function, which get's passed a count, a type and a list of
numbers, the Perl equivalent only takes a list of numbers.

Note that this is slow, since it needs to allocate memory and construct a
list of numbers from the given scalars. For a faster version see
L<glCallListsString>.

=back

The following methods exist in addition to the normal OpenGL specification:

=over 2

=item glCallListsString

        glCallListsString($string);

Works like L<glCallLists()>, except that it needs only one parameter, a scalar
holding a string. The string is interpreted as a set of bytes, and each of
these will be passed to glCallLists as GL_BYTE. This is faster than
glCallLists, so you might want to pack your data like this:

        my $lists = pack("C", @array_of_numbers);

And later use it like this:

        glCallListsString($lists);

=back

=head1 AUTHOR

David J. Goehrig

=head1 SEE ALSO

L<perl> L<SDL::App>

=cut