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 5 Displaying and Refreshing

Getting Your Display List Image Onto the Screen

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The process of displaying segments has been lightly addressed in previous chapters; in this section, we'll get into more detail.

Device-Dependent Display Lists

Device-dependent display lists are display lists that have been associated with a particular device during the call to gopen; for example[13],

  • path="〈screen〉/starbase_window"

and 〈driver〉="hpgcrx". To dump the image in the display list onto the display, you must specify two things:

  • the 〈fildes〉 of the display list you wish to display, and

  • the number of the segment to display.

These are the refresh routines.

"refresh_segment" and "refresh_segment_hsr

The refresh_segment and refresh_segment_hsr routines display the specified segment network on the associated display device. The syntax is:

  • refresh_segment(〈fildes〉, 〈segno〉);

    • or

  • refresh_segment_hsr(〈fildes〉, 〈segno〉);

where:

  • fildes〉 is the file descriptor of the device-dependent display list, returned by gopen. This 〈fildes〉 is associated with both the display list and the physical display device.

  • segno〉 is a 32-bit integer value specifying the number of the segment to be traversed.

"refresh_segment_hsr"

The refresh_segment_hsr routine is similar in functionality to the refresh_segment routine, but it is for 3D applications where hidden surfaces are to be removed (the "hsr" stands for "hidden surface removal").

For best results from the Z-buffer hidden-surface removal algorithm, the segment (or segment network) specified in the call to refresh_segment_hsr should contain the entire scene. In other words, there should only be a single call to refresh_segment_hsr for each complete image.

Hidden-surface removal must already have been activated (via hidden_surface) before calling refresh_segment_hsr.

"refresh_element"

A call to refresh_element is to elements what a call to refresh_segment is to segments. If the element is a "simple" element, refresh_element displays the current element of the currently open segment on the display device associated with the specified display list. If the element is a "calling" element (call_segment, cond_call_segment, execute_segment, and cond_execute_segment), refresh_element displays the entire referenced subtree, provided the associated conditions (if any) are satisfied. The syntax is:

  • refresh_element(〈fildes〉);

where:

  • fildes〉 is a file descriptor associated with the display list that contains the currently open segment. An error occurs if there is no open segment in the display list associated with 〈fildes〉.

The current element should not be the null element at the beginning of the segment; if it is, an error occurs. Calling refresh_element does not increment the element pointer; if you want it to be incremented, call set_ele_ptr_relative with an argument of 1.

Device-Independent Display Lists

Device-dependent Display Lists are display lists that have not been associated with any particular device during the call to gopen. You open a device-independent display list by assigning 〈path〉 equal to "〈dev/null"[14] and 〈driver〉 equal to "display_list". To dump the image in a device-independent display list onto a display, you must specify three things:

  • The 〈fildes〉 of the desired display list,

  • the number of the segment you wish to display, and

  • the 〈fildes〉 of the desired display device.

These are the display routines.

"display_segment" and "display_segment_hsr

The display_segment and display_segment_hsr routines display the specified segment network of a device-independent display list on the specified display device. The syntax is:

  • display_segment(〈fildes〉, 〈segno〉, 〈devdes〉);

    • or

  • display_segment_hsr(〈fildes〉, 〈segno〉, 〈devdes〉);

where:

  • fildes〉 is the file descriptor of the device-independent display list, returned by gopen.

  • segno〉 is a 32-bit integer value specifying the number of the segment to be traversed.

  • devdes〉 is the file descriptor, returned by gopen, of the graphics device that is to display the image contained in the display list associated with 〈fildes〉.

The display_segment routine displays the segment network 〈segno〉, in the display list 〈fildes〉, on the device 〈devdes〉.

"display_segment_hsr"

The display_segment_hsr routine is similar in functionality to the display_segment routine, but it is for 3D applications where hidden surfaces are to be removed (the hsr stands for "hidden surface removal").

For best results from the Z-buffer hidden-surface removal algorithm, the segment (or segment network) specified in the call to display_segment_hsr should contain the entire scene. In other words, there should only be a single call to display_segment_hsr for each complete image.

Hidden-surface removal must already have been activated (via hidden_surface) before calling display_segment_hsr.

"display_element"

A call to display_element is to elements what a call to display_segment is to segments. If the element is a "simple" element, display_element displays the current element of the currently open segment on the specified display device. If the element is a "calling" element (call_segment, cond_call_segment, execute_segment, and cond_execute_segment), display_element displays the entire referenced subtree on the specified display device, provided the associated conditions (if any) are satisfied. The syntax is:

  • display_element(〈fildes〉, 〈devdes〉);

where:

  • fildes〉 is a file descriptor associated with the display list that contains the currently open segment. An error occurs if there is no open segment in the display list associated with 〈fildes〉.

  • devdes〉 is the file descriptor, returned by gopen, of the graphics device that is to display the current element in the display list associated with 〈fildes〉.

The current element should not be the null element at the beginning of the segment; if it is, an error occurs. Calling display_element does not increment the element pointer; if you want it to be incremented, call set_ele_ptr_relative with an argument of 1.



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

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