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

getviewport Subroutine

Purpose

Returns the dimensions of the current viewport.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void getviewport(Screencoord *left, Screencoord *right,

      Screencoord *bottom, Screencoord *top)

FORTRAN Syntax

SUBROUTINE GETVIE(left, right, bottom, top)
INTEGER*2 left, right, bottom, top 

Description

The getviewport subroutine returns the dimensions of the current viewport (the top of the viewport stack) and copies these dimensions to the location variables specified as parameters. The left, right, bottom, and top parameters are the addresses of four memory locations assigned the left, right bottom, and top coordinates of the viewport.

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

Parameters

left Specifies the memory location in which to return the x coordinate (in pixels) of the left side of the viewport.
right Specifies the memory location in which to return the x coordinate (in pixels) of the right side of the viewport.
bottom Specifies the memory location in which to return the y coordinate (in pixels) of the bottom side of the viewport.
top Specifies the memory location in which to return the y coordinate (in pixels) of the top side of the viewport.

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

Popping the viewport stack with the popviewport subroutine.

Pushing the viewport onto the viewport stack with the pushviewport subroutine.

Setting the viewport to the dimensions of the current window with the reshapeviewport subroutine.

Setting the area of the window used for all drawing with the viewport subroutine.

AIX Graphics Library Overview, Querying the System, and Using Viewports and Screenmasks.


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