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 Display List Programmer's Manual: HP 9000 Series 700 Computers > Chapter 4 The Basics of Using a Display List

Opening and Closing a Display List

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Opening a Display List

When a Starbase X11 window is opened in a program using Display List, a device-dependent display list is opened and associated with that display device. The display list is device-dependent because it is associated with a particular device (see below for a discussion of device-independent display lists).

The file descriptor returned by the gopen call is used to access both the graphics display device and its associated display list.

A device-dependent display list for an HP graphics window is created with the following call in C[11]:

fildes = gopen("〈screen〉/starbase_window",
OUTDEV, NULL, INIT);

To modify this call for other windows or devices, change the

"〈screen〉/starbase_window"

to the appropriate window name or device file. Or, better yet, don't hard-code the device-file name into the source code; use argc and argv to pass the desired value to the program, or get the value from environment variables through getenv. For further details, review the Starbase Graphics Techniques provided with your system.

You can also open a device-independent display list, a display list not associated with a particular output device. This is done by calling gopen and specifying the null devicedev/null", as the device file and the display list device driver "display_list" as the graphics device driver[12]:

fildes = gopen("〈dev〉/null", OUTDEV, "display_list", INIT);

A device-independent display list is useful if one display list is to be displayed on several devices or in several windows. Device-dependent optimizations at creation time cannot be made for a device-independent display list. As a result, performance may be better using a device-dependent display list. Thus, if you do not need the device-independence, your choice would probably be the device-dependent list associated with the graphics device.

Segments can be created, deleted and manipulated in each open display list independent of all other display lists. A display list must be open to operate on it.

Closing a Display List

A device-independent display list is closed in the same way a device-dependent display list is closed — a simple call to gclose:

gclose(fildes);

When the graphics display device is closed, the display list associated with the device is closed and deleted.



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

[12] Of course, you must also include the appropriate driver when linking; i.e., -ldddl.

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