Commit | Line | Data |
9b6fa14c |
1 | <div class="pod"> |
2 | <!-- INDEX START --> |
3 | <h3 id="TOP">Index</h3> |
4 | |
5 | <ul><li><a href="#NAME">NAME</a></li> |
6 | <li><a href="#DESCRIPTION">DESCRIPTION</a></li> |
7 | <li><a href="#CAVEATS">CAVEATS</a></li> |
8 | <li><a href="#AUTHOR">AUTHOR</a></li> |
9 | <li><a href="#SEE_ALSO">SEE ALSO</a> |
10 | </li> |
11 | </ul><hr /> |
12 | <!-- INDEX END --> |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p> |
22 | <div id="NAME_CONTENT"> |
23 | <p>SDL::OpenGL - a perl extension</p> |
24 | |
25 | </div> |
26 | <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p> |
27 | <div id="DESCRIPTION_CONTENT"> |
28 | <p><cite>SDL::OpenGL</cite> is a perl module which when used by your application |
29 | exports the gl* and glu* functions into your application's primary namespace. |
30 | Most of the functions described in the OpenGL 1.3 specification are currently |
31 | supported in this fashion. As the implementation of the OpenGL bindings that |
32 | comes with SDL_perl is largely type agnositic, there is no need to decline |
33 | the function names in the fashion that is done in the C API. For example, |
34 | glVertex3d is simply glVertex, and perl just does the right thing with regards |
35 | to types.</p> |
36 | |
37 | </div> |
38 | <h1 id="CAVEATS">CAVEATS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
39 | <div id="CAVEATS_CONTENT"> |
40 | <p>The following methods work different in Perl than in C:</p> |
41 | <dl> |
42 | <dt>glCallLists</dt> |
43 | <dd> |
44 | <pre> glCallLists(@array_of_numbers); |
45 | |
46 | </pre> |
47 | <p>Unlike the C function, which get's passed a count, a type and a list of |
48 | numbers, the Perl equivalent only takes a list of numbers.</p> |
49 | <p>Note that this is slow, since it needs to allocate memory and construct a |
50 | list of numbers from the given scalars. For a faster version see |
51 | <cite>glCallListsString</cite>.</p> |
52 | </dd> |
53 | </dl> |
54 | <p>The following methods exist in addition to the normal OpenGL specification:</p> |
55 | <dl> |
56 | <dt>glCallListsString</dt> |
57 | <dd> |
58 | <pre> glCallListsString($string); |
59 | |
60 | </pre> |
61 | <p>Works like <cite>glCallLists</cite>(), except that it needs only one parameter, a scalar |
62 | holding a string. The string is interpreted as a set of bytes, and each of |
63 | these will be passed to glCallLists as GL_BYTE. This is faster than |
64 | glCallLists, so you might want to pack your data like this:</p> |
65 | <pre> my $lists = pack("C", @array_of_numbers); |
66 | |
67 | </pre> |
68 | <p>And later use it like this:</p> |
69 | <pre> glCallListsString($lists); |
70 | |
71 | </pre> |
72 | </dd> |
73 | </dl> |
74 | |
75 | </div> |
76 | <h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p> |
77 | <div id="AUTHOR_CONTENT"> |
78 | <p>David J. Goehrig</p> |
79 | |
80 | </div> |
81 | <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p> |
82 | <div id="SEE_ALSO_CONTENT"> |
83 | <p><cite>perl</cite> <cite>SDL::App</cite></p> |
84 | |
85 | </div> |
86 | </div> |