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
HP-UX Starbase Device Drivers Manual - Vol1: HP 9000 Series 700 Computers > Chapter 2 HP VMX Device Driver

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.

xhost Command

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

Licensing

In order to run a PowerShade application on any remote X11 server, you must purchase the "PowerShade for HP700/RX X Station" product. Refer to the section "HP VMX/PowerShade Licensing" for details.

Syntax Examples

Two methods exist to gopen a window using HP VMX. One method for gopening HP VMX is to specify hpvmx as the driver parameter to gopen(). The second method is to set the driver parameter to NULL and let Starbase choose the appropriate device driver. 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 or HCRX family of devices (for example, CRX-24, CRX-24Z, CRX-48Z, and HCRX-24Z)

In each of the examples below, assume that the window[5]:

screen〉/remote_window

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

xwcreate -display <remote_host> -geometry 500x500 remote_window

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 a 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 or-ed 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 0s.

      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.



[5] 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
© 1989 - 1995 Hewlett-Packard Development Company, L.P.