[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.3 Drawing functions

Macro: gl-begin* mode gl-commands …

Executes gl-commands between (gl-begin mode) and (gl-end). Mode can be one of the following constants.

GL_POINTS

Individual points.

GL_LINES

Pairs of vertices interpreted as individual line segments.

GL_LINE_STRIP

Series of connected line segments.

GL_LINE_LOOP

Same as above, with a segment added between last and first vertices.

GL_TRIANGLES

Triples of vertices interpreted as triangles.

GL_TRIANGLE_STRIP

Linked trip of triangles.

GL_TRIANGLE_FAN

Linked fan of triangles.

GL_QUADS

Quadruples of vertices interpreted as four-sided polygons.

GL_QUAD_STRIP

Linked strip of quadrilaterals.

GL_POLYGON

Boundary of a simple, convex polygon.

Function: gl-begin mode
Function: gl-end

Corresponds to glBegin and glEnd. Use of gl-begin* macro is recommended, though.

Function: gl-flush

Flush the GL command buffer.

Function: gl-finish

Make sure all previously issued GL commands are completed.

Function: gl-rect point1 point2
Function: gl-rect x1 y1 x2 y2

Draws a rectangle. In the first form, point1 and point2 can be either <point4f>, or f32, f64, s32, or s16vector of length 2. Types of both args should match. In the second form, all args should be a real numbers (glRectd is used).

Function: gl-vertex point
Function: gl-vertex x y &optional z w

Specify vertices. In the first form, point can be either <point4f>, or f32, f64, s32 or s16vector of length 2, 3 or 4. In the second form, all args should be a real numbers.

Function: gl-normal vector
Function: gl-normal x y z

Sets vertex normal vector. In the first form, vector can be either <vector4f> (the fourth element is ignored), or f32, f64, s32 ro s16vector of length 3. In the second form, all args should be a real numbers.

Function: gl-color color
Function: gl-color r g b &optional a

Sets the current color. In the first form, color can be either f32, f64, u8, u16, u32, s8, s16, or s32vector of length 3 or 4. In the second form, all args should be a real numbers.

Function: gl-tex-coord coord
Function: gl-tex-coord u v &optional s t

Sets the current texture coordinates. In the first form, coord can be either f32, f64, s32 or s16vector of length 1, 2, 3, or 4. In the second form, all args should be a real numbers.

Function: gl-raster-pos pos
Function: gl-raster-pos x y &optional z w

Sets the current raster position. In the first form, pos can be eitehr f32, f64, s32 or s16vector. In the second form, all args should be a real numbers.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Shiro Kawai on June, 7 2008 using texi2html 1.78.