Add docs for OpenGL Geometric primitives
parent
7ae8324c38
commit
d8e8fb253a
|
@ -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" } } } } ;
|
|
@ -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
|
||||
|
|
|
@ -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 -- )
|
||||
|
|
Loading…
Reference in New Issue