[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
GL3.2 Version 4.1 for AIX: Programming Concepts

Setting Drawing Attributes

GL contains subroutines designed to define the attributes for drawing primitives. These subroutines set the current color in either color map mode or RGB mode; the current linestyle, width, and color for line drawings; and the current fill pattern for solid objects. The shademodel subroutine sets the shading model for drawing shaded polygons.

You may want to read about the effects of certain attributes in "Creating Lighting Effects" and in "Working in Color Map and RGB Modes".

To read about the effects of certain attribute subroutines, see Creating Lighting Effects in GL and Working in Color Map and RGB Modes in GL.

List of GL Drawing Attribute Subroutines

c
                          Sets the current color in RGB mode.
color
                          Sets the current color in color map mode.
cpack
                          Sets the current color as a packed 32-bit integer.
deflinestyle
                          Defines a linestyle.
defpattern
                          Defines a pattern.
getcolor
                          Returns the current color in color map mode.
getlsrepeat
                          Returns the linestyle repeat count.
getlstyle
                          Returns the current linestyle.
getlwidth
                          Returns the current linewidth.
getpattern
                          Returns the index of current fill pattern.
getsm
                          Returns the shading model used to draw polygons.
gRGBcolor
                          Returns the current color (RGB mode).
linewidth
                          Specifies a linewidth.
lsrepeat
                          Sets the repeat factor for the current linestyle.
popattributes
                          Pops the attribute stack.
pushattributes
                          Pushes down the attribute stack.
RGBcolor
                          Sets the current color in RGB mode.
setlinestyle
                          Selects a linestyle.
setpattern
                          Selects a pattern for filling polygons and rectangles.
shademodel
                          Selects a shading model used to draw polygons.

[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]