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

4.5 GL states for drawing

Function: gl-point-size size

Sets the width in pixels for rendered points. The possible range of size on the running GL implementation can be obtained by passing either GL_ALIASED_POINT_SIZE_RANGE or GL_SMOOTH_POINT_SIZE_RANGE to gl-get-float.

Function: gl-line-width width

Sets the width in pixels for rendered lines. The possible range of width on the running GL implementation can be obtained by passing either GL_ALIASED_LINE_WIDTH_RANGE or GL_SMOOTH_LINE_WIDTH_RANGE to gl-get-float.

Function: gl-line-stipple factor pat

Sets the current stippling pattern for lines. pat must be an exact integer, and its lower 16 bits are used to specify the stipple pattern. Factor is an integer factor to specify how many pixels corresponds to one bit in pat.

You have to enable GL_LINE_STIPPLE to use face culling.

Function: gl-polygon-mode face mode

Specifies the drawing mode for a polygon's front and back faces. Face can be one of the followings:

GL_FRONT_AND_BACK
GL_FRONT
GL_BACK

Mode can be one of the followings:

GL_POINT
GL_LINE
GL_FILL
Function: gl-front-face mode

Controls how OpenGL determine front face of a polygon Mode can be one of the followings:

GL_CCW

Front face is where ordered vertices appear in a counterclockwise orientation (default).

GL_CW

Front face is where ordered vertices appear in a clockwise orientation.

Function: gl-cull-face mode

Indicates which face of polygons should be culled. Mode can be one of the followings:

GL_FRONT
GL_BACK
GL_FRONT_AND_BACK

You have to enable GL_CULL_FACE to use face culling.

Function: gl-polygon-stipple mask

Defines the current stipple pattern for filled polygons. Mask has to be a u8vector of length 128, specifying a 32x32 bitmap pattern. You have to enable GL_POLYGON_STIPPLE to use this feature.

Function: gl-edge-flag flag

Sets the edge flag(s) of vertices. When flag is a GL boolean vector, glEdgeFlagv is called. Otherwise flag is used as a single boolean value for glEdgeFlag.

Function: gl-blend-func sfactor dfactor

Controls how color values in the fragment being processed (the source) are combined with the ones in the framebuffer (the destination).

Possible values for the sfactor and dfactor arguments are as follows.

GL_ZERO
GL_ONE
GL_DST_COLOR
GL_SRC_COLOR
GL_ONE_MINUS_DST_COLOR
GL_ONE_MINUS_SRC_COLOR
GL_SRC_ALPHA
GL_ONE_MINUS_SRC_ALPHA
GL_DST_ALPHA
GL_ONE_MINUS_DST_ALPHA
GL_SRC_ALPHA_SATURATE
GL_CONSTANT_COLOR
GL_ONE_MINUS_CONSTANT_COLOR
GL_CONSTANT_ALPHA
GL_ONE_MINUS_CONSTANT_ALPHA
Function: gl-blend-equation mode

[GL_ARB_imaging] By default, the source and destination colors are added after processed as specified by gl-blend-func. With this extension API you can change the function. Mode can be one of the following values:

GL_FUNC_ADD
GL_FUNC_SUBTRACT
GL_FUNC_REVERSE_SUBTRACT
GL_MIN
GL_MAX
Function: gl-blend-color red green blue alpha

[GL_ARB_imaging] Sets the constant color used in the blending function.

Function: gl-polygon-offset factor units

[GL1.1] Offset the depth value of each fragment. Useful to avoid artifacts when you draw polygon edges over its surfaces, for example.

Function: gl-clip-plane plane equation

Defines a clipping plane. Plane specifies which clipping plane you're defining. Use GL_MAX_CLIP_PLANES to gl-get-integer to obtain the number of clipping planes you can use. You have to enable the specific clipping plane (e.g. (gl-enable GL_CLIP_PLANE0)) to use the clipping plane.

Equation must be an f64vector of size 4, specifying four coefficients of the plane equation, Ax + By + Cz + D = 0.

Function: gl-get-clip-plane plane

Returns the four coefficients of the equation of clipping plane plane, in f64vector.

Function: gl-fog pname param

Sets the parameters and function for the fog effect. Possible values for pname and accepted param for each pname are shown below.

GL_FOG_MODE

Either GL_EXP, GL_EXP2, GL_LINEAR to select the fog factors.

GL_FOG_DENSITY
GL_FOG_START
GL_FO_END

A real number to specify those parametes.

GL_FOG_COLOR

An f32vector of size 4 to specify the color.


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

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