Solaris 7 Sun Hardware Platform Guide

OpenGL Software

The Solaris OpenGL software is Sun's native implementation of the OpenGL application programming interface (API). The OpenGL API is an industry-standard, vendor-neutral graphics library. It provides a small set of low-level geometric primitives and many basic and advanced 3D rendering features, such as modeling transformations, shading, lighting, anti-aliasing, texture mapping, fog, and alpha blending.

Supported Platforms

The Solaris OpenGL 1.1.2 software supports the following devices:

Removing Old Packages

If you have older versions of the Solaris OpenGL software packages, you must use the pkgrm command to remove them. Follow these steps:

  1. Check to see whether any older versions of the OpenGL packages are installed using the pkginfo command.

    The pkginfo | egrep -i "OpenGL" command lists any existing OpenGL packages that you have installed.

    % pkginfo | egrep -i "OpenGL"
    application SUNWffbgl     Creator Graphics (FFB) OpenGL Support
    application SUNWglrt      OpenGL Runtime Libraries
    application SUNWglrtu     OpenGL Platform Specific Runtime Libraries
    application SUNWglwrt     OpenGL Widget Library
    application SUNWafbgl     Loadable pipeline for UPA Bus Elite3D graphics
    application SUNWgldoc     Solaris OpenGL Documentation and Man Pages
    application SUNWglh       Solaris OpenGL Header Files
    application SUNWglut      Solaris OpenGL Utilities and Example Programs
    application SUNWglwh      Solaris OpenGL Widget Header Files

  2. To remove the packages, become superuser:

    % su
    Password: superuser password

  3. Run pkgrm to remove all existing Solaris OpenGL packages.

    # pkgrm SUNWglrt SUNWglh...

Installing the OpenGL Software

To install the OpenGL software, follow these steps:

  1. Start CDE or OpenWindows.

  2. Insert the Supplement CD into your CD-ROM drive.

    The File Manager window is displayed.

  3. Open a command window and become superuser using the su command and superuser password.

  4. Enter the swmtool command at the # prompt:

    # /usr/sbin/swmtool

    The Admintool:Software window is displayed.

  5. Select Add from the Edit Menu.

    The Admintool:Set Source Media window is displayed.

  6. Type:

    # cd /cdrom/cdrom0/Product

    The Admintool:Add Software window is displayed

  7. In the Admintool:Add Software window, select Open GL Runtime Libraries 1.1.2.

  8. Click Add.

    The installation process should take a few minutes.

  9. Quit Admintool.

OpenGL Clusters and Packages

Table 3-5 lists the clusters and packages that are provided with Solaris OpenGL.

Table 3-5 OpenGL Clusters and Packages

Cluster Name 

Package Name 


Default Install Location 



OpenGL client-side runtime libraries 



UltraSPARC-specific OpenGL libraries 



Device pipeline for Creator and Creator3D Graphics frame buffers 



OpenGL widget library 



Loadable pipeline for UPA Bus Elite3D graphics 


 SUNWglrtx Sun OpenGL 64-bit Runtime Libraries /usr/openwin
 SUNWafbgx Sun OpenGL 64-bit loadable pipeline for the UPA Bus Elite3D graphics accelerator /usr/openwin
 SUNWffbgx Sun OpenGL 64-bit loadable pipeline for the UPA Bus Creator graphics accelerator /usr/openwin

After Installing the Packages

After installing the packages, do the following:

  1. Exit the window system and restart it so that the window system loads the newly installed GLX server extension.

  2. To verify that the OpenGL libraries are installed correctly, run ogl_install_check.

    The ogl_install_check test program prints the version of the OpenGL library and renderer used, and renders a rotating wheel. The program returns the following output when it is run on an UltraSPARC Creator3D:

    OpenGL Vendor:             Sun Microsystems, Inc.
    OpenGL Version:            1.1.2 Solaris OpenGL 1.1.2_08

For diagnostic purposes, the following values should be noted anytime that Solaris OpenGL problems are seen:

OpenGL Renderer:               Creator 3D, VIS
OpenGL Extension Support:      GL_EXT_texture3D
OpenGL GLX Server:             Detail Status Report
     GLX:     Context is direct.
     GLX:     OpenGL Rendering in use
     GLX:     Double Buffering in use
     GLX:     Color Buffer (GLX_BUFFER_SIZE) = 24 bits
     GLX:     Depth Buffer (GLX_DEPTH_SIZE) = 28 bits
     GLX:     Stencil Buffer (GLX_STENCIL_SIZE) = 4 bits
     GLX:     RGBA (True Color/Direct Color) Visual in use
OpenGL Library:                Detail Status Report
     Number of color bits (R/G/B/A): 8/8/8/0
     Frame Buffer Depth (GL_DEPTH_BITS):28

Unexpected Slow Local Rendering

Whenever possible, Solaris OpenGL renders directly to the frame buffer, bypassing the X server. This is enabled by Sun's DGA mechanism for locking portions of the screen. However, a Solaris security feature only allows the user who originally logged in to the window system to use DGA to lock portions of the screen. Only owners of the window system have access to DGA.

If you notice poor performance when rendering locally, the cause may be this Solaris security feature. For example, if you start the window system, and another user at the workstation changes to that user's own environment using su, the application will not run via DGA even though the second user is running the application locally.

If you notice slow local rendering, run the ogl_install_check diagnostic program (found in /usr/openwin/demo/GL) to determine whether the application is running via DGA. If the OpenGL GLX Server status report from the ogl_install_check program says that the GLX context is indirect, the login permissions need to be edited to enable DGA access for all users.

To give all local users access to DGA, follow these steps:

  1. Become superuser.

    % su
    Password: superuser password

  2. Edit permissions to allow world read/write access to the following devices:

    % chmod 666 /dev/mouse /dev/kbd /dev/sound/* /dev/fbs/*

    This will enable DGA access by all users for the duration of the current window system session (subject to X authorization, see xhost(1)).

  3. Edit the /etc/logindevperm file and change the default permissions of all devices listed in the file to 0666 to allow world read/write access.

    For example, in the following lines in logindevperm, the 0600 should be changed to 0666 so that the next time you log in and restart your window system, it will still be accessible by all users.

    /dev/console     0600     /dev/mouse:/dev/kbd
    /dev/console     0600     /dev/sound/*       # audio devices
    /dev/console     0600     /dev/fbs/*         #frame buffers

Note that your system is no longer secure.