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

winopen Subroutine


Creates a window.


Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

Int32 winopen(Char8 *name)


CHARACTER*(*) name
INTEGER*4 length


The winopen subroutine creates a window as defined by the current values of the window constraints. This new window becomes the current window. If this is the first time that a program has called the winopen subroutine, the system also initializes the graphics system.

The returned value for this function is the window identifier (gwid) for the window just created. Use this value to identify the window to other graphics functions. If no additional windows are available, this function returns -1 (negative one).

If called before the winopen subroutine, the following subroutines change the default window constraints:

If a window's size and location are left unconstrained, the system allows the user to place and size the window.

All drawing (lines, polygons, and NURBS) is done in the current window. Lighting, depth-cueing, and z-buffering all apply to the current window. Every window has an independent set of stacks: matrix stack, name stack, attribute stack, and viewport stack, and all stack manipulation routines such as matrix multiplies are directed at the current window.

The only attributes that are shared across windows are those defined with the defcursor, deflinestyle, defpattern, defrasterfont, lmdef, loadXfont, and makeobj subroutines.

The winopen subroutine examines the environment variable DISPLAY to determine to which AIXwindows server to make a connection. The default DISPLAY value is unix:0 . Only local sessions are currently supported. A GL session can only run on an AIXwindows server that has extensions to support GL. Not all AIXwindows servers support GL.

The winopen subroutine queues the INPUTCHANGE and REDRAW pseudo devices.

Note: This subroutine cannot be used to add to a display list.


name Specifies the window title displayed on the left hand side of the title bar. A zero-length string displays no title.
length Specifies the length of the string in the name parameter.


The example C language program colored.c uses the winopen subroutine to create a window with characteristics previously defined in the program.

Implementation Specifics

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


/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

Specifying pixel values to be added to a window with the fudge subroutine.

Giving a program the entire screen as a window with the fullscrn subroutine.

Obtaining the position of a window with the getorigin subroutine.

Obtaining the size of the window with the getsize subroutine.

Specifying the size of a window icon with the iconsize subroutine.

Specifying the title of a window icon with the icontitle subroutine.

Specifying the aspect ratio of a window with the keepaspect subroutine.

Specifying the maximum size of a window with the maxsize subroutine.

Specifying the minimum size of a window with the minsize subroutine.

Removing the border from a window with the noborder subroutine.

Specifying that a program does not require a window with the noport subroutine.

Constraining the window position and size with the prefposition subroutine.

Constraining the size of a window with the prefsize subroutine.

Specifying a window size change in discrete steps with the stepunit subroutine.

Creating a restricted subwindow with the swinopen subroutines.

Closing the identified window with the winclose subroutine.

Binding window constraints to the current window with the winconstraints subroutine.

Adding a title bar to the current window with the wintitle subroutine.

Creating and Managing Windows.

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