[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

greset Subroutine

Purpose

Resets all global state attributes to their initial values.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void greset( )

FORTRAN Syntax

SUBROUTINE GRESET

Description

The greset subroutine resets all global state attributes to their initial values. This subroutine can be called at any time to reset the attributes.

The following table lists the global state attributes:

Global State Attributes
Attribute Initial Value
backface mode off
blinking off
buffer mode single
color undefined
color map mode one map
concave off
cursor 0 (arrow)
depth range -0x800000,+0x7FFFFF (On Supergraphics Processor Subsystem: 0x0,0x1FFFFF)
depthcue mode off
display mode color map
drawmode NORMALDRAW
font 0
linestyle 0 (solid)
linewidth 1 pixel
logical operation LO_SRC
lsrepeat 1
pattern 0 (solid)
picking size 10x10 pixels
RGB color undefined
RGB shaderange undefined
RGB writemask undefined
shademodel GOURAUD
shaderange 0,7,-0x800000,+0x7FFFFF (On Supergraphics Processor Subsystem: 0x0,0x1FFFFF)
viewport entire window
writemask all planes enabled
z-buffer mode off
Note: Font 0 (zero) is a Helvetica-like font.

The greset subroutine puts a 2-D orthographic projection transformation on the matrix stack with left, right, bottom, and top set to the boundaries of the screen. The subroutine also turns on the cursor and ties it to MOUSEX and MOUSEY.

The greset subroutine removes all button, valuator, and keyboard entries from the event queue and discards them. Each button is set to FALSE and untied from valuators. Each valuator (and in particular MOUSEX) is set to XMAXSCREEN/2 with range 0 to XMAXSCREEN. MOUSEY is set to YMAXSCREEN/2 and has range 0 to YMAXSCREEN.

The greset subroutine also defines certain entries in the color map, as follows:

Color Map Entries

RGB Value
Name Red Green Blue
BLACK 0 0 0
RED 255 0 0
GREEN 0 255 0
YELLOW 255 255 0
BLUE 0 0 255
MAGENTA 255 0 255
CYAN 0 255 255
WHITE 255 255 255
Note: This subroutine cannot be used to add to a display list.

Example

The example C language program vlsi.c uses the greset subroutine to reset all global attributes on any keyboard event.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Reconfiguring the graphics system with the gconfig subroutine.

Initializing the graphics system with the ginit subroutine.

Creating a new window with the winopen subroutine.

Controlling Queues and Devices, Creating a Cursor, Understanding the Hardware Used by GL, Setting Drawing Attributes, Windows and Input Control Overview, Working with Coordinate Systems.

Configuring the Frame Buffer, Clearing, Resetting, and Initializing GL.


[ Previous | Next | Contents | Glossary | Home | Search ]