summaryrefslogtreecommitdiff
path: root/manuals/chickadee/Framebuffers.html
diff options
context:
space:
mode:
Diffstat (limited to 'manuals/chickadee/Framebuffers.html')
-rw-r--r--manuals/chickadee/Framebuffers.html55
1 files changed, 49 insertions, 6 deletions
diff --git a/manuals/chickadee/Framebuffers.html b/manuals/chickadee/Framebuffers.html
index c57a82a..d7bedc4 100644
--- a/manuals/chickadee/Framebuffers.html
+++ b/manuals/chickadee/Framebuffers.html
@@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html.
The document was typeset with
http://www.texinfo.org/ (GNU Texinfo).
-->
-<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
-<title>The Chickadee Game Toolkit: Framebuffers</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Framebuffers (The Chickadee Game Toolkit)</title>
-<meta name="description" content="The Chickadee Game Toolkit: Framebuffers">
-<meta name="keywords" content="The Chickadee Game Toolkit: Framebuffers">
+<meta name="description" content="Framebuffers (The Chickadee Game Toolkit)">
+<meta name="keywords" content="Framebuffers (The Chickadee Game Toolkit)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Index.html#Index" rel="index" title="Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
@@ -94,7 +94,50 @@ Next: <a href="Viewports.html#Viewports" accesskey="n" rel="next">Viewports</a>,
</div>
<hr>
<a name="Framebuffers-1"></a>
-<h4 class="subsection">2.4.9 Framebuffers</h4>
+<h4 class="subsection">2.3.10 Framebuffers</h4>
+
+<p>A framebuffer is a chunk of memory that the GPU can render things
+onto. By default, the framebuffer that is used for rendering is the
+one belonging to the game window, but custom framebuffers can be used
+as well. A common use-case for custom framebuffers is applying
+post-processing effects: The entire scene is rendered to a
+framebuffer, and then the contents of that framebuffer are applied to
+a post-processing shader and rendered to the game window. The
+post-processing shader could do any number of things: scaling,
+antialiasing, motion blur, etc.
+</p>
+<dl>
+<dt><a name="index-make_002dframebuffer"></a>Procedure: <strong>make-framebuffer</strong> <em><var>width</var> <var>height</var> [#:min-filter 'linear] [#:mag-filter 'linear] [#:wrap-s 'repeat] [#:wrap-t 'repeat]</em></dt>
+<dd>
+<p>Create a new framebuffer that is <var>width</var> pixels wide and <var>height</var> pixels high.
+</p>
+<p><var>min-filter</var> and <var>mag-filter</var> determine the scaling algorithm
+applied to the framebuffer when rendering. By default, linear scaling
+is used in both cases. To perform no smoothing at all, use
+<code>nearest</code> for simple nearest neighbor scaling. This is typically
+the best choice for pixel art games.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-framebuffer_003f"></a>Procedure: <strong>framebuffer?</strong> <em><var>obj</var></em></dt>
+<dd><p>Return <code>#t</code> if <var>obj</var> is a framebuffer.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-framebuffer_002dtexture"></a>Procedure: <strong>framebuffer-texture</strong> <em><var>fb</var></em></dt>
+<dd><p>Return the texture backing the framebuffer <var>fb</var>.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-framebuffer_002dviewport"></a>Procedure: <strong>framebuffer-viewport</strong> <em><var>fb</var></em></dt>
+<dd><p>Return the default viewport (see <a href="Viewports.html#Viewports">Viewports</a>) used by the
+framebuffer <var>fb</var>.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-null_002dframebuffer"></a>Procedure: <strong>null-framebuffer</strong></dt>
+<dd><p>The default framebuffer.
+</p></dd></dl>