 |
» |
|
|
 |
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. 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]: has been created on a remote X11 server with the following
xwcreate command: xwcreate -display 〈remote_host〉 -geometry 500×500 \ remote_window |
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, A character string may be used to specify the driver. For
example, 'hpvmx'(0) for FORTRAN 77 |
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: The software color table is initialized from the X color map
already associated with the window. The VM buffer is initialized by reading the contents
of the window.
INIT
— Open and initialize as follows: The window is cleared to zeros. 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. 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.
|