display_name The name of the xdisplay object that provides the connection to the X server.
window_id The ID of the X Window that Starbase will draw to.
right_handed_system Starbase uses a LHS by default. If right_handed_system is non-zero, then a z- reflection matrix is placed on the stack as the first transformation. (See the NOTES AND BUGS section below).
bitmap_file The name of a file in which to save the image using Starbase's bitmap format.
image_file The name of a file in which to save the image using a compressed bitmap adapted from the OSU "COMPIMG" format.
display The ID returned by the Starbase gopen() call.
on! Set the status on. Rendering will occur.
off! Set the status off. Rendering requests will be ignored.
display_name[=?] Set/get the name of the xdisplay object that the X server connection is obtained from.
window_id[=?] Set/get the ID of the X Window that Starbase is rendering to.
id? An alias for window_id? since most X objects respond to both forms.
right_handed_system[=?] Set/get the value of the right_handed_system variable.
right_handed_system! Set the renderer to use a right-handed coordinate system.
left_handed_system! Set the renderer to use a left-handed coordinate system (default).
bitmap_file[=?] Set/get the name of the bitmap file.
image_file[=?] Set/get the name of the image file.
display? Get the Starbase file descriptor returned from gopen().
initialize! Opens Starbase via gopen(), sets the device mapping, viewport mapping, clipping, color map mode, double buffering (if on), and hidden-surface removal.
start! Performs tasks needed before each frame is rendered. If this is the first time that a starbase object has received a render!, then the system is first initialized. Then the matrix stack is set up, z-buffering is turned on, the viewport is set up, the background color is set and the display is cleared to the background color.
frame! Updates the display by waiting for all display requests to be processed. Then the buffers are swapped.
update_actor: The specified actor is drawn on the display using Starbase geometric primitive calls.
update_camera: The view described by the specified camera is defined in Starbase calls.
update_light: The specified lights are defined using Starbase calls.
render_all! Renders all instances of starbase deferring a buffer update (via frame!) until the last instance is rendered.
update_render_time! Overrides the inherited method to update the last time an image was rendered. This method always sets render_time to 0, forcing the start! message to initiate each frame of animation.
save_bitmap! Writes the current image to the file specified in the bitmap_file variable using the bitmap_to_file() Starbase call.
save_image! Writes the current image to the file specified in the image_file variable using the OSU "COMPIMG" compressed format.
SB_DEPTH The number of bit planes to use for graphics. Default is 24.
SB_OUTDEV The name of the display device driver. When running under X Windows, this does not need to be set. It can be set, however, to the name of the device driver created with the xwcreate command. When running in raw mode (no windowing system), this variable should be set to "raw" or "/dev/crt" (same effect).
SB_OUTDRIVER The name of the device driver to use when making Starbase calls. Note that the executable must have been linked with the indicated driver library. If this variable is not set, it defaults to "hp98731", the normal driver for the Turbo SRX.
SB_DBUFFER A flag to control double buffering. If non-zero (or if SB_DBUFFER is not set), double buffering is enabled. If it is "0", then no buffering will be performed.
camera new: acamera position=(8,8,8) focal_point=(0.0,0.0,0.0) view_angle=30 on! ;
light new: alight position=(10,5,8) on! ;
cylinder_modeller new: cylinder_model;
actor new: cylinder color=(1,0,0) modeller=cylinder_model ;
starbase new: arenderer actors=cylinder cameras=acamera lights=alight ;
arenderer render!;
Specular highlighting only works with POSITIONAL light sources. Currently, the Starbase renderer implements an infinite light source only, so the specular and specular_power variables have no
effect.
Shading Models Starbase only performs smooth (Gouraud) shading. Flat and Gouraud shading are controlled by supplying the appropriate normals. Phong shading is not supported.
Depth-cueing is supported in Starbase by setting the representation to "wireframe" and the shading model to Gouraud.
Primitives The Starbase text routines use a character set that defines its geometry in a left-handed coordinate system - the default for Starbase. Thus, if a right-handed system is used (see MESSAGES above), the characters are displayed in their mirror image. There does not seem to be a simple solution. The best recommendation is to use the hershey_text objects which produce text geometry independent of the rendering class.
Saving Images The Starbase renderer allows you to dump the image (as an HP pixmap) to a file (see bitmap_file variable and the save_bitmap! message). There are utilities available to print these on a PostScript printer. They can also be printed on some HP printers or plotters.
Another format, based on OSU's COMPIMG compressed image format exists (see the image_file variable and the save_image! message). Utilites exist for converting this format to a variety of printers.
Window Informaion You can set and/or get the display connection ID but not the X window ID (See notes below). For all practical purposes, the graphics window is completely independent of X.
Other Notes Although Starbase does work while running under X, the integration is not seamless. When running in combined mode (so you can have graphics and a window manager, simultaneously) the window manager thinks it only has the overlay planes available. Starbase sees 24 planes available for graphics. When a 24-bit window is opened through Xlib, it is then converted to a Starbase device for graphics. Starbase automatically creates a transparent window in the overlay planes that covers the graphics window and notifies the window manager about it. So
when you manipulate the window through X, you are actually manipulating this false cover window. Communication to the real graphics window is hidden from the user. The net result is that the window you can manipulate through the user interface is not the same as the window that is being drawn to. Thus, you can't ask the renderer for its window ID and get X events from it, nor can you set the window ID of the renderer and tell it to draw into it (because the window manager won't let you create a 24-plane window). Can you say "Catch-22"?!