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

reshapeviewport Subroutine

Purpose

Sets the viewport to the dimensions of the current window.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void reshapeviewport( )

FORTRAN Syntax

SUBROUTINE RESHAP( )

Description

The reshapeviewport subroutine sets the viewport to the dimensions of the current window.

The reshapeviewport subroutine is equivalent to:

long xsize, ysize;
getsize(&xsize, &ysize);
viewport(0, xsize-1, 0, ysize-1);

Use the reshapeviewport subroutine when REDRAW events are received. It is most useful in programs that are independent of the size and shape of the viewport.

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

Example

The example C language program scrn_rotate.c uses the reshapeviewport subroutine to reshape the viewport on a REDRAW 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

Clearing the viewport with the clear subroutine.

Returning the position of a window with the getorigin subroutine.

Returning the size of a window with the getsize subroutine.

AIX Graphics Library Overview and Using Viewports and Screenmasks.


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