Add docs for OpenGL Geometric primitives

db4
Eduardo Cavazos 2008-03-15 15:07:53 -06:00
parent 7ae8324c38
commit d8e8fb253a
3 changed files with 29 additions and 2 deletions

View File

@ -0,0 +1,23 @@
USING: help.syntax help.markup ;
IN: opengl.gl
ARTICLE: "opengl-geometric-primitives" "OpenGL Geometric Primitives"
{ $table { { $link GL_POINTS } "individual points" }
{ { $link GL_LINES } "pairs of vertices interpreted as indivisual line segments" }
{ { $link GL_LINE_STRIP } "series of connected line segments" }
{ { $link GL_LINE_LOOP } "same as above, with a segment added between last and first vertices" }
{ { $link GL_TRIANGLES } "triples of vertices interpreted as triangles" }
{ { $link GL_TRIANGLE_STRIP } "linked strip of triangles" }
{ { $link GL_TRIANGLE_FAN } "linked fan of triangles" }
{ { $link GL_QUADS } "quadruples of vertices interpreted as four-sided polygons" }
{ { $link GL_QUAD_STRIP } "linked strip of quadrilaterals" }
{ { $link GL_POLYGON } "boundary of a simple, convex polygon" } }
;
HELP: glBegin
{ $values { "mode"
{ "One of the " { $link "opengl-geometric-primitives" } } } } ;

View File

@ -10,7 +10,11 @@ HELP: gl-error
{ $description "If the most recent OpenGL call resulted in an error, print the error to the " { $link stdio } " stream." } ;
HELP: do-state
{ $values { "what" integer } { "quot" quotation } }
{
$values
{ "mode" { "One of the " { $link "opengl-geometric-primitives" } } }
{ "quot" quotation }
}
{ $description "Wraps a quotation in " { $link glBegin } "/" { $link glEnd } " calls." } ;
HELP: do-enabled

View File

@ -25,7 +25,7 @@ IN: opengl
"GL error: " over gluErrorString append throw
] unless drop ;
: do-state ( what quot -- )
: do-state ( mode quot -- )
swap glBegin call glEnd ; inline
: do-enabled ( what quot -- )