2 USING: help io kernel math ;
5 { $values { "color" "a color specifier" } }
6 { $description "Wrapper for " { $link glColor4d } " taking a color specifier." } ;
9 { $description "If the most recent OpenGL call resulted in an error, print the error to the " { $link stdio } " stream." } ;
12 { $values { "what" integer } { "quot" quotation } }
13 { $description "Wraps a quotation in " { $link glBegin } "/" { $link glEnd } " calls." } ;
16 { $values { "what" integer } { "quot" quotation } }
17 { $description "Wraps a quotation in " { $link glEnable } "/" { $link glDisable } " calls." } ;
20 { $values { "mode" { $link GL_MODELVIEW } " or " { $link GL_PROJECTION } } { "quot" quotation } }
21 { $description "Saves and restores the matrix specified by " { $snippet "mode" } " before and after calling the quotation." } ;
24 { $values { "point" "a pair of integers" } }
25 { $description "Wrapper for " { $link glVertex2d } " taking a point object." } ;
28 { $values { "point" "a pair of integers" } }
29 { $description "Wrapper for " { $link glVertex2d } " taking a point object." } ;
32 { $values { "a" "a pair of integers" } { "b" "a pair of integers" } }
33 { $description "Draws a line between two points." } ;
36 { $values { "loc" "a pair of integers" } { "dim" "a pair of integers" } }
37 { $description "Draws a filled rectangle with top-left corner " { $snippet "loc" } " and dimensions " { $snippet "dim" } "." } ;
40 { $values { "loc" "a pair of integers" } { "dim" "a pair of integers" } }
41 { $description "Draws the outline of a rectangle with top-left corner " { $snippet "loc" } " and dimensions " { $snippet "dim" } "." } ;
44 { $values { "points" "a sequence of pairs of integers" } }
45 { $description "Draws a filled polygon." } ;
48 { $values { "points" "a sequence of pairs of integers" } }
49 { $description "Draws the outline of a polygon." } ;
52 { $values { "direction" "one of " { $snippet "{ 0 1 }" } " or " { $snippet "{ 1 0 }" } } { "colors" "a sequence of color specifiers" } { "dim" "a pair of integers" } }
53 { $description "Draws a rectangle with top-left corner " { $snippet "{ 0 0 }" } " and dimensions " { $snippet "dim" } ", filled wit ha smoothly shaded transition between the colors in " { $snippet "colors" } "." } ;
56 { $values { "id" integer } }
57 { $description "Wrapper for " { $link glGenTextures } " to handle the common case of generating a single texture ID." } ;
60 { $values { "bits" integer } { "quot" quotation } }
61 { $description "Wraps a quotation in " { $link glPushAttrib } "/" { $link glPopAttrib } " calls." } ;
64 { $class-description "A sprite is an OpenGL texture together with a display list which renders a textured quad. Sprites are used to draw text in the UI. Sprites have the following slots:"
66 { { $link sprite-dlist } " - an OpenGL display list ID" }
67 { { $link sprite-texture } " - an OpenGL texture ID" }
68 { { $link sprite-loc } " - top-left corner of the sprite" }
69 { { $link sprite-dim } " - dimensions of the sprite" }
70 { { $link sprite-dim2 } " - dimensions of the sprite, rounded up to the nearest powers of two" }
75 { $values { "sprite" sprite } { "pixmap" "an alien or byte array" } { "id" "an OpenGL texture ID" } }
76 { $description "Creates a new OpenGL texture from a 1 byte per pixel image whose dimensions are equal to " { $link sprite-dim2 } "." } ;
79 { $values { "id" integer } }
80 { $description "Wrapper for " { $link glGenLists } " to handle the common case of generating a single display list ID." } ;
83 { $values { "type" "one of " { $link GL_COMPILE } " or " { $link GL_COMPILE_AND_EXECUTE } } { "quot" quotation } { "id" "an OpenGL texture ID" } }
84 { $description "Compiles the results of calling the quotation into a new OpenGL display list." } ;
87 { $values { "loc" "a pair of integers" } }
88 { $description "Wrapper for " { $link glTranslated } " taking a point object." } ;
91 { $values { "sprites" "a sequence of " { $link sprite } " instances" } }
92 { $description "Deallocates native resources associated toa sequence of sprites." } ;
94 HELP: with-translation
95 { $values { "loc" "a pair of integers" } { "quot" quotation } }
96 { $description "Calls the quotation with a translation by " { $snippet "loc" } " pixels applied to the current " { $link GL_MODELVIEW } " matrix, restoring the matrix when the quotation is done." } ;