Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Starbase Technical Addendum for the July, 1997 Workstation ACE for 10.20 HP-UX: HP 9000 Workstations and Servers > Chapter 5 HP Virtual Memory and X

To Open and Initialize the Device for Output

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

X11 Environment

The VMX usage example in the section "How Do You Use HP VMX?" gives an example of how you might run an application with HP VMX in the X11 environment. This section describes in more detail the X11 environment setup necessary to run HP VMX remotely.

DISPLAY Environment Variable

The DISPLAY environment variable must be set on the HP VMX server side. The value of the environment variable is the host, display, and screen of the targeted VMX client on which the Starbase application is to be displayed. By setting this environment variable, the application will direct X11 protocol to the HP VMX client.

For more information on setting the DISPLAY environment variable, read the section "Setting the DISPLAY Variable" in the chapter "Preliminary Configuration" of the Using the X Window System manual.

xhost Client

The xhost client is used to add or delete a remote host's permission to access the local display server. This client must be run on the HP VMX client side to allow the HP VMX server access to the HP VMX client's display server.

For more information on adding and deleting hosts with xhost, read the section "Adding and Deleting Hosts with xhost" in the chapter "Using the X Clients" in the Using the X Window System manual.

Syntax Examples

Two methods exist to gopen a window using HP VMX. The recommended method is to set the driver parameter to NULL and let Starbase choose the appropriate device driver. The second method for gopening HP VMX is to specify hpvmx as the driver parameter to gopen(). See the gopen(3G) and inquire_device_driver(3g) man pages for details on device driver selection.

If you specify NULL as the driver parameter, Starbase will choose HP VMX if:

  • The window is displayed on a remote X11 server, or

  • The window is displayed in the overlay planes on one of the CRX, HCRX, or HP Visualize family of devices (for example, CRX-24Z, CRX-48Z, HCRX-8, HP Visualize-24, and HCRX-24Z)

In each of the examples below, assume that the depth 8 or 24 window[19]:

screen〉/remote_window

has been created on a remote X11 server with the following xwcreate command:

xwcreate -display 〈remote_host〉 -geometry 500×500 
\ remote_window

Syntax Examples

The following examples show how to open the grapics devices for output1:

C programs

fildes=gopen("〈screen〉/remote_window", OUTDEV, NULL, 
INIT | THREE_D);

FORTRAN 77 programs

fildes = gopen('〈screen〉/remote_window'//char(0), OUTDEV,
+ char(0), INIT | THREE_D)

Pascal programs

fildes:=gopen('〈screen〉/remote_window', OUTDEV, '', 
INIT | THREE_D);

Parameters for gopen

The gopen procedure has four parameters: path, kind, driver, and mode.

  • path — This is the name of the device file created by xwcreate(1) or created with XCreateWindow(3X11) and returned from:

    make_X11_gopen_string(3G)
  • kind — This parameter should be OUTDEV if the window will be used for output, INDEV if the window will be be used for Starbase input, or OUTINDEV if the window will be used for both output and Starbase input.

  • driver — The character representation of the driver type. For portability across the HP graphics device family, use the NULL parameter. In this case, Starbase will automatically choose the appropriate driver.

    For example,

    NULL          for C
    char(0)       for FORTRAN 77
    ''            for Pascal

    A character string may be used to specify the driver. For example,

    "hpvmx"        for C
    'hpvmx'(0)      for FORTRAN 77
    'hpvmx'        for Pascal
  • mode — The mode control word consists of several flags bits ORed together. Listed below are flag bits that have device-dependent actions. Those flags not discussed below operate as defined by the gopen procedure. See the Starbase Graphics Techniques manual for more details of gopen actions when in an X Window.

    • 0 (zero) — Open the window, but do not perform the operations associated with INIT below. The following actions are:

      1. The software color table is initialized from the X color map already associated with the window.

      2. The VM buffer is initialized by reading the contents of the window.

    • INIT — Open and initialize as follows:

      1. The window is cleared to zeros.

      2. A new X color map is created and associated with this window. The color map is initialized as CMAP_NORMAL.

    • RESET_DEVICE — This flag is equivalent to INIT.

    • SPOOLED — Not supported.

    • MODEL_XFORM — Opening in MODEL_XFORM mode will affect how matrix stack and transformation routines are performed. See gopen(3G) for more information.

    • INT_XFORM — Only integer and common operations will be performed. All floating point operations will cause an error.

    • INT_XFORM_32 — Only integer and common operations will be performed. All floating point operations will cause an error.

    • ACCELERATED — This flag is ignored.

    • UNACCELERATED — This flag is ignored.

    • THREE_D — Three-dimensional graphics.



[19] The actual path names of directories in angle brackets depend on the file system structure. See the Graphics Administration Guide for details.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1996 Hewlett-Packard Development Company, L.P.