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

Device Description

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

What is HP VMX?

In order to answer the question "What is HP VMX?" let us first examine its name. HP VMX is a shorthand name for the HP Virtual Memory X driver, and is derived from its implementation and usage. Briefly, HP VMX offers the capability to render 3D graphics images into Virtual Memory for display in the X Window System client/server environment.

While HP VMX is technically a Starbase "device driver" it differs somewhat from the traditional definition. A traditional Starbase device driver implements device-specific code necessary to support the device-independent Starbase graphics library on a particular graphics device (or family of graphics devices). HP VMX, on the other hand, implements the code to support the device-independent Starbase graphics library in an X11 graphics window — independent of the underlying hardware on which the X window resides.

Because HP VMX uses the X11 protocol to display the images, the targeted window may be local or remote, on HP or non-HP hardware, a workstation, an X terminal, or a Personal Computer[18]. The only requirement is that you output to an X11 graphics window. Note, too, that the application is not responsible for displaying the images via X11 protocol; this is handled by the HP VMX driver.

You may recognize similarities between HP VMX and the "Starbase-on-X11" (SOX11) device driver. While the X11-based client/server models are similar, differences do exist in both functionality (HP VMX has a richer set) and performance (differs per functionality). Please see the section "SOX11 vs. HP VMX" for an overview comparing and contrasting the two drivers.

How Do You Use HP VMX?

The following example shows the steps necessary to run an application using HP VMX. This example is intended to give you a feel for the kinds of steps necessary to use HP VMX, rather than provide a detailed tutorial on all the steps necessary to explain each step. Refer to the sections throughout this chapter, including "Compiling Your Application with the HP-VMX Graphics Driver," and "To Open and Initialize the Device for Output" for details on these steps.

HP VMX Usage Example

In order to use HP VMX to run a PowerShade application to an HP700/RX X Station across the network from an HP 735 (running 9.0 HP-UX or later), you need to:

  1. Purchase the "PowerShade for HP700/RX X Stations" license to allow you to run HP VMX to a remote X11 server.

  2. Make sure PowerShade is installed on your server (the HP 735).

  3. Execute an xhost command from your X Station to give the HP 735 (named dspsvr in this example) permission to access your X Station's local display server. For example,

    xhost dspsvr
  4. Create an hpterm window and rlogin to the HP 735 from your X Station.

  5. Set the DISPLAY environment variable to the X Station's DISPLAY in this HP 735 hpterm window. Note that in the following example the X station is named myxterm. For example, in ksh:

    export DISPLAY=myxterm:0.0
  6. Run your application from this window.

The application is now executing on the HP 735 (dspsvr), and displaying X and Starbase output on the X Station (myxterm:0.0).

NOTE: The application in this example did not need to be re-linked, nor were any code changes necessary. This assumes that the application is linked with shared libraries, and the application uses NULL as the driver parameter to gopen.

How Does HP VMX Work?

Now that you have some understanding of what HP VMX is, and how you can use HP VMX, let us take a look at how HP VMX works.

Overview

Instead of rendering Starbase 3D graphics images to a dedicated graphics display subsystem, HP VMX is designed to display images in an X11 window using X11 protocol. It does this by automatically using one of the following methods, which are dependent on the attributes of the primitives it is rendering:

Title not available (Overview )

Method one

Simple graphics, such as lines and filled areas that do not require per-pixel computation (no depth buffering or shading, etc.), are rendered directly using X11 protocol. Note that this method will not be selected with dithering turned on. To ignore dithering or have it disabled, use the environment variable HP_VM_XLIB_DITHER. For information on the environment variable HP_VM_XLIB_DITHER, read the section "The Environment Variables HP_VM_RENDER_METHOD and HP_VM_XLIB_DITHER" in this chapter.

Method two

Primitives that require per-pixel computation are rendered into a virtual memory frame buffer and then copied to the window as a complete image with X11 protocol.

If the X11 window is local to a workstation, as it is when the HP VMX driver is rendering to a window in the overlay planes of the workstation, the HP VMX driver will always render into virtual memory and copy the finished image.

Here are the basic steps HP VMX performs to render into a virtual memory frame buffer and copy the image to a window:

  1. VM (Virtual Memory) frame buffer allocation — At gopen time, the HP VMX driver allocates virtual memory for use as a frame buffer. This VM frame buffer is allocated using calloc and its size is based upon the size of the X11 window being gopened.

  2. Rendering to the VM frame buffer — After a successful gopen, HP VMX renders Starbase output primitives in the allocated VM frame buffer. The appropriate primitive attributes and device control are applied during rendering.

  3. Display of the VM frame buffer — Upon application request, HP VMX displays the contents of the VM frame buffer. Application requests come in the form of one of the following Starbase calls:

    • make_picture_current

    • flush_buffer

    • dbuffer_switch

    See the section "Synchronization" for more details.

    Because HP VMX is always operating in the X11 windows environment, the display of the VM frame buffer to the gopened window is handled through the use of standard X11 protocol.

    These basic HP VMX steps are applicable to both single- and double-buffering.

HP VMX Configurations

The HP VMX driver supports depth 8 or depth 24 X11 windows. Attempts to gopen windows with a depth other than 8 or 24 will result in a Starbase error.

The HP VMX driver supports the following configurations:

  • 8-bit indexed color (CMAP_NORMAL, CMAP_MONOTONIC), single-buffered, or 8/8 double-buffered

  • 8-bit direct color (CMAP_FULL), single-buffered or 8/8 double-buffered

  • 24-bit direct color (CMAP_FULL), single-buffered or 24/24 double-buffered



[18] Refer to the "HP VMX Support" section for details on official HP support of HP VMX.

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