Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ view_port(3G) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gopen(3G)

hidden_surface(3G)

inquire_sizes(3G)

vdc_extent(3G)

view_camera(3G)

view_matrix(3G)

view_volume(3G)

view_window(3G)

zbuffer_switch(3G)

view_port(3G)

NAME

view_port, intview_port − define mapping area on view_surface for subsequent view_window, view_volume, and view_camera calls

SYNOPSIS

C Syntax:

void view_port ( fildes, x1, y1, x2, y2 );
int fildes;
float x1, y1, x2, y2;

void intview_port ( fildes, x1, y1, x2, y2 );
int fildes, x1, y1, x2, y2;

FORTRAN77 Syntax:

subroutine view_port ( fildes, x1, y1, x2, y2 );
integer*4 fildes
real x1, y1, x2, y2;

subroutine intview_port ( fildes, x1, y1, x2, y2 );
integer*4 fildes, x1, y1, x2, y2;

Pascal Syntax:

procedure view_port ( fildes:integer; real x1, y1, x2, y2 );

procedure intview_port ( fildes, x1, y1, x2, y2:integer );

DESCRIPTION

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

x1, y1, x2, y2 Boundaries of the new viewport specified in virtual device coordinate (VDC) units. 

Discussion

This function defines a new viewport on the virtual device that intview_window, view_window, view_volume, and view_camera functions map to.  It also sets the range of VDC space that is to be Z-buffered when hidden surface removal is active. 

When using view_window or view_volume, the entire window/volume (in world coordinates) maps to the entire viewport (in VDCs).  This causes distortion if the aspect ratios of the two are not the same or if mapping mode is set to DISTORT. When using view_camera, the camera view will appear within the bounds of the viewport with no distortion. 

After changing the viewport range, this function tries to re-calculate the viewing transformation matrix if the last viewing transformation matrix was set with intview_window, view_window, view_volume, or view_camera. If the last viewing transformation matrix was set with view_matrix, or if the viewing transformation matrix is the VDC-to-DC matrix, view_port does not try to recalculate the viewing transformation matrix.  The viewing transformation matrix is the VDC-to-DC matrix if no viewing function (view_window, view_volume, view_camera, or view_matrix) has been called since gopen time or since the last call to flush_matrices.

This viewport is truncated to the current vdc_extent if it exceeds the range of VDC. 

Integer operations are only available when using the INT_XFORM gopen mode. When in INT_XFORM mode, floating point operations are not available for that fildes. Floating point operations are the default, or can be specified with FLOAT_XFORM mode. For a list of integer operations, floating point operations and common operations see the starbase(3G) manual page. 

DEFAULTS

After gopen, the default viewport is the same as the default vdc_extent.

SEE ALSO

Starbase Reference: gopen(3G), hidden_surface(3G), inquire_sizes(3G), vdc_extent(3G), view_camera(3G), view_matrix(3G), view_volume(3G), view_window(3G), zbuffer_switch(3G).  Starbase Graphics Techniques. 

 

Hewlett-Packard Company  —  November 03, 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026