windows does't know shebang.
[sdlgit/SDL_perl.git] / lib / pods / SDL / OpenGL.pod
1 =pod
2
3
4
5 =head1 NAME
6
7 SDL::OpenGL - a perl extension
8
9 =head1 DESCRIPTION
10
11 L<SDL::OpenGL> is a perl module which when used by your application
12 exports the gl* and glu* functions into your application's primary namespace.
13 Most of the functions described in the OpenGL 1.3 specification are currently
14 supported in this fashion.  As the implementation of the OpenGL bindings that
15 comes with SDL_perl is largely type agnositic, there is no need to decline
16 the function names in the fashion that is done in the C API. For example,
17 glVertex3d is simply glVertex, and perl just does the right thing with regards
18 to types.
19
20 =head1 CAVEATS
21
22 The following methods work different in Perl than in C:
23
24 =over 2
25
26 =item glCallLists
27
28         glCallLists(@array_of_numbers);
29
30 Unlike the C function, which get's passed a count, a type and a list of
31 numbers, the Perl equivalent only takes a list of numbers.
32
33 Note that this is slow, since it needs to allocate memory and construct a
34 list of numbers from the given scalars. For a faster version see
35 L<glCallListsString>.
36
37 =back
38
39 The following methods exist in addition to the normal OpenGL specification:
40
41 =over 2
42
43 =item glCallListsString
44
45         glCallListsString($string);
46
47 Works like L<glCallLists()>, except that it needs only one parameter, a scalar
48 holding a string. The string is interpreted as a set of bytes, and each of
49 these will be passed to glCallLists as GL_BYTE. This is faster than
50 glCallLists, so you might want to pack your data like this:
51
52         my $lists = pack("C", @array_of_numbers);
53
54 And later use it like this:
55
56         glCallListsString($lists);
57
58 =back
59
60 =head1 AUTHOR
61
62 David J. Goehrig
63
64 =head1 SEE ALSO
65
66 L<perl> L<SDL::App>
67
68 =cut