Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ view_port(3G) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gopen(3G)

hidden_surface(3G)

inquire_sizes(3G)

view_camera(3G)

view_window(3G)

view_volume(3G)

view_matrix(3G)

vdc_extent(3G)

zbuffer_switch(3G)

VIEW_PORT(3G)

NAME

intview_port, view_port − define mapping area on view_surface for subsequent view_windows, view_volumes, and view_cameras

SYNOPSIS

C Syntax:

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

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

FORTRAN77 Syntax:

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

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

Pascal Syntax:

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

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

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 coordinates (vdcs). 

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 zbuffered 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-device matrix, view_port does not try to recalculate the viewing transformation matrix.  The viewing transformation matrix is the vdc-to-device 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

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

Hewlett-Packard Company  —  May 11, 2021

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