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
HP's Implementation of OpenGL: HP 9000 Workstations > Chapter 4 Running OpenGL Programs

The Virtual Memory Driver (VMD)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

Instead of rendering OpenGL graphics to a dedicated graphics display subsystem, VMD is designed to render these images to a virtual-memory frame buffer and send these images to an X11 drawable using standard X11 protocol.

Because HP VMD uses the X11 protocol to display the images, this targeted drawable may be local or remote. This may include rendering to X terminals, older HP devices, or a personal computer. The only requirement is that the output is directed to an X11 drawable. (See Chapter 1 for a list of supported VMD configurations) VMD is also the driver used to render to GLX pixmaps.

When a GLX context is created for rendering three-dimensional graphics using OpenGL, GLX first checks to see if the X server supports the GLX extension. If it does not, the Virtual Memory Driver will be used. GLX examines the available list of X visuals and decides which ones can be software extended to be GLX visuals (see the supported visuals list). Buffers are allocated in virtual memory for the OpenGL color and ancillary buffers. When the application issues a glFlush(), glFinish(), or a glXSwapBuffers() call, the contents of the corresponding virtual-memory color buffers are sent to the X11 window using X protocol.

Double buffering for VMD is implemented using the X11 Double-Buffering Extension (DBE). Double-buffered visuals are not available for HP OpenGL rendering with VMD on X servers that do not support DBE.

Because of the way VMD works (rendering to a VM buffer and then displaying the images through X11 protocol), it will behave a bit differently than hardware devices. In particular, since VMD renders to VM buffers, changes to the X11 window will not appear until a buffer swap or a glFlush/glFinish.

Resource usage needs to be taken into consideration as well. VM buffers are allocated for all of the OpenGL color and ancillary buffers. Color buffers are allocated when the context is created. Other buffers (depth, stencil, accumulation) are allocated at first use. These buffers can be quite large.

For example, consider an X11 window 750 pixels wide and 600 pixels high. The size of each VM color buffer for an 8-bit visual is:

  • 750 pixels × 600 pixels × 1 byte/pixel = 450,000 bytes

Consider that an OpenGL application may use two color buffers (for double buffering), a 32-bit depth/stencil buffer, and a 48-bit accumulation buffer. The size of the virtual memory required then becomes 5,400,000 bytes. In addition, the amount of virtual memory required is correspondingly larger for 12-bit and 24-bit color buffers.

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