update
[sdlgit/SDL-Site.git] / pages / SDL-GFX-Framerate.html-inc
index f1fabde..59730a1 100644 (file)
@@ -1,12 +1,81 @@
 <div class="pod">
 <!-- INDEX START -->
 <h3 id="TOP">Index</h3>
-<hr />
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#CATEGORY">CATEGORY</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#init">init</a></li>
+<li><a href="#set">set</a></li>
+<li><a href="#get">get</a></li>
+<li><a href="#delay">delay</a>
+</li>
+</ul>
+</li>
+</ul><hr />
 <!-- INDEX END -->
 
-<p>The Following are XS bindings to the SDL_gfx Library</p>
-<p>Described here:</p>
-<p>See: <a href="http://www.ferzkopp.net/joomla/content/view/19/14/">http://www.ferzkopp.net/joomla/content/view/19/14/</a></p>
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::GFX::Framerate - framerate calculating functions</p>
+
+</div>
+<h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="CATEGORY_CONTENT">
+<p>GFX</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>The framerate functions are used to insert delays into the graphics loop to maintain a constant framerate.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="init">init</h2>
+<div id="init_CONTENT">
+<pre> use SDL;
+ use SDL::GFX::Framerate;
+ use SDL::GFX::FPSManager;
+
+ my $fps = SDL::GFX::FPSManager-&gt;new(0, 0, 0, 0);
+
+ SDL::GFX::Framerate::init($fps);
+
+</pre>
+<p>Initialize the framerate manager, set default framerate of 30Hz and reset delay interpolation.</p>
+
+</div>
+<h2 id="set">set</h2>
+<div id="set_CONTENT">
+<pre> SDL::GFX::Framerate::set($fps, 60);
+
+</pre>
+<p>Sets the new desired framerate to 60 frames per second.</p>
+
+</div>
+<h2 id="get">get</h2>
+<div id="get_CONTENT">
+<pre> my $rate = SDL::GFX::Framerate::get($fps);
+
+</pre>
+<p>Get the currently set framerate of the manager.</p>
+
+</div>
+<h2 id="delay">delay</h2>
+<div id="delay_CONTENT">
+<pre> SDL::GFX::Framerate::delay($fps);
+
+</pre>
+<p>Generate a delay to accomodate currently set framerate. Call once in thegraphics/rendering loop. 
+If the computer cannot keep up with the rate (i.e.drawing too slow), the delay is zero and the delay interpolation is reset.</p>
+
+
+
 
 
+</div>
 </div>
\ No newline at end of file