diff options
Diffstat (limited to 'doc/api.texi')
-rw-r--r-- | doc/api.texi | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/api.texi b/doc/api.texi index 84bcaed..a227cdc 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -1530,7 +1530,7 @@ will@dots{} Okay, okay. We all know what colors are. Chickadee provides a data type to represent color and some convenient procedures to work with -them in the @code{(chickadee render color)} module. Colors are made +them in the @code{(chickadee graphics color)} module. Colors are made up of four components, or channels: red, green, blue, and alpha (transparency.) Each of these values is expressed as a uniform floating point value in the range [0, 1]. 0 means that color channel @@ -1756,7 +1756,7 @@ Tango color palette}. @subsection Textures Textures are essentially images: a 2D grid of color values. The -@code{(chickadee render texture)} module provides an interface for +@code{(chickadee graphics texture)} module provides an interface for working with texture objects. @deffn {Procedure} load-image file [#:min-filter nearest] @ @@ -1868,7 +1868,7 @@ bitmap that is rendered to the screen. For 2D games, sprites are the most essential graphical abstraction. They are used for drawing maps, players, NPCs, items, particles, text, etc. -In Chickadee, the @code{(chickadee render sprite)} module provides the +In Chickadee, the @code{(chickadee graphics sprite)} module provides the interface for working with sprites. Bitmaps are stored in textures (@pxref{Textures}) and can be used to draw sprites via the @code{draw-sprite} procedure. @@ -2001,7 +2001,7 @@ A tile map is a scene created by composing lots of small sprites, called ``tiles'', into a larger image. One program for editing such maps is called @url{http://mapeditor.org,Tiled}. Chickadee has native support for loading and rendering Tiled maps in the @code{(chickadee -render tiled)} module. +graphics tiled)} module. @deffn {Procedure} load-tile-map file-name Load the Tiled formatted map in @var{file-name} and return a new tile @@ -2212,7 +2212,7 @@ Return the list of points that form @var{polygon}. @subsection Lines and Shapes Sprites are fun, but sometimes simple, untextured lines and polygons -are desired. That's where the @code{(chickadee render shapes)} module +are desired. That's where the @code{(chickadee graphics shapes)} module comes in! @deffn {Procedure} draw-line start end @ @@ -2280,7 +2280,7 @@ bitmap fonts. A default font named Inconsolata is used for all text rendering operations where a font is not specified, as is the case in the above example. -The following procedures can be found in the @code{(chickadee render +The following procedures can be found in the @code{(chickadee graphics font)} module: @deffn {Procedure} load-font file-name point-size [#:char-set] @@ -2349,14 +2349,14 @@ all of these effects, and more, can be accomplished by turning a few configuration knobs in a ``particle system''. A particle system takes care of managing the many miniscule moving morsels so the developer can quickly produce an effect and move on with their life. The -@code{(chickadee render particles)} module provides an API for +@code{(chickadee graphics particles)} module provides an API for manipulating particle systems. Below is an example of a very simple particle system that utilizes nearly all of the default configuration settings: @example -(use-modules (chickadee render particles)) +(use-modules (chickadee graphics particles)) (define texture (load-image "particle.png")) (define particles (make-particles 2000 #:texture texture)) @end example @@ -2504,7 +2504,7 @@ Here's some basic boilerplate to render a 3D model: (use-modules (chickadee) (chickadee math) (chickadee math matrix) - (chickadee render model)) + (chickadee graphics model)) (define model #f) (define projection-matrix @@ -2642,7 +2642,7 @@ render to two different viewports, each occupying a different half of the screen. For information about how to set the current viewport, see @code{with-viewport} in @ref{Rendering Engine}. -The @code{(chickadee render viewport)} module provides the following +The @code{(chickadee graphics viewport)} module provides the following API: @deffn {Procedure} make-viewport x y width height @ @@ -2704,7 +2704,7 @@ would be tedious to have to have to specify them each time @code{gpu-apply} is called. The following procedures and syntax can be found in the -@code{(chickadee render)} module. +@code{(chickadee graphics)} module. @deffn {Syntax} gpu-apply shader vertex-array @ [#:uniform-key uniform-value @dots{}] @@ -2795,7 +2795,7 @@ Alright, let's brush aside all of those pretty high level abstractions and discuss what is going on under the hood. The GPU exists as a discrete piece of hardware separate from the CPU. In order to make it draw things, we must ship lots of data out of our memory space and -into the GPU. The @code{(chickadee render buffer}) module provides an +into the GPU. The @code{(chickadee graphics buffer}) module provides an API for manipulating GPU buffers. In OpenGL terminology, a chunk of data allocated on the GPU is a @@ -2804,7 +2804,7 @@ that could be transformed into a GPU buffer that packs together vertex position and texture coordinates: @example -(use-modules (chickadee render buffer) (srfi srfi-4)) +(use-modules (chickadee graphics buffer) (srfi srfi-4)) (define data (f32vector -8.0 -8.0 ; 2D vertex 0.0 0.0 ; 2D texture coordinate @@ -3139,7 +3139,7 @@ Return the primitive rendering mode for @var{vertex-array}. Shaders are programs that the GPU can evaluate that allow the programmer to completely customized the final output of a GPU draw -call. The @code{(chickadee render shader)} module provides an API for +call. The @code{(chickadee graphics shader)} module provides an API for building custom shaders. Shaders are written in the OpenGL Shading Language, or GLSL for short. |