RS/6000 Graphics Handbook: Laurent Vanel, Mike Carline, Shigeo Murohashi
RS/6000 Graphics Handbook: Laurent Vanel, Mike Carline, Shigeo Murohashi
RS/6000 Graphics Handbook: Laurent Vanel, Mike Carline, Shigeo Murohashi
SG24-5130-00
SG24-5130-00
Take Note!
Before using this information and the product it supports, be sure to read the general information in
Appendix C, Special Notices on page 267.
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ix
Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
The Team That Wrote This Redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Comments Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Part 1. Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 1. Hardware Technology . . . . . . . .
1.1 How Do You Build a Graphics Adapter? . .
1.1.1 The Chips . . . . . . . . . . . . . . . . . . . . .
1.1.2 Typical Graphics Adapter Functions .
1.1.3 A Look at the GXT3000P Design . . .
1.2 Different Classes of Graphics Adapters . .
..
..
..
..
..
..
.
.
.
.
.
.
..
..
..
..
..
..
.
.
.
.
.
.
..
..
..
..
..
..
.
.
.
.
.
.
..
..
..
..
..
..
. . . . . . . . . . .3
. . . . . . . . . . .3
. . . . . . . . . . .3
. . . . . . . . . . .3
. . . . . . . . . . .6
. . . . . . . . . . .9
iii
..
..
..
..
..
..
..
.
.
.
.
.
.
.
..
..
..
..
..
..
..
.
.
.
.
.
.
.
..
..
..
..
..
..
..
.
.
.
.
.
.
.
..
..
..
..
..
..
..
..
..
..
..
..
..
..
.
.
.
.
.
.
.
. . . . . . . 28
. . . . . . . 29
. . . . . . . 31
. . . . . . . 32
. . . . . . . 33
. . . . . . . 33
. . . . . . . 34
iv
..
..
..
..
.
.
.
.
..
..
..
..
.
.
.
.
..
..
..
..
..
..
..
..
.
.
.
.
..
..
..
..
.
.
.
.
..
..
..
..
.
.
.
.
. 61
. 61
. 61
. 64
.
.
.
.
..
..
..
..
.
.
.
.
..
..
..
..
..
..
..
..
.
.
.
.
..
..
..
..
.
.
.
.
..
..
..
..
.
.
.
.
..
..
..
..
..
..
..
..
.
.
.
.
..
..
..
..
.
.
.
.
..
..
..
..
. 115
. 115
. 115
. 116
8.3 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.3.1 Filesets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.3.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.3.3 Demo Programs, Sample Source Code and Utilities . .
8.4 Overview of Programming . . . . . . . . . . . . . . . . . . . . . . . . .
8.4.1 Header Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.4.2 Link Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.4.3 Sample Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.5 GL 3.2 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
..
..
..
.
.
.
.
.
.
.
.
.
. . . 117
. . . 117
. . . 118
. . . 119
. . . 124
. . . 125
. . . 125
. . . 125
. . . 127
vi
9.4.9 A Program with the GLX Library and the OpenGL Widgets .
9.4.10 A Program with the GLX Library . . . . . . . . . . . . . . . . . . . .
9.4.11 Overlay Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.4.12 xglinfo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.4.13 Debugging Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.5 Performance Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.5.1 Additional Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.5.2 Specific Implementation Notes . . . . . . . . . . . . . . . . . . . . . .
9.6 Comparison with Other 3D Graphics APIs . . . . . . . . . . . . . . . . .
9.6.1 Comparison with GL 3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.6.2 Comparison with graPHIGS . . . . . . . . . . . . . . . . . . . . . . . .
9.6.3 Open Inventor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.7 References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.7.1 OpenGL References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.7.2 Open Inventor References . . . . . . . . . . . . . . . . . . . . . . . . .
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
. 158
. 162
. 163
. 165
. 167
. 169
. 169
. 170
. 173
. 173
. 182
. 187
. 189
. 189
. 190
viii
Figures
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
ix
Tables
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
xi
xii
Preface
This redbook summarizes the graphics capabilities of RS/6000 systems and
discusses the various graphics adapters that can be installed, as well as the
APIs available.
We introduce the reader to graphic hardware and explain the terms used in
the announcement letter of graphics adapters. We describe graphics
adapters for the RS/6000 systems, including withdrawn graphics adapters.
We summarize the displays available to connect those graphics adapters as
well as the cables that are needed to connect those displays with the
corresponding adapters. We describe the various peripherals that can be
connected to an RS/6000 system to enhance the users interaction with the
applications.
We describe the 2D APIs (X11, motif and CDE) and provide answers to
frequently asked questions. We then describe the X Virtual Frame Buffer and
softgraphics and the APIs that let the software take the place of the hardware.
Then we describe in detail each API, so that the reader can knowledgeably
compare the four 3D APIs.
Finally, we discuss benchmark programs. We focus on the standard
benchmark from the Graphics Performance Characterization Group. We also
supply the latest results for all the IBM graphics adapters.
This redbook will be useful to sales people who have to propose a graphic
configuration and must choose among many adapters, peripherals and
software. This redbook can also be used as a reference for support people
who need to know the technical characteristics of graphics adapters and
which filesets to install to support various functions in a given environment.
xiii
Comments Welcome
Your comments are important to us!
We want our redbooks to be as helpful as possible. Please send us your
comments about this or other redbooks in one of the following ways:
Fax the evaluation form found in ITSO Redbook Evaluation on page 283
to the fax number shown on the form.
Use the electronic evaluation form found on the Redbooks Web sites:
For Internet users
For IBM Intranet users
http://www.redbooks.ibm.com
http://w3.itso.ibm.com
xiv
Part 1. Hardware
Antialiasing
Bit Planes
Bus Interface
Culling
Depth Cueing
Double Buffering
Flat Shading
Frame Buffer
Gamma Correction
Gouraud Shading
Hardware Colormaps
HLHSRemoval
Luminance
Motion Blur
Overlay Buffer
RAMDAC
Rasterizer
Rendering
RGB
Setup/BLIT unit
Stencil Buffer
Stereo
Texture Buffer
Underlay Buffer
Hardware Technology
Video Scaling
Window ID Buffer
Z-Buffer
Bus Interface
The interface between the accelerator and the system bus provides for a
64-bit, PCI revision 2.1-compliant, connection. The chip has dual command
input FIFOs, one for the current 3D API and the other for the 2D GUI. This
minimizes the need for synchronization of the accelerator during context
switches.
The interface also provides a high-function DMA (Direct Memory Access)
controller that the APIs can exploit. This controller can retrieve commands
from system memory and feed them to the 2D or 3D command FIFO. You can
even embed commands for the DMA controller itself in the stream to cause it
to automatically switch between the two FIFOs. The controller also performs
sub-image DMA blits whereby it extracts a small image from within a larger
one, striding across unneeded sections of the larger one as required. The
DMA controller uses scatter-gather techniques to access system memory so
that commands in memory or blitted images may be held in non-contiguous
memory addresses.
There is also an asynchronous frame buffer access path that bypasses the
rendering pipeline and allows the frame buffer to be read and written directly
without a context swap.
Lighting and Blit Chip
The lighting and blit chip accepts commands from the bus interface chip. It
processes blit commands by converting the incoming pixel data stream into
one of the native frame buffer formats. It then performs any required scaling
and distributes the data to the appropriate rasterizer chip.
This chip also accepts drawing commands and vertex data from the bus
interface chip. The vertex data can contain pre-vertex material definitions and
normals that are used to calculate the lit color of each vertex. The results
from the lighting calculations are passed to the rasterizer chips as vertex
colors. Unlike the blit commands and pixel data, drawing commands and their
associated vertex data are sent to all four rasterizer chips at the same time.
Rasterizer Chips
In order to maximize the performance of the GXT3000P, the four rasterizer
chips are designed to operate asynchronously during most operations. Each
rasterizer chip drives one fourth of the frame buffer interleaved on a
pixel-column by pixel-column basis. These chips contain most of the setup
and interpolation logic for rasterizing the drawing primitives. Each chip also
processes textures from its own copy of the texture memory so that there is
Hardware Technology
Pixel Format
Color Buffer A
32-bit color
16-bit color
alar
rlrr
8-bit index
Color Buffer B
B
R
rlrr
x
Stencil/Depth
B
glgr blbr
x
Auxiliary
The palette DAC is a customized version of the IBM RGB640 palette DAC
modified to accommodate the 3D-RAM interface and to support advanced
features used in engineering workstations. It has a 2Kx8 palette RAM for
each color band. This RAM can be used as eight independent 256-entry
palettes or partially subdivided into smaller 64-entry palettes for even more
independent palettes.
The palette DAC also has a gamma correction RAM table that can be
activated on a pixel-by-pixel basis. The window ID Byte that is scanned in
from the frame buffer is allocated as five bits to control the primary buffer and
the remaining three to control the overlay buffer. Thus, there can be up to 32
primary and 8 overlay window IDs concurrently on the screen. Each window
ID can independently select a pixel format and palette, enable gamma
correction, and select from A/B animation or left-eye/right-eye buffers. In
typical usage, many windows will share a common window ID, but a few will
make use of unique IDs. The large number of independent window IDs and
palettes minimizes the annoyance of color flashing when several applications
that use large color palettes are run concurrently.
Other features of this chip include a 10-bit monotonic DAC that is capable of
up to 160 MHz operation in this application and of even higher speeds in
other applications. The chip also provides both crosshair and 64x64 sprite
hardware cursors.
The DAC output is provided to the monitor through a standard DDC-2B
interface. Screen sizes of 1280x1024 at up to 85 Hz and 1024x768 at up to
120 Hz are supported. The 1024x768 at 120 Hz mode is well suited to stereo
display with a minimum of flicker. The stereo output is provided through a
VESA-standard mini-DIN interface.
With all this discussion about the IBM chips roles in the graphics accelerator,
we should add that they are implemented in IBMs 5sa (0.27 micron) and
SA12 (0.18 micron) silicon technologies. The seven IBM chips on the
GXT3000P Graphics Accelerator contain over forty million transistors and are
mounted in IBMs flip-chip Ceramic Ball Grid Array (CBGA) packages
providing them unparalleled performance and density.
Hardware Technology
There are three classes of graphics adapters. Their attributes can be roughly
described as follows:
10
Class I
2D & Entry-Level 3D
All computing and rasterization work is performed on the CPU. 3D
capabilities are achieved through use of the Softgraphics product.
Class II
Mid-Range 3D
These adapters provide hardware acceleration support for
antialiasing, texture mapping and rasterization. Geometry
processing (lighting & transformations) is done on the CPU.
Class III
High-End 3D
Hardware acceleration for rasterization and geometry processing
is off-loaded to Digital Signal Processors (DSPs) on the adapter
which, in turn, make use of custom rasterization chips.
11
12
The POWER Gt1b is FCC Class B-certified and supports both 1280x1024
and 1024x768 displays. The base configuration is 1-bit per pixel. VRAM
options allow the POWER Gt1b to be configured with 4-bits or 8-bits per
pixel. Note: Since the bandwidth of the POWER Gt1b is limited to a
maximum of 111 MHz pixel frequency, there may be a very slight difference
in fine graphics detail, though most users will not be able to see the
difference. The POWER Gt1b is functionally identical to the POWER Gt1
EXCEPT that the POWER Gt1b has been certified by the FCC for Class B
devices and therefore is more suitable for home use. Performance and
price remain the same for both adapters. The POWER Gt1 should be
chosen over the POWER Gt1b whenever home use is not an issue.
The Gt1B (#2803) was withdrawn in the U.S. on September 19, 1995.
13
Filled quadrilaterals
Color-expanded bit block transfer
16x16 pattern fill
Logical operations
Plane mask
64x64 three-color programmable hardware cursor
60 to 77 Hz refresh modes
Supports a variety of displays
Meets ISO 9241 Part 3 at 1280x1024 resolution on IBM POWERdisplays
16S, 16 and 19
Maximum of one POWER Gt1x per system can be installed
Its feature code was #4207, and it was withdrawn in the U.S. on September
19, 1995.
14
around the factory presets for the IBM Personal Computer family of
monitors.
Its feature code was #2657, and it was withdrawn in the U.S. on January 21,
1997.
15
16
Its feature code was #2768, and it was withdrawn in the U.S.,on September
19, 1995.
You can physically recognize the graphic adapters by the white sticker you
can find on the metallic frame. The sticker for this adapter shows: 1-9.
17
available as an upgrade from the POWER GXT150L on the 42W and 42T.
Softgraphics OpenGL is provided through optional software support.
Here are some of its characteristics:
Frame buffer: Double 8-bit (two 8-bit buffers)
Z-buffer: none (Z-buffer is implemented by Softgraphics)
Advanced hardware functions: T
Three color palettes, hardware window support
API support: Xlib, GKS, Display PostScript, OpenGL, graPHIGS, PEXlib
Maximum adapters per system: 1
Options: none
Its feature code was #2665, and it was withdrawn in the U.S. on July 18,
1997.
18
19
20
Gt4x 8-bit (#2790) - Double 8-bit (two 8-bit buffers); POWER Gt4x 24-bit
(#2791) - Double 24-bit (two 24-bit buffers)
Z-buffer: 24-bit
Overlay planes: Two
Advanced hardware functions: Dithering (8-bit), depth cueing, antialiased
lines, Gouraud shading, local lighting, NURBS
API support: Xlib, GKS, Display PostScript, GL, graPHIGS, PEXlib
Maximum adapters per system: One
Options:
The POWER Gt4 8-bit to 24-bit Upgrade (#2792) - Provides an
upgrade to a double 24-bit frame buffer for both the 8-bit POWER Gt4
and 8-bit POWER Gt4x. This upgrade requires one additional Micro
Channel slot.
POWER Gt4 Performance Upgrade (#2794) - Boosts the performance
of the Gt4 to that of the Gt4x and requires no additional Micro Channel
slots. This option is a daughter card which attaches to the adapter.
Monitor support:
6091-016 - 1280x1024 at 60Hz, 77 Hz
6091-19i - 1280x1024 at 60 Hz, 77 Hz
6091-019 - 1280x1024 at 60 Hz
6091-023 - 1280x1024 at 60 Hz
5081-016 - 1280x1024 at 60 Hz
Their feature codes were #2790, #2791, #2795, #2796 and they were
withdrawn in the U.S. on December 21, 1993.
You can physically recognize the graphic adapters by the white sticker you
can find on the metallic frame. The sticker for this adapter shows: 1-5.
Note
The 24-bit POWER Gt4i graphics adapter (feature #2713) and the 8-bit and
24-bit POWER Gt4xi graphics adapters (features #2711 and 2712,
described below) were announced in September 1993 and replace the
POWER Gt4 and POWER Gt4x (feature #2796, 2790 and 2791). The
enhanced adapters primarily improve the 3D performance of the original
adapters. These were withdrawn in the U.S. on October 25, 1996.
21
22
23
24
25
Dithering
Three hardware color maps
Monitor support
Resolution: 1024x768 or 1280x1024 (limitation to 1024x768 with
double buffer)
Refresh rates: 60 to 85 Hz
Capable of driving monitors that meet ISO 9241 Part 3 Specification
Its feature code is #2851.
26
240 and for Model F40 workstations. Coupled with IBMs implementation of
many of the industrys most popular application programming interfaces
(APIs), these accelerators are an excellent fit for todays most demanding 3D
graphics applications, such as mechanical design and analysis.
The GXT550P further establishes IBM as a leader in providing
price/performance solutions for a wide range of demanding customer
application requirements.
The GXT550P combines 3D rasterization with the strength of the latest
PowerPC microprocessors. This rasterization technology provides customers
with a cost-effective solution that delivers excellent 3D graphics acceleration
that scales with the PowerPC processor performance of the RS/6000
workstation.
The GXT550P provides hardware acceleration for OpenGL and PHIGS. IBM
is a leader in the industry by offering native support of OpenGL and PHIGS
on the same accelerator. These adapters accelerate advanced 3D graphics
functions, such as Gouraud shading, antialiasing, hidden surface removal,
depth-cueing and transparency. This helps enable your 3D applications to run
more quickly and interactively. For OpenGL, texture maps up to 1024x1024,
and a 64-bit accumulation buffer are also supported through software.
The GXT550P offers highly flexible frame buffers that can be dynamically
configured to provide a broad set of color and feature options. When using
OpenGL and PHIGS, the GXT550P supports 8-bit, 12-bit, and 24-bit
double-buffered color and also includes 8-bits of double-buffered alpha
buffers for more realistic transparency control. It provides 8-bit overlay
buffers, which enhance the speed of the Graphical User Interface (GUI), 8-bit
stencil buffers, and 24-bit Z-buffer for hidden surface removal operations.
The GXT550P graphics accelerator is a 32-bit PCI card that plugs into a
single PCI slot. It supports display resolutions of up to 1280x1024 and
1024x768 and refresh rates from 60 Hz to 85 Hz, including refresh rates that
comply with the ISO 9241 Part 3 ergonomic standard. When used with other
compliant components, including monitors, this standard provides improved
viewing, reduced flicker, reduced reflection, and sharper characters. These
features, coupled with IBMs powerful RS/6000 43P Models 140, 150, 240,
and Model F40 workstations, make the POWER GXT550P an ideal solution
for demanding 3D application needs.
Its feature code is #2855.
27
28
29
30
Setup/BLIT Unit
Adapter
Development
Codename
Class
Device
Name
GXT110
Brushy
iga0
devices.pci.3353c088.rte
devices.pci.3353c088.X11
devices.pci.3353c088.diag
iga*
devices.pci.33531188.rte
devices.pci.33531188.X11
devices.pci.33531188.diag
devices.pci.33531188.com
MVP
31
Adapter
Development
Codename
Class
Device
Name
GXT120P
Sagebrush
mga0
devices.pci.2b101a05.rte
devices.pci.2b101a05.X11
devices.pci.2b101a05.diag
GXT150M
Neptune
nep0
devices.mca.8f9a.rte
devices.mca.8f9a.X11
devices.mca.8f9a.diag
devices.mca.8f9a.ucode
GXT250P
GXT255P
SkyBlue
b10
devices.pci.14103c00.rte
devices.pci.14103c00.X11
devices.pci.14103c00.diag
GXT550P
Mint
II
mint0
devices.pci.14105400.rte
devices.pci.14105400.X11
devices.pci.1415400.diag
GXT800M
SuperMint
II
smint0
devices.mca.8f61.rte
devices.mca.8f61.X11
devices.mca.8f61.diag
GXT800P
SuperMint
II
smint0
smintdm0
devices.pci.14105e00.rte
devices.pci.14105e00.X11
devices.pci.14105e00.diag
GXT3000P
Sierra
II+
mtn0
devices.pci.14108e00.rte
devices.pci.14108e00.X11
devices.pci.14108e00.diag
32
Adapter
Max. # of
Colors
# of Color
Tables
Supports
Stereo
Maximum
Resolution
Supported
Gamma
Correction
Tables
GXT120P
256
No
1280x1024
No
GXT150M
256
No
1280x1024
No
GXT250P
256
No
1280x1024
No
GXT255P
16.7M
No
1280x1024
No
GXT550P
16.7M
Yes
1280x1024
No
Adapter
Max. # of
Colors
# of Color
Tables
Supports
Stereo
Maximum
Resolution
Supported
Gamma
Correction
Tables
GXT800M
16.7 Million
Yes
1280x1024
No
GXT800P
16.7 Million
Yes
1280x1024
No
GXT3000P
16.7 Million
Yes
1280x1024
Yes
Adapter
# of Bit
Planes
Frame
Buffer
Z Buffer
Overlay
Buffer
Stencil
Buffer
Window
ID
Alpha
Buffer
GXT120P
GXT250P
GXT255P
24
24
GXT550P
112
24+24
24
8+8
GXT800M
112
24+24
24
8+8
GXT800P
112
24+24
24
8+8
GXT3000P
128
24+24
24
8+8
Utility
Buffer
16
Hidden
Line
Antialiasing
Gouraud
Shading
Depth
Cueing
Texture
Mapping
Transparencies
Blur
Lighting
Video
Scaling
16-bit
Color
GXT550P
GXT800M
GXT800P
GXT3000P
33
2.2.13 Limitations
This table summarizes the connectivity and maximum number of adapters per
system and some possible limitations:
Table 6. Number of Slots/Max Number of Adapters
System
150M
800M
7012-397
1/1
3/11
7013-J50
1/1
7013-595
1/1
MVP
110P
120P
250P
255P
550P
800P
1/2
1/1
3/1
3000P
3/1
7015-R50
7017-S70
1/1
7017-S7A
1/1
7024-E30
1/2
1/11
7025-F40
7025-F50
1/2
1/11
1/2
1/13
1/2
7026-H50
1/2
4/11
1/2
7043-140
1/1
1/24
7043-150
7043-240
1/1
1/2
7043-260
1/24
1/24
1/12
1/46
1/46
1/46
1/15
1/3
1/2
1/2
1/12
1/46
1/46
1/46
3/12
2/11
3/12
1/1 2
1
Must be located in slot 3.
2
Must be located in slot 2.
3
Must be located in slot
4 Must be located in slot
5
Must be located in slot
6
3,4,5.
1,2.
2,3.
Must be located in slot 1,2,3,4,5.
Please refer to the PCI Adapter Placement Reference, SA38-0538, for
important information regarding permissible and optimum slot placement of
your PCI graphics adapters.
You should also be aware of the interaction with other PCI adapters in the
same bus with your graphics adapters. A particularly important point is the
performance degradation that may be seen by placing a 32-bit adapter in the
same bus as the 64-bit GXT3000P adapter.
34
35
36
37
38
GXT110P
GXT120P
GXT250P
GXT255P
GXT800M
GXT800P
GXT3000P
G52
Display
NS
NS
NS
P70/P200
4238
4238
4238
4238
P201
4237
4237
4237
4237
P72/P92/P202
Display
Display
Display
Display
6091-19I
NS
4239
4239
4217
PowerDisplay
4217
4239
4239
4217
GXT150M
GXT500P
GXT550P
GXT1000
7250
G52
NS
NS
NS
NS
P50 P72
4213
4213
NS
NS
P70 P200
4234
4240
4234
4234
P201
4234
4241
4234
4234
6091-19I
4214
4219
3252
3252
POWERdisplay 17
4214
4219
3253
3252
POWERdisplay 20
4214
4219
3253
3253
39
40
4.1 Mice
There are two pointing devices available for RS/6000 systems. The
announcement letter regarding those devices is #198-242.
3-Button Mouse
The 3-Button Mouse is a dynamic tracking pointing device which utilizes
opto-mechanical technology. Its resolution is 320 DPI, and a 2.74 meter (9
ft.) attachment cord is included. Its feature code is #6041
3-Button Mouse, Black
It is a 3-button dynamic tracking pointing device. It utilizes
opto-mechanical technology, has a resolution of 320 dpi, a 3-meter cable,
is stealth black color, and has standard 6-pin mini-DIN connection.
Its feature code is #8741.
41
42
US English, #103P
French, #189
Italian, #142
German/Austrian, #129
UK English, #166
Spanish, #172
Japanese, #194
Brazilian Portuguese, #275
Canadian French, #058
Belgian/UK-Flemish, #120
Belgian/French, #120
Swedish/Finnish, #153
Danish, #159
Bulgarian, #442
Swiss, French/German, #150
Norwegian, #155
Dutch, #143
Portuguese, #163
Greek, #319
Hebrew, #212
Hungarian, #208
Icelandic, #197
Polish, #214
Romanian, #446
Slovakian, #245
Czech, #243
Turkish, #179
Turkish, #440
LA Spanish, #171
Arabic, #238
Serbian-Cyrillic, #118
Korean, #413
Chinese/US, #467
French Canadian, #445
Thailand, #191
Russian, #443
Croatian, #105
US English ISO9995, #103P(EMEA)
Model
Programmable
Resolution
Tablet
Size
4-Button
Cursor
6-Button
Cursor
3-Button
Pen
011
1.279
inch
Lines
per
Small
Yes
Yes
No
012
1.279
inch
Lines
per
Large
Yes
Yes
No
021
2.540
inch
Lines
per
Small
Yes
No
Yes
Graphics Peripherals
43
44
resolution capability (2540 lines per inch, Model 011 = 1280). The 6093 Model
021 Tablet is capable of higher data rates (200+ points per second, Model 011
= 100) and has better connectivity (fewer cabling options).
The 6093 Model 021 Tablet is a follow-on product to the 6093 Model 011
Tablet. The Model 021 Tablet is 8x10.5 inches, with a 4x5 inch active area.
The Model 021 is only supported on AIX Version 4.1.5, 4.2.1, 4.3, or later. It is
functionally compatible to the Model 011, such as a cursor with a four-button
physical layout, and an interface having 8-pin mini-DIN and microcode
compatibility. The Tablet has an attached (non-removable) cable, with an
8-pin mini-DIN connector for attachment to the system tablet port.
Its features include:
One selectable feature from:
Feature #1511 Four Button Cursor
Feature #6351 Stylus (pen) with a tip switch and two side buttons
Optional features include:
Feature #4030 Serial Port Cable Kit for attachment to 25-pin
connectors.
Feature #5999 Stealth Black Color Selection for Covers: selects the
stealth black color for covers. If this feature is not selected, the default
cover color is pearl white. This feature is not available on Models 011
and 012.
Graphics Peripherals
45
46
1. Attach the graphics tablet to either the tablet port or to the serial ports of
your machine. The tablet port is not available on all machines. When a
tablet port is present, it is located next to the mouse and keyboard ports.
On some systems, the tablet port is labeled with a T. If the graphics tablet
is attached to a serial port, you may need to add a tty to the system. To
add a tty:
1. Enter smit devices:
2. Select TTY.
3. Select Add a TTY.
4. Select the serial port to which the graphics tablet is connected.
5. Install the following device-dependent software package for the
graphics tablet. Its name is AIXwindows Graphics Input Adapter
Software, and the file is devices.mca.edd5
6. Also install the co-requisite software for the AIXwindows Serial
Graphics Input Adapter. The name of the file is devices.serial.gio.
Graphics Peripherals
47
If a Micro Channel expansion slot is available in the RS/6000, you can order
the Graphics Input Device Adapter (feature code 2810) and appropriate
signal cables (feature code 2811). The dials and LPFK each need a signal
cable.
Since the Graphics Input Device Adapter supplies power, no additional power
supplies or auxiliary Power cables are needed.
If a Micro Channel expansion slot is not available in the RS/6000, separate
power supplies are needed. For the 6094-010 dials and the 6094-020 LPFKs
please order from the following feature codes (order one per peripheral).
Feature #4063 100 volt power supply
Feature #4064 120 volt power supply
Feature #4065 220/240 volt power supply
48
Graphics Peripherals
49
The cable that can accept power cord and plug into serial port on
workstation
The first step is to put the hardware together; the LPFK should light when the
DIN cable is plugged in last. You may need small black cable on the 5xx
workstation to get to the 25 pin D-shell.
Use SMIT to add a tty:
Choose the parent from the list corresponding to the port you plugged the
device into.
Select the port number (it can be either s1 or s2).
The terminal type is dumb.
Disable login.
Default /etc/getty.
Start the 5080 emulator with the parameter -ttyl ttyLpfkNum for example
-ttyl 0 (for tty0 or 1 for tty1) or add the following X resource:
Soft5080.ttyLpfk: 0
The LPFK should light when moved into the emulator window.
50
Graphics Peripherals
51
Limitation: Diagnostics for the 6094 dials and 6094 LPFK cannot be
executed from a diskette when feature #4060 is installed.
However, disk-based (hardfile) diagnostics for the 6094 dials and 6094
LPFK can be executed after these devices have been configured.
Once a standard serial port has been configured to support the 6094 dials
or the 6094 LPFK, the remaining standard serial port will support only a
6094 dials or 6094 LPFK.
(#4061) - 6094/RS/6000 Serial Attachment Display Power Cable:
This feature allows the connection of 6094 dials Model 010 to the power
source provided by the 5081, 6091, or POWERdisplay 16 or 19 Monitor.
The IBM POWERdisplay 16-inch monitor has an actual, viewable screen
size of 14.8 inches when measured diagonally. The IBM POWERdisplay
19-inch monitor has an actual, viewable screen size of 17.3 inches when
measured diagonally. This feature is a dual power connection cable. Only
one feature #4061 is necessary for each RS/6000 POWERstation.
NOTE: If your RS/6000 POWERstation configuration already includes a
Serial Attachment Power Cable, no further order for feature #4061 is
required.
(#4063) - RS/6000 Serial Attachment 100 Volt Power Supply:
This feature is a 100 Volt Power Supply that provides power through the
serial attachment cable to the 6094 peripheral. This feature is only to be
used to power the 6094 Peripheral from a facility 100 volt power source.
Quantity: One power supply is needed for each 6094-010 or 6094-020
Peripheral when the Serial Attachment Display power cable (#4061)
cannot be used.
(#4064) - RS/6000 Serial Attachment 120 Volt Power Supply:
This feature is a 120 Volt Power Supply that provides power through the
serial attachment cable to the 6094 peripheral. This feature is only to be
used to power the 6094 Peripheral from a facility 120 volt power source.
Quantity: One power supply is needed for each 6094-010 or 6094-020
Peripheral when the Serial Attachment Display power cable (#4061)
cannot be used. Maximum: Two (2) per workstation. Limitations: See
Limitations. Cable Orders: None. Field Installable: Yes. Prerequisites:
None. Co-requisites: For RS/6000 orders, Serial Attachment Cable
(#4060). Customer Setup: Yes.
(#4065) - RS/6000 Serial Attachment 220/240 Volt Power Supply:
This feature is a 220/240 Volt Power Supply that provides power through
the serial attachment cable to the 6094 peripheral. This feature is only to
be used to power the 6094 Peripheral from a facility 220/240 volt power
52
Graphics Peripherals
53
Used to connect the 6094-020 LPFK to the Serial Port of the IBM PS/2
system and/or to the Async Communications Adapter of the IBM PC or
PC-XT.
Attachment Cable (P/N 39F8229):
Used to connect the 6094-020 LPFK to the Dual Async Adapter of the IBM
PS/2 system and/or the Serial Parallel Adapter of the IBM PC-AT.
Power Supply (P/N 74F3089):
100 volt power supply that must be used in conjunction with an attachment
cable when attaching the 6094 to any model of the IBM PS/2 or RS/6000
POWERstation.
Power Supply (P/N 6247468):
120 volt power supply that must be used in conjunction with an attachment
cable when attaching the 6094 to any model of the IBM PS/2 or RS/6000
POWERstation.
Power Supply (P/N 6247469):
220/240 volt power supply that must be used in conjunction with an
attachment cable when attaching the 6094 to any model of the IBM PS/2
or RS/6000 POWERstation.
Power Supply (P/N 6247470):
220/240 volt power supply that must be used in conjunction with the
attachment cable when attaching the 6094 to any model of the IBM PS/2
or RS/6000 POWERstation to be used in the United Kingdom.
Diagnostic Diskette (P/N 39F8224):
3.5-inch diagnostic diskette that MUST be used when attaching the
6094-020 LPFK to any model of the IBM PC or PS/2 with a 3.5-inch disk
drive.
Diagnostic Diskette (P/N 39F8225):
5.25-inch diagnostic diskette that MUST be used when attaching the
6094-020 LPFK to any model of the IBM PC with a 5.25-inch disk drive.
54
Graphics Peripherals
55
56
4.7 Magellan
The 6094-600 Magellan is a 3D input device that allows simultaneous, six
degrees of freedom control with one hand. It is used to help view a
computer-generated object or model from any angle. It unifies the features of
a conventional 2D mouse with those of a device for interactive motion control
of 3D graphics in up to six degrees of freedom. The Magellan units are
serially attached through the serial ports and conform to the RS-232
architecture. Magellan is fully described in announcement letter #197-278.
Figure 8. Magellan
There are two elements that you need to take advantage of a stereographics
environment:
A graphic adapter capable of output in stereo mode. Table 3 on page 32
provides the list of adapters supporting stereo mode.
Graphics Peripherals
57
Active shutter glasses that alternately block the view for one eye and then
the other as the image is drawn. The application must be written to take
advantage of this functionality. IBM does not sell these glasses. See
http://www.stereographics.com for details regarding this device.
58
Part 2. Software
59
60
5.1.1 Configuration
When you set up your system, the installation process will automatically
detect any graphic adapter installed on your system and add the correct
filesets to drive this adapter, as well as the base filesets to obtain the
graphical environment. The default is to have this graphical environment at
boot time. Lets see now what files are included in the filesets for this 2D
environment and their associated functions so you will know which one to
install if you want to add new functions.
5.1.1.1 Filesets
Here is the description for the filesets associated with the 2D graphical
environment:
X11.Dt Includes all the components for the CDE environment. The minimal
installation includes:
X11.Dt.ToolTalk AIX CDE ToolTalk Support
X11.Dt.bitmaps AIX CDE Bitmaps
X11.Dt.helpmin AIX CDE Minimum Help Files
X11.Dt.helprun AIX CDE Runtime Help
X11.Dt.libAIX CDE Runtime Libraries
X11.Dt.rteAIX Common Desktop Environment (CDE) 1.0
61
X11.Dt.xdt2cde
X11.Dt.adt
X11.Dt.compat
X11.adt
X11.adt.bitmaps
X11.adt.ext
X11.adt.imake
X11.adt.include
X11.adt.lib
X11.adt.motif
X11.apps
X11.apps.clients
X11.apps.config
X11.apps.custom
X11.apps.msmit
X11.apps.rte
X11.apps.aixterm
X11.apps.xterm
X11.apps.util
62
X11.apps.pm
X11.apps.xdm
X11.apps.pcmcia
X11.base
X11.compat
X11.fnt
X11.fnt.coreX
X11.fnt.defaultFonts
X11.fnt.iso1
X11.fnt.util
X11.fnt.iso3
X11.fnt.iso4
X11.fnt.iso5
X11.fnt.ibm
X11.fnt.iso7
X11.fnt.iso8
X11.fnt.iso9
X11.fnt.Gr_Cyr_T1
X11.fnt.ibm1046_T1
X11.fnt.iso_T1
X11.fnt.iso8_T1
X11.fnt.ksc5601.ttf
X11.fnt.ucs
X11.info
63
X11.samples
X11.samples.lib.Core
X11.samples.common
X11.samples.apps.aixclients
X11.samples.apps.clients
X11.samples.apps.demos
X11.samples.apps.motifdemos
X11.samples.doc
X11.samples.ext
X11.samples.fnt.util
X11.samples.rgb
X11.vfb
X11.vsm
64
# lsdisp
DEV_NAME
========
iga0
gga0
Adapter
SLOT
====
C0
01
BUS
===
pci
pci
ADPT_NAME
=========
E15
S15
DESCRIPTION
===========
E15 Graphics Adapter
IBM Personal Computer Power Series S15 Graphics
The chdisp command allows to change the default graphic adapter. In our
case the default graphics adapter is the IBM Personal Computer Power
Series S15 adapter. If we decide that we want to change that to the E15
adapter, we use the chdisp command, and we can also decide if we want to
change adapters for this session only and get back to the S15 adapter after
this session, or if we want to pick the E15 graphic adapter but only after
reboot, and that is the role of the -d and -p options.
65
# chdisp -help
Usage: chdisp [-dDeviceName] [-pDeviceName]
Changes the default display.
-d Changes the default display for this session.
-p Changes the default display in the database. This
is effective at the next IPL.
DeviceName is the logical name of the display. This is
the name in the first column of output of the lsdisp command.
# chdisp -p iga0
# lsdisp
DEV_NAME
========
iga0
gga0
Adapter
SLOT
====
C0
01
BUS
===
pci
pci
ADPT_NAME
=========
E15
S15
DESCRIPTION
===========
E15 Graphics Adapter
IBM Personal Computer Power Series S15 Graphics
Finally, the chdisp command should run from the lft, but redirecting the input
allows you to use this command from any session.
# chdisp
chdisp: 0468-002 Run this command only at an LFT workstation.
# chdisp < /dev/lft0
Usage: chdisp [-dDeviceName] [-pDeviceName]
Changes the default display.
-d Changes the default display for this session.
-p Changes the default display in the database. This
is effective at the next IPL.
DeviceName is the logical name of the display. This is
the name in the first column of output of the lsdisp command.
The next part of the question may be, "How do I start my X server on one
screen rather than the other or on both at the same time?" The default with
the latest versions of AIX starts the X server on every screen connected to
the system, and the mouse crosses the screen limits seamlessly. From AIX
Version 4.2.1, the CDE window manager is able to display a front panel on
each of the screen parts of the X server (refer to AIX Version 4.2 Differences
Guide, SG24-4807). So, the real question is now how to start the server on
only one screen. The answer is to use the -P option of the X command that
allows you to organize your screens as a matrix of rows and columns; then
you access each screen by row and column number. If you want to define
only one screen, choose a matrix with one row and one column and add the
66
-P11 display name to the command line. Here is as example of how to start
If you are using CDE, you will have to modify the X servers file in the
/etc/dt/config directory to add this -P option.
5.1.2.2 How Do I Change My Display Resolution?
The resolution you can obtain on your screen depends on two factors: the
graphic adapter on your system and the display itself. In order to specify the
maximum resolution for your adapter, you first have to specify the type of
display you are using. Use smit chdisptype to associate your display with its
graphic adapter.
67
Then, you can use smit chres_refrt to select the best resolution and refresh
rate.
Even if you can run this command from any session, you will have to quit and
reenter the graphical environment for the changes to take effect. Within CDE,
that implies logging out of your CDE session and clicking on the Reset Login
Screen menu under the Options button.
5.1.2.3 How Do I Specify if I Want a Graphic Login Screen?
Within AIX, you can decide whether you will have a graphical environment at
boot time and if you want a graphical login screen (with CDE) or if you want to
keep the regular ASCII screen. Use the smit dtconfig command to customize
your environment.
68
/usr/lpp/X11/bin/loadAbx
69
If you specify an extension which is not installed, the X server will not start.
After the X server has started, you can use the xwininfo command to see
which extensions are really loaded.
5.1.2.5 How Do I Configure My CDE Login Screen?
Figure 13 is an example of the default CDE login screen in AIX Version 4.3.2.
You may decide that you want to customize this screen with your own logo or
text. This is done by modifying the X resources file. The template for this file
is located in the /usr/dt/config/$LANG directory. Copy this file into
/etc/dt/config/$LANG directory and change the entries that command the logo
file name, color, fonts, or message.
For example, to change the logo, modify the resource:
Dtlogin*logo*bitmapFile: < your file name location >
Note
The file name that you specify for the logobitmapfile name must contain a
valid pixmap. One of the easiest ways to create such a file is to use the
icon editor included with CDE. You can display any image on the screen
and then grab this image from the icon editor. The last step is to save that
image into the desired location.
70
The resulting CDE login screen could look like the following figure:
/usr/lpp/X11/defaults/Xdefaults
71
/usr/lib/X11/$LANG/app-defaults/Xdefaults
/usr/lib/X11/app-defaults/Xdefaults
/usr/lpp/X11/defaults/Aixterm
/usr/lib/X11/$LANG/app-defaults/Aixterm
/usr/lib/X11/app-defaults/Aixterm
72
$HOME/$LANG/Aixterm
$HOME/Aixterm
$HOME/$LANG/aixterm
$HOME/$LANG/.Xdefaults
$HOME/.Xdefaults
$HOME/$LANG/.Xdefaults-displayname
$HOME/.Xdefaults-displayname
$XENVIRONMENT
73
74
75
76
U456096 - OpenGL.OpenGL_X.dev.vfb.4.3.1.1
U456079 - OpenGL.OpenGL_X.rte.soft.4.3.1.1
6.1.1.5 AIX 4.3.2
XVFB on AIX 4.3.2 is installed from the AIX 4.3.2 product CDs. Install the
following filesets:
OpenGL.OpenGL_X.dev.vfb.04.03.0002.0000
X11.vfb.04.03.0001.0000
This will start up the X server without using the graphics adapter if it is
present as well as load the OpenGL extensions to the X server.
You can also use the xinit command which will not only start the X server but
also the window manager.
/usr/bin/X11/xinit -- -force -vfb -x abx -x dbe -x GLX
You can also add the -vfb flag to the EXTENSIONS line in your .xserverrc file.
If you desire to have the XVFB effective at system boot, the system
administrator can add an entry in the /etc/inittab file. The following entry will
cause the X server to be started at system boot time as well as cause it to be
restarted automatically if the server ever exits or dies.
xvfb:2:respawn:/usr/bin/X11/X -force -vfb -x abx -x dbe -x GLX
>/dev/null
You can run more than one X server at the same time, with the following
restrictions:
No COSE Desktop
Only a single instance of the XVFB X server
Only a single instance of the X server running to a graphics adapter
If you have a system with a graphics adapter, and you want to run an XVFB X
server and an X server to your graphics adapter, do the following:
Start your X server to the graphics adapter:
xinit
77
3. On the other system, make sure X is running and that clients can connect.
xhost +
You should see an image of the xclock you started on the XVFB system
appear on the other system.
78
79
Applications can also check for the value of the XVFB_SCREEN property in order
to determine if they are running with the XVFB. The following code shows
how this can be done:
int isXVFB(Display *display,Screen screen)
{
Atom atom,actual_type;
int actual_format,status;
unsigned long nitems,bytes_after;
unsigned char *prop;
atom = XInternAtom(display,"XVFB_SCREEN",True);
if (atom == None)
return False;
status = XGetWindowProperty(display,RootWindow(display,screen),
atom,0,100,False,atom,&actual_type,&actual_format,&nitems,
&bytes_after,&prop);
if (strcmp((char*)prop,"TRUE") == 0)
return True;
return False;
}
80
In addition, input devices in the XVFB environment are not required. Since
you cannot see the frame buffer, moving the mouse around and typing on the
keyboard are not very useful. Rendering server applications instead will be
driven remotely, either with direct socket communication, interaction with an
HTTP server, through CORBA connections, message passing interface
(MPI), and so on. Most applications need modifications in order to be
controlled remotely for a rendering server environment.
OpenGL is currently supported with the XVFB; however, PEX, GL 3.2 and
graPHIGS are not supported. For additional information point, your Web
browser at:
http://www.rs6000.ibm.com/solutions/interactive/rendserv.html .
81
The CATweb rendering unlock will be taken into account at the next CATweb
connection.
82
application. When it comes time to render a new image, the application draws
to its private rendering area. If two CATweb clients request new images at
exactly the same time, each of the 3D rendering applications can draw new
images concurrently, each to their own private rendering area. Since multiple
3D rendering applications can draw concurrently, multiple CPUs can be
exploited concurrently. Without DSO and XVFB, the 3D rendering
applications are drawing to a physical, shared frame buffer, which means
they must take turns and operate serially. With each 3D rendering application
taking turns to draw, only a single CPU can be effectively exploited.
If you are using an OpenGL application with DirectSoft OpenGL and XVFB,
the testing scenario with xwd and xwud discussed earlier in this chapter will not
work. This is because, to increase performance, the default OpenGL
DirectSoft behavior does not blit the contents of the private frame buffer to
the X Virtual Frame Buffer. This behavior will be fine for most OpenGL
rendering server applications since the image will be queried from the private
frame buffer using glReadPixels. So, using xwd and xwud just grabs the
contents of a blank window.
To verify that DirectSoft OpenGL is working, set the
_OGL_MIXED_MODE_RENDERING environment variable to 1, and then run your
OpenGL application. This will force OpenGL to actually blit the rendered
image from the private software frame buffer to the X Virtual Frame Buffer.
Once this is done, you can once again use xwd and xwud to grab and dump
the contents of your OpenGL window. Note: It is recommended that you do
not keep this environment variable set all the time, since this will slow the
overall operation of DirectSoft OpenGL.
Applications can determine if they are using DirectSoft OpenGL by checking
the OpenGL rendering string (glGetString), and checking the OpenGL context
(glXIsDirect). The following code can be used:
int isDirectSoftOpenGL(Display *display,GLXContext context)
{
if (glXIsDirect(display,context) == FALSE)
return FALSE;
if (strcmp(glGetString(GL_RENDERER),"SoftRaster") == 0)
return TRUE;
return FALSE;
}
83
6.3 Softgraphics
Traditionally, 3D graphics APIs were implemented using specialized graphics
hardware. In this kind of API implementation, all 3D operations are performed
on the graphics adapter. The graphics adapter offers frame buffers, additional
specialized buffers, graphics processing power, a specialized graphics
pipeline, and hardware-implemented algorithms. Geometry processing as
well as raster processing is done on the graphics adapter. This creates
applications that are strongly dependent on certain functions provided by
certain graphics hardware. Two things changed over time in the world of
technical workstations:
The power of workstation CPUs increased and entry-level workstations
started requiring 3D graphics capabilities because technical workstations
were now used for a wide variety of different types of applications.
Technically, highly specialized graphics hardware could be replaced with a
simple frame buffer adapter plus a strong CPU, system memory and
software.
But this requires a different kind of 3D API implementation. Specialized
graphics operations formerly done in hardware can now be done in software.
The API software implementation works as a glue between the application
code and the hardware. This allows you to utilize the CPU capacity and also
allows applications to be hardware independent. It offers consistent graphics
functions across all graphics adapters independent of their specific
capabilities. It therefore offers integration across hardware products.
84
85
86
Chapter 7. graPHIGS
This chapter describes the IBM graPHIGS product, which is one of the two
major 3D graphics rendering APIs (Application Programming Interfaces)
supported by AIX (PHIGS for AIX 4.3 is included in AIX Version 4.3).
The graPHIGS API is IBMs implementation of the ISO/ANSI Programmers
Hierarchical Interactive Graphics System (PHIGS) standard, which includes a
subset of the PHIGS PLUS extensions (such as independent lighting and
shading controls, advanced primitives, and extended rendering attributes) as
well as IBMs own extensions. The graPHIGS API is supported on the IBM
Enterprise Systems and the RS/6000 computers equipped with 2D or 3D
adapters.
7.1 Definition
To better understand the graPHIGS API, it is necessary to introduce its
predecessors: Core, GKS and PHIGS.
87
7.1.2 graPHIGS
IBMs implementation of the PHIGS standard is called graPHIGS and is
available on all graphics adapters for the RS/6000 as well as on some
Enterprise Systems platforms. Additionally, the graPHIGS API contains
extensions beyond the PHIGS and those of the proposed PHIGS PLUS
standards.
This graphics software contains a suite of advanced graphics functions for
developing complex 3D applications in technical and commercial areas,
including computer-aided design and manufacturing, industrial design,
engineering analysis, and scientific visualization.
For 3D graphics applications, the PHIGS product provides interoperability in
networked heterogeneous environments. This client/server implementation
allows you to increase productivity by distributing your 3D applications
between workstations and computer servers.
The IBM PHIGS product includes the graPHIGS API and ISO PHIGS
language bindings as well as the Graphical Kernel System-Compatibility
Option (GKS-CO), which is an extension to the graPHIGS API.
The advantages that give PHIGS its popularity are:
Wide range of graphics functions - from the simple geometry to the
sophisticated rendering of complex surfaces
Interoperable across platforms - designed on open API standards to be
fully portable
Multi-threaded graphics pipeline - increases selected application
performance by utilizing multiple processors simultaneously without
recompilation
Easy to use - includes example programs, application development tools,
and online hypertext information
Though many graPHIGS applications have migrated to OpenGL, the
graPHIGS API is still widely used, not only for CATIA but also for many
customers private applications.
Although the strength of graPHIGS is retained mode graphics, graPHIGS has
been extended to provide immediate mode capabilities. For an explanation of
these terms, see:
88
graPHIGS
89
graPHIGS API
Application
Shell
(client)
Nucleus
(server)
Display Control
Application
Application
Process 1
graPHIGS
shell 1
Application
Process 2
graPHIGS
shell 2
Application
Process 3
graPHIGS
shell 3
90
graPHIGS
nucleus
(server)
Polygons
Advanced primitives:
Triangle strips
Quadrilateral meshes
Concave and multi-contour polygons
Non-Uniform Rational B-Spline (NURBS) curves
Trimmed and untrimmed NURBS surfaces
Line-on-line highlighting
User-defined clipping volumes
Antialiased primitives
Transparency
Dithering
Morphing
Explicit traversal control (for immediate and mixed mode rendering)
Archiving
Conferencing
National language (font support):
Unicode standard
Traditional Chinese
Hangul (Korean)
Kanji (Japanese)
graPHIGS
91
92
graPHIGS
93
94
graPHIGS
95
Identifying the current workstation and setting its values (such as the color
table) to those required for your application. This includes viewing
information that controls the parts of visible graphical data and their
appearance on the display.
Define the displayed content:
Associating structures of graphical data with a workstation so that the
workstation can draw the objects. The display content is modified by
editing structures or changing the view tables used to display the graphical
data.
Accept user input:
This allows you to provide input to the application, typically to change the
displayed objects. For example, to change an object, a user might pick the
object, select a choice provided by the function keys, or indicate a point or
position using a tablet.
The graPHIGS API resources and facilities let you create a graphics
application to display objects that a user can modify interactively. Your
application can run in numerous environments, and inquiry subroutines
provide information that enable your application to adapt to different
hardware capabilities.
7.2.4 Subroutines
Types of subroutines available to your application include:
Control subroutines:
Provide the basic control functions. These allow your application to open
and close the graPHIGS API and allocate, share, control, and free
graphical resources.
Structure subroutines:
Provide control of structures, which are groupings of graphical elements.
You can create, delete and modify structures. Modifications include
changes to the whole structure content (such as emptying a structure)as
well as changes to the elements in the structures (such as deleting or
adding a single element in a structure).
Element subroutines:
Provide the basic drawing facilities. These include primitives (such as
lines, text, filled areas, curves, and surfaces) and their attributes (color,
size, and line type).
Workstation subroutines:
96
graPHIGS
97
Unique to graPHIGS is the fact that the XSOFT pipeline and rasterizer can
be used when there is no display hardware at all. The graPHIGS IMAGE
type workstation uses the graPHIGS Softgraphics routine to produce
hardcopy output for PostScript and IOCA (IBMs Image Object Content
Architecture) printer devices.
Performance:
Be aware that performance scales with the amount of CPU available.
Softgraphics graPHIGS may provide an entry-level production
environment on an RS/6000 43P 140 or 150 (with POWER GXT255P),
which is beyond the POWER GXT1000 level of performance for
applications like drafting. In the following table, PLBwire and PLBsurf
results show the 3D wire frame and solid surface performance,
respectively. The higher the number the better. For information of
performance benchmarking, see Chapter 11, Benchmarking on page
205.
Table 10. Example of Performance Results with Softgraphics
Machine
Type
Graphic
Adapter
Using
Softgraphic
PLBWire
PLBSurf
Comments
43P-150
GXT255P
178.6
75.4
on AIX 4.3.2
43P-133
GXT255P
91.5
31.9
older machine
AIX 4.1.5
42T
GXT1000-2
112.9
153.2
older 3D adapter
with AIX V4.1.5
42T
GXT500D
89.4
86.1
older 3D adapter
with AIX V4.1.5
98
XSOFT
XSOFT
workstation
workstation
X server
X server
with GP_MIT_SHM
extension
graPHIGS
nucleus
Bad Performance
graPHIGS
nucleus
Good Performance
On the Xstations, the X workstation type does not support lighting and
interpolated shading. The XSOFT workstation provides this support that
was not previously available. This configuration may be right for the
occasional or view-only user of an application, or for applications with low
frame rates or those that require minimal user interactions or user
interactions implemented entirely through X.
Applications also have the option to use the X workstation type to provide
interactive performance in the distributed environment and a second
XSOFT workstation to provide a more advanced rendering. This is
possible through the graPHIGS ability to share Structure Stores among
more than one workstation.
7.3.2 Hardware-Accelerated
All or part of the rendering to the graPHIGS API is done by the adapter
hardware and microcode. Section 1.2, Different Classes of Graphics
Adapters on page 9, describes the role of class II and III graphics adapters.
graPHIGS
99
7.4 Configuration
The PHIGS for AIX 4.3 product is included in Version 4.3 of AIX. The
installation of the filesets is done with the usual system administration tools,
such as SMIT.
100
7.4.1 Filesets
There are four filesets as follows:
PEX_PHIGS.graPHIGS.rte
PEX_PHIGS.dev
PEX_PHIGS.graPHIGS.adt
PEX_PHIGS.graPHIGS.fnt
The first two filesets must be installed to run any graPHIGS applications on
the system. To develop graPHIGS programs on the system, it is necessary to
install the graPHIGS Application Development Toolkit fileset.
7.4.1.1 graPHIGS Runtime Environment
The fileset PEX_PHIGS.graPHIGS.rte contains the following modules:
PEX_PHIGS.graPHIGS.rte.base Base Runtime Environment
This provides:
Runtime code under /usr/lpp/graPHIGS/bin/
Library files such as libgP.a under /usr/lib/ and /usr/lpp/graPHIGS/lib/
Geometric text fonts /usr/lpp/graPHIGS/fonts/afm0*.sym
Sample profile and X defaults file and an installation verification script
(runivp) under /usr/lpp/graPHIGS/etc/
An archive utility and a script to run it under, /usr/lpp/graPHIGS/bin/ and
/usr/bin, respectively
PEX_PHIGS.graPHIGS.rte.pipe
This provides command files for remote nucleus and scripts to run them
under /usr/lpp/graPHIGS/bin/ and /usr/bin/.
PEX_PHIGS.graPHIGS.rte.6098
6098 Support
This provides command files for 6098 with FDDI feature under /usr/bin/.
PEX_PHIGS.graPHIGS.rte.plot
Plotter Support
This provides configuration files and utilities for plotters under /usr/lib/lpd.
graPHIGS
101
GXT250P/GXT255P
PEX_PHIGS.dev.pci.14105400
GXT500P/GXT550P
PEX_PHIGS.dev.pci.14105e00
GXT800P
PEX_PHIGS.dev.pci.1410b800
GXT2000P (N.A.)
PEX_PHIGS.dev.pci.14108e00
GXT3000P
PEX_PHIGS.dev.mca.8f61
GXT800M
PEX_PHIGS.dev.mca.8fbc
GXT1000
PEX_PHIGS.dev.mca.8ee3
GT4
PEX_PHIGS.dev.buc.00004002
GXT500
This provides the graPHIGS fonts editor (fe), a sample debugger (gPdbg),
and a collection of slicing and contouring demo programs (sliceriso).
PEX_PHIGS.graPHIGS.adt.tutor
102
PEX_PHIGS.graPHIGS.fnt.KR
PEX_PHIGS.graPHIGS.fnt.SC_EUC
PEX_PHIGS.graPHIGS.fnt.TW
PEX_PHIGS.graPHIGS.fnt.uni
Unicode Fonts
7.4.2 Installation
Once SMIT has returned from the installation process, you should run the
verification script to make sure that you have a working environment.
7.4.2.1 The Installation Verification Script: runivp
Type in an aixterm or other terminal window with the DISPLAY variable
correctly set :
sh /usr/lpp/graPHIGS/etc/runivp
graPHIGS
103
7.4.2.2 xinit Options for GXT3000P, 800P, 550P, 550P, 1000, and 255P
The graPHIGS window must be created in the color planes (layer 0, while the
overlay planes layer is 1). For the best performance, it is recommended that
the X root window be created in the overlay planes.
If the X and graPHIGS windows are both created in the color planes,
manipulating the X window causes an exposure event, and more graPHIGS
redraws may occur. On the other hand, if X starts in the overlay planes, there
will be fewer exposure events, and fewer graPHIGS are needed.
Starting X in the overlay planes is only available when the application
specifies one of the supported visuals for the color planes and uses it to
create the graPHIGS window. If the application does not specify visual to
graPHIGS window, graPHIGS uses the visual associated with the root
window and X should then be started in the color planes in this case.
Therefore, the necessary options for the xinit command should be chosen
accordingly:
For GXT3000P, 800P, 550P, 550P, 1000:
If the application specifies supported visuals for the color planes and
uses it to create the graPHIGS window, type:
104
For GXT255P:
Almost the same as the above, but the -x abx option should not be
specified.
The extensions -x dbe and -x abx can also be specified to the environment
variable EXTENSIONS in /usr/lpp/X11/defaults/xserverrc file. If the OpenGL
product is also installed on the same machine, these extensions may already
be specified in this file.
If you use the CDE, modify the last line in /usr/dt/config/Xservers to specify
command line options to xinit, such as -layer 0 or -d 24. The line is
originally:
:0 Local local@console /usr/lpp/X11/defaults/xserverrc -T -force :0
graPHIGS
105
EXTENSIONS=""
to
EXTENSIONS="-x gpshm"
106
About the detail of this file, see Chapter 7. Controlling the Environment with
Defaults and Nicknames in The graPHIGS API: Technical Reference,
SC33-8193.
7.4.2.5 $(HOME)/.Xdefaults
graPHIGS is the default application name of graPHIGS application in X
Window System. Using the application name, in the .Xdefaults file in your
$HOME directory, you can define resources for your graPHIGS application
such as the initial position, initial size, window title, icon name, icon bitmap,
minimum aspect ratio, maximum aspect ratio, minimum window size, window
border color, and the window border width.
Entries in the .Xdefaults file to force the window to be a square of 500 pixels
located in the upper-left corner and have My Title in the title bar would look
like this:
graPHIGS.geometry: 500x500+0+0
graPHIGS.title:
MyTitle
Figure 21. A Sample of $HOME/.Xdefaults
Then, the entries in the .Xdefaults file in your $HOME directory would look
like this:
MyName.geometry: 500x500+0+0
MyName.title:
MyTitle
Figure 23. Another Sample of $HOME/.Xdefaults
Resource Name
Description
geometry
Initial Window
Geometry
graPHIGS
107
Resource Name
Description
minSize
100x100
title
Window Title
Blank Title
iconName
Icon Name
iconBitmap
No icon bitmap
aspectMinimum
None specified
aspectMaximum
None specified
With the following definitions, the graPHIGS window keeps a square shape
when it is resized:
graPHIGS.aspectMinimum:
graPHIGS.aspectMaximum:
1x1
1x1
After you have edited your $HOME/.Xdefaults file, execute the xrdb command
to reload the file as follows:
xrdb $HOME/.Xdefaults
If you would like to remove the window title bar and the window resize frame,
add the following line in $HOME/.Xdefaults; then restart the Motif window
manager or CDE window manager:
(for Mwm) Mwm*graPHIGS*clientDecoration: none
(for CDE) Dtwm*graPHIGS*clientDecoration: none
If you need to resize the frame, replace none with resize in the above lines.
7.4.2.6 SYSPRINT
The name SYSPRINT is often used as the name of error log file where the
graPHIGS API outputs error messages. You can change this to your favorite
name through GPOPPH() subroutine as follows:
GPOPPH(SYSPRINT,0);
This file helps with debugging the application. The graPHIGS API does not
overwrite this file; that is, if this file exists, it adds messages to the file.
The following is an example of what an error message looks like:
Mon Nov 16 hh:mm:ss 1998 GPOPWS*AFM2047 XOPENDISPLAY FAILED - CHECK THE
GRAPHIGS CONNID.
108
This line contains the date and time, the name of the API subroutine
associated with the error, the message identifier with string AFM followed by
a four-digit message number, and the message text which briefly explains the
error.
With the message identifier, you can look for the detail information in The
graPHIGS API: Messages and Codes, SC33-8196. There you will find an
explanation of the error and description of system action and programmer
response as follows.
2047
graPHIGS
109
However, the descriptions in this book are fortran like and it is necessary to
be careful whether the type of an argument is a number or a pointer if you
write a program in C.
To learn more technical details, such as information about the integration with
X or lists of contents of workstation description table, see The graPHIGS API:
Technical Reference , SC33-8193.
gPOpengraPHIGS
GPPL3
gPPolyline3
GPQWDT
gPInquireWorkstationDescription
These long names match the titles in the subroutine reference pages, such as
Open PHIGS, Polyline 3, Inquire Workstation Description. And, for example,
the following enumeration is used to define those arguments:
/*-- gP_istyle Interior Style -- */
typedef enum {
GP_HOLLOW = 1;
GP_SOLID,
GP_PATTERN,
GP_HACTH,
GP_EMPTY,
GP_ISTYLE_INVALID = 0x7fffffff
} gP_istyle;
110
Before you get familiar with graPHIGS subroutines, here is an easy way to
find out a brief description for each subroutines:
grep GPXXXX /usr/include/afmgp.h
Then, you can replace the short names with the corresponding long names in
your sample or existing application source code to make it easier to read.
graPHIGS
111
112
graPHIGS
113
114
Chapter 8. GL 3.2
This chapter describes the GL 3.2 API and IBMs implementation for AIX.
This API has almost become obsolete as a 3D graphics API since OpenGL
has taken its place in the industry. AIX Version 4.3.2 still supports this API for
all previous 3D graphics adapters, but the GL 3.2 API should not be
implemented in the graphics pipeline for the latest POWER GXT3000P.
IBM encourages GL 3.2 customers to migrate to OpenGL.
8.1 Definition
The Graphics Library (GL) API is a 3D API which was developed by Silicon
Graphics, Incorporated (SGI) as a proprietary API for use on their graphics
platforms. This API has been licensed to IBM and several other vendors. It
was once very popular and used by many independent software vendors and
was the basis for their 3D applications.
The strength of GL is immediate mode graphics. See 9.1.1, Immediate Mode
Graphics on page 130, for an explanation of this term.
The biggest disadvantage of the GL API is that it does not provide
interoperability in heterogeneous networked environments, and it is not easily
portable even between the few platforms that support it.
For these reasons, and in response to the growing popularity of open
systems, SGI initiated an effort to standardize GL so that it could be easily
supported by multi-vendor platforms. This effort led to the development of an
open 3D API standard called OpenGL, see Chapter 9, OpenGL on page
129.
115
116
8.3 Configuration
OpenGL and GL 3.2 for AIX are standard features of IBM AIX Version 4.3,
while these has been offered as Licensed Program Products for IBM AIX
Version 4.2 or 4.1.
8.3.1 Filesets
The GL 3.2 products includes three filesets :
OpenGL.GL32.rte
OpenGL.GL32.dev
OpenGL.GL32.adt
GL Runtime Environment
GL Device Dependent Software
GL Application Development Toolkit
The first two filesets must be installed to run GL 3.2 applications on the
system. To develop GL 3.2 programs on the system, it is necessary to install
the GL Application Development Toolkit fileset.
8.3.1.1 GL Runtime Environment
The fileset, OpenGL.GL32.rte, contains only one module:
OpenGL.GL32.rte.base
This provides:
/usr/lpp/GL/README
Run time code: /usr/lpp/OpenGL/bin/loadR5Proc
Library files: /usr/lib/libgl.a, /usr/lib/libfgl.a
/usr/lpp/X11/bin/GLcmap and /usr/lpp/X11/bin/GLcmap_R5
A directory link for compatibility purpose : /usr/lpp/ibmgl -> /usr/lpp/GL
8.3.1.2 GL Device-Dependent Software
The OpenGL.GL32.dev fileset provides the following device-dependent
software modules:
OpenGL.GL32.dev.pci.14105400
OpenGL.GL32.dev.pci.14105e00
OpenGL.GL32.mca.8ee3
OpenGL.GL32.mca.8f61
OpenGL.GL32.mca.8fbc
OpenGL.GL32.buc.00004002.com
OpenGL.GL32.buc.00004002
GXT500P/GXT550P
GXT800P
GT4 family
GXT800M
GXT1000
GXT500 (Common)
GXT500
GL 3.2
117
GL ADT Demos
This provides three demo programs and a README file. See 8.3.3.1,
Demo Programs in /usr/lpp/GL/demo/ on page 120.
OpenGL.GL32.adt.samples
This provides a number of samples source code and a README file. See
8.3.3.2, Sample Source Code in /usr/lpp/GL/examples/ on page 121.
OpenGL.GL32.adt.util
This provides a number of utility programs with source code and README
files. See 8.3.3.3, Utility Programs in /usr/lpp/GL/utilities/ on page 123.
8.3.2 Installation
The installation of the GL 3.2 product is performed using the standard AIX
applications such as SMIT.
8.3.2.1 X Server Extensions
To run GL 3.2 applications on adapter such as the GXT1000, GXT5xx or
GXT800, the X Windows Ancillary Buffer Extension (ABX) and the X Windows
Double Buffer Extension (DBE) should be loaded when the X server starts. To
start-up manually, use xinit command-line options as follows:
xinit -- -x abx -x dbe
to
EXTENSIONS="-x abx -x dbe"
118
Starting the X server with -x mbx instead of -x dbe still currently works on an
AIX Version 4.2.1 system, but not on an AIX Version 4.3.2 system.
If -x abx is not specified, you will find the following error message when you
run a GL 3.2 application.
Xlib: extension "xAncillaryBufferExtension" missing on display ...
Xlib: extension "xAncillaryBufferExtension" missing on display ...
Xlib: extension "xAncillaryBufferExtension" missing on display ...
winopen: PseudCol Visualgl: winopen: 1345-072 The requested X-Windows
Server extension is not installed
And if -x dbe is not specified, you will find the following error message.
Xlib: extension "DOUBLE-BUFFER" missing on display ...
Xlib: extension "DOUBLE-BUFFER" missing on display ...
GL 3.2
119
Purpose
lorenz
robotarm
lmodtest
LIGHTING MODEL
AMBIENT LVWR COEFFS
MATERIAL:
SPECULAR
EMISSION
120
LIGHTS:
ON? AMBIENT
Example Program
Purpose
clover.c
decor.c
depthche.c
fork_examp.c
fork_examp2.c
GLexec.c
gen_sig.sh
See rqenter.c
getXdpy.c
GL 3.2
121
glwininfo.c
input_test.c
mapwin.c
nurbs.c
Example of GL NURBS.
rqenter.c
smoothln.c
Xcolormap.c
wincmap.c
xinput.c
zover_examp.c
Example Z-buffered overlays. Shows how depth-testing (Zbuffering) can be enabled for overlays.
IBM does not guarantee that the contents of the source code examples,
whether individually or as one or more groups, will meet your requirements or
that the source code examples are error-free.
The contents of this directory are subject exclusively to the terms set forth in
the Notice to Users that can be found in each of the source code example
files.
122
Example Program
Purpose
dbcs.c
gammacorrect.c
gltosnf.c
hashutil.c
Hash utilities.
partition.c
rotaxis.c
visual.c
GL Widgets
The directory utilities/widgets/ contains source files for sample GL widget and
its Motif version.
This version supports GLXlink, GLXgetconfig, GLXunlink, and GLXwinset.
(This version of GL widget sample code replaces the Glib.c code in
/usr/lpp/ibmgl/utilities/gutil).
GL widgets can be used with either Xt-based programs or with Motif-based
programs. Use GlxDraw for Xt and GlxMDraw version for Motif-based
programs.
Screen Dump
The directory utilities/screendump/ contains source files for RGB image dump
utility for RS/6000 with 3D Graphics Adapter.
The following directories will be found:
x24wd
x24wud
Usage:
To compile and link the programs, x24wd and x24wud, type the following:
make
GL 3.2
123
This makes the two sub-directories, x24wd and x24wud, which will contain
the executables, x24wd and x24wud.
To take a dump of a double-buffered 24-bit RGB or double buffered 12-bit
RGB, type:
x24wd filename
You will be prompted to click on the window you want to dump. The files
will be called, filename.a.X24 and filename.b.X24. These contain the
content of this window for the front and back buffer.
To take a dump of single buffered 24-bit RGB window, type:
x24wd -single filename
You will be prompted to click on one window, and the file will be called
filename.X24.
To display the result of your dump and make sure it is valid, type:
x24wud filename
Where filename does not contain the .X24 suffix. This script converts xwd
files to a color PostScript file that can be used with a printer or any
PostScript visualizer.
Note: The utility only works for applications that use DirectColor (actual
numbers in the frame buffer are color values and not indices of a colormap).
You can manipulate the data directly to generate and read your own data
formats. Simply replace the write_data or read_data routines with your own.
124
To tell the linker to link to the math library, where the sin and cos functions are
located, for example, specify the -lm flag option on the cc command:
cc -o sample sample.c -lgl -lm
GL 3.2
125
The color subroutine sets the current color. Everything you draw is displayed
in the current color until you change that color. The color subroutine itself
does not draw anything.
clear();
The clear subroutine clears the entire window to the current color. Because
the program line immediately preceding the clear subroutine call sets the
current color to black, the window is cleared to black.
cmov2( 50, 50 );
The cmov2 subroutine sets the current character position. Every character you
draw is displayed at the current character position until you change that
126
The charstr subroutine actually draws the text "Hello, World!". The text is
drawn with the current color, which is now green (by color( GREEN );).
sleep( 5 );
The sleep subroutine is an AIX system call. In this example, the sleep
subroutine prompts the system to do nothing for 5 seconds. After 5 seconds,
the sleep subroutine returns and the program exits.
When a GL program exits, any window that it has created disappears.
Without the sleep call, the window would be created, would flash to black,
with some green text, and would then disappear immediately. You can
replace the sleep call with anything that will keep the program running, such
as an infinite loop. But when the program exits, the window definitely
disappears.
GL 3.2
127
128
Chapter 9. OpenGL
This chapter describes the OpenGL API and its implementation by IBM for
AIX. OpenGL has become one of the two major graphic APIs available on
AIX, and IBM encourages its use for any new development. OpenGL is
easy-to-use, full-featured and network transparent.
9.1 Definition
OpenGL supports a broad array of advanced graphics rendering techniques,
such as texture mapping, line and polygon antialiasing, transparency, and
fog. It provides versatile graphics functions, from simple geometry to the
sophisticated rendering of complex surfaces. Users can generate high-quality
pictures from user-defined graphical objects through a simple low-level
modular interface.
This suite of advanced graphics functions is ideal for developing complex 3D
applications, including computer-aided design and manufacturing
(CAD/CAM), industrial design, engineering analysis, petroleum and chemical
engineering, scientific visualization, and entertainment.
The OpenGL API is licensed from Silicon Graphics, Inc. (SGI) and is
governed by the OpenGL Architecture Review Board. See 9.1.5, The
OpenGL Architecture Review Board (ARB) on page 134.
OpenGL is the direct descendant of the proprietary SGI GL (SGI Graphics
Library) API. Since Version 1.0 was released in 1992, OpenGL has gained a
lot of momentum in the industry and is attracting a large number of software
vendors. See 9.6.1.1, History From GL to OpenGL on page 173.
Some of the advantages of OpenGL are:
A consistent, industry standard API across present and future IBM
graphics adapters
A robust conformance test suite
Debugging tools for tracking and check pointing calls to the graphics
libraries.
The strength of OpenGL, as well as SGI GL, lies in their powerful support for
immediate mode graphics, while supporting retained mode graphics. These
terms are described in the following subsections.
129
130
9.1.3 Client/Server
In the OpenGL vocabulary, a client is an application which issues OpenGL
commands, and a server is a window system, such as X Window System with
GLX X extension, where these commands are interpreted and processed to
be ultimately displayed on your screen. The server and the client may or may
not run on the same machine. So the OpenGL is mentioned as network
transparent.
A server may maintain a number of OpenGL contexts, each of which contains
current OpenGL state. On the other hand, a client may connect to more than
one server, but should select one or none of the contexts on these servers at
each moment.
OpenGL
131
132
Previously, the OpenGL Auxiliary library was provided (its library and
header files are libaux.a and aux.h, respectively). It has been withdrawn
from the latest OpenGL development environment.
In the OpenGL Programming Guide: The Official Guide to Learning
OpenGL 1.0, ISBN 0-201-46138-2, sample programs were written using
the aux functions, but those are rewritten using the GLUT functions in its
latest revision for OpenGL 1.1.
9.1.4.5 The OpenGL Widgets
The OpenGL widgets are also provided. These are convenient for creating
OpenGL drawing area widgets, to control their resources, and to register
callback subroutines.
9.1.4.6 The OpenGL Development Environment
The OpenGL development environment includes:
The rendering library (included in libGL.a) and header files (gl.h, fgl.h).
The GLU library (libGLU.a) and header file (glu.h)
The GLX library (also included in libGL.a) and header files (glx.h)
GLX X server extension
The GLUT library (libglut.a) and header file (glut.h)
The OpenGL widgets library (libXGLW.a) and header files
ZAPdb, debugging and tracing tool
OpenGL
133
Because OpenGL 1.2 is a superset of OpenGL 1.1, all programs written for
OpenGL 1.1 run on OpenGL 1.2 without modification, recompiling, or
relinking. OpenGL 1.1 is also a superset of OpenGL 1.0.
134
OpenGL
135
Machine
Type
Graphics
Adapter
Softgraphics
43P 150
GXT255P
10.05
5.02
AIX V4.3.2
43P 133
GXT255P
4.87
0.93
AIX V4.1.5
42T
GXT1000-2
23.84
4.76
AIX V4.1.5
42T
GXT500D
13.42
3.10
AIX V4.1.5
CDRS-03
DX-03
Comment
9.2.2 Hardware-Accelerated
All or part of rendering to the OpenGL API is done by the adapter hardware
and microcode. Section 1.2, Different Classes of Graphics Adapters on
page 9, describes the role of class II and III graphics adapters.
3D adapters, including the POWER GXT550P, GXT800P, GXT800M and
GXT3000P, provide OpenGL acceleration by implementing raster operations
in hardware while maintaining lighting, transformation, and clipping
operations in software. The GXT3000P performs some lighting and setup in
hardware as well. Since the transformation pipeline is maintained on the
system processor, most operations scale with the processing power of the
host.
136
With AIX Version 4.1.5, the major changes found in OpenGL 1.1 are
described in PostScript files located in /usr/lpp/OpenGL/docs.
9.2.7 Easy MP
In June 1997, IBM shipped Easy Implementation of OpenGL MP, or Easy MP,
which provides multi-processor support for OpenGL 1.1. This set of
subroutine libraries offers some customers convenient access to MP
performance while running OpenGL in the RS/6000 Models 43P-240, F40
and F50 PCI-based SMP workstation. In most cases, this support is
accomplished without changing any source code or recompiling their existing
programs, and also without having to learn about writing thread-safe
applications.
While Easy MP is not a thread safe library (meaning that the customer should
not attempt to instantiate multiple copies of Easy MP in multiple threads), it is
OpenGL
137
coded to create multiple threads internal to the library layer and split the
applications drawing requests among multiple processors.
Easy MP is not guaranteed to double your performance. Please read the
caveats in Appendix A.2.2, Using Easy MP on page 245.
138
OpenGL
139
AIX Version
Date
Products/Features
4.1.3
June 1995
4.1.4
October 1995
Extensions
4.2.0
April 1996
4.1.5
October 1996
4.2.1
April 1997
4.3.0
October 1997
4.3.1
April 1998
VFB
4.3.2
October 1998
9.3 Configuration
OpenGL and GL 3.2 for AIX are standard features of IBM AIX Version 4.3, but
these had been offered as Licensed Program Products for IBM AIX Version
4.2 or 4.1.
9.3.1 Filesets
There are four filesets included in this product:
OpenGL.OpenGL_X.rte
OpenGL.OpenGL_X.dev
OpenGL.OpenGL_X.adt
OpenGL.OpenGL_X.tools
OpenGL
OpenGL
OpenGL
OpenGL
Runtime Environment
Device Dependent Software
Application Development Toolkit
Tools
The first two filesets must be installed to run any OpenGL applications on the
system. To develop OpenGL programs on the system, it is necessary to
install the OpenGL Application Development Toolkit fileset. The OpenGL
Tools fileset includes the very useful OpenGL debugger.
140
This provides:
The /usr/lpp/OpenGL/README file.
The runtime code under /usr/lpp/OpenGL/bin/.
The library files, such as libGL.a or libGLU.a /usr/lpp/OpenGL/lib/,
are linked from /usr/lib/.
The /usr/lpp/OpenGL/samples/xglinfo/xglinfo (/usr/lpp/X11/bin/xglinfo)
file.
OpenGL.OpenGL_X.rte.base+
Enhanced Geometry Pipeline
OpenGL.OpenGL_X.rte.base_mp MP Base Runtime Environment
OpenGL.OpenGL_X.rte.soft
Soft Runtime Environment
These include the pipeline module under /usr/lpp/OpenGL/lib/ and so on.
9.3.1.2 OpenGL Device-Dependent Software
The fileset OpenGL.OpenGL_X.dev provides the following device-dependent
software modules:
OpenGL.OpenGL_X.dev.common.bbl
OpenGL.OpenGL_X.dev.pci.14103c00.PPC
OpenGL.OpenGL_X.dev.pci.14105400.PPC
OpenGL.OpenGL_X.dev.pci.14105e00.PPC
OpenGL.OpenGL_X.dev.pci.1410b800.PPC
OpenGL.OpenGL_X.dev.pci.14108e00.PPC
OpenGL.OpenGL_X.dev.pci.14105400.PPC_mp
OpenGL.OpenGL_X.dev.pci.14105e00.PPC_mp
OpenGL.OpenGL_X.mca.8f61
OpenGL.OpenGL_X.dev.common.rby
OpenGL.OpenGL_X.buc.00004002
GXT150L/155L/150P
GXT250P/GXT255P
GXT500P/GXT550P
GXT800P
GXT2000P (N.A.)
GXT3000P
MP GXT500P/GXT550P
MP GXT800P
GXT800M
GXT1000
GXT500
It also provides:
OpenGL.OpenGL_X.vfb
OpenGL
141
OpenGL Debugger
9.3.2 Installation
Installation is done using the standard AIX tools, such as smit install_latest.
142
Otherwise, to start up automatically under xinit, edit the file and change the
line reading:
EXTENSIONS=""
On this command line, GLX refers to the OpenGL Extension to X, abx refers
to the X Windows Ancillary Buffer Extension, and dbe refers to the X Windows
Double Buffer Extension (DBE). DBE is an official X standard and has
replaced the nonstandard X Multi-Buffer Extension (MBX).
Note
Starting the X server with -x mbx instead of -x dbe still works on an AIX
Version 4.2.1 system, but not on AIX Version 4.3.2 system.
To check a list of extensions currently loaded to the X server, run xdpyinfo
(/usr/bin/X11/xdpyinfo) on the local system, or run it with the -display option
on a remote system.
OpenGL
143
1. The first part of OpenGL program is creation of both OpenGL windows and
contexts.
2. Next, because most of OpenGL programs are event driven, proper
callback subroutines should be registered for events your program will
handle. Those events have to be selected.
3. Almost every OpenGL call is used in the callback subroutines. It is
necessary to make current a pair consisting of one OpenGL window and
one context as the drawing target before any OpenGL calls.
4. The OpenGL program usually has a main event loop.
5. Of course, in the main loop, the program flow should be changed
dynamically by control of callback subroutine registrations.
Because OpenGL includes no Window Systems subroutines, to manage
windows, OpenGL contexts and events, it is necessary to call the GLX or
toolkit subroutines. Section 9.4.2, Programming Styles on page 146,
describes how to implement those actions.
9.4.1.1 Creation of OpenGL Windows and Contexts
Both OpenGL window and context need reference to a visual that is one of
those supporting OpenGL on the X server.
First, you should decide the requirements for the visual:
Double-buffered or single-buffered
RGBA or color indexed
8-bit RGBA or 24-bit RGBA
With or without depth/stencil buffer
With or without accumulation buffer
Level (for example, level 1 and 0 correspond to overlays and normal
windows, respectively)
The command xglinfo shows a list of visual configurations available for the X
server. This command is described in 9.4.12, xglinfo on page 165.
OpenGL contexts and corresponding OpenGL windows should refer to the
same visual.
9.4.1.2 Initialization of OpenGL Context
OpenGL program may or may not have a callback subroutine for a
window-mapped event. If it exists, the initialization of the OpenGL context is
done there. If you do not implement such a callback, you should first make
144
sure that the OpenGL window is mapped, and then initialize the OpenGL
context.
The very first step of the initialization is to make current a pair consisting of
one OpenGL window and one context. They will become the target for any
rendering order.
9.4.1.3 Other Callback Subroutines
There should always be a callback for the window exposure event. It is the
responsibility of the OpenGL application to redraw the content of a window
when this one is exposed.
Callbacks for device inputs, such as keyboard, mouse, tablet, LPFK, dial, and
spaceball, are registered if you want to consider them.
9.4.1.4 Creating a Scene
To create a scene:
1. Make a pair of the OpenGL window and context current.
If the program manages only one OpenGL window and one context, this is
not required. You should do that once at the initialization.
2. Set viewport.
3. Initialize and set the global view matrix (or in other words, view volume, or
projection matrix).
Here, you can choose a perspective view or an orthogonal view, and set
near and far clipping planes.
In a perspective view:
OpenGL
145
7. Flush OpenGL calls or swaps color buffers to show the scene on the
screen.
Double-Buffered View
146
The last option has more flexibility, but needs more lines of code. To learn
OpenGL, programming with the GLUT is the easiest method, you can even
create very sophisticated applications with the GLUT.
If you would like to make your application with other widgets, you should use
the GLX library with or without the OpenGL widgets but including the GLUT.
And you should not mix the GLUT and the OpenGL widgets in an application.
All OpenGL subroutines are available to use in your application whatever
toolkit you choose.
Library
Subroutines
Constants
Types
GL
gl
GL_
GL
GLU
glu
GLU_
GLU
GLX
glx
GLX_
GLUT
glut
GLUT_
For example, you will soon get familiar with such names:
Subroutines : glBegin(), glEnd(), glEnable(), glDisable(), glDepthFunc()
Constants : GL_LINE, GL_TRIANGLES, GL_DEPTH_TEST
Types : GLubyte, GLint, GLfloat, GLdouble
Many OpenGL subroutines (commands) take a certain type of values and/or
enumeration constants. These subroutines are suffixed to indicate the
number of elements (if needed) and the type of values. For example:
glVertex2i() requires two GLint values (as x, y).
glVertex4f() requires four GLfloat values (as x, y, z, w).
OpenGL
147
#include <GL/glu.h>
#include <GL/glx.h>
#include <GL/glut.h>
#include <GL/GLwMDrawA.h>
If the OpenGL widgets and the GLU are used, then -lXGLW and -lXm -lXt are
additionally required for the OpenGL widgets:
cc -o sample sample.c -lXGLW -lGLU -lGL -lXm -lXt -lX11
If your code includes the GLUT and the GLU subroutines, the link options should
be:
cc -o sample sample.c -lglut -lGLU -lGL -lXmu -lXext -lX11
148
OpenGL
149
glVertex*()
glColor*()
glIndex*()
glNormal*()
glEvalCoord*(), glevalPoint*()
glCallList(), glCallLists()
glTexCoord*()
glEdgeFlag*()
glMaterial*()
glArrayElement()
These subroutines also can be called outside of glBegin() and glEnd() block.
For example, this code draws a red colored loop with n+1 line segments:
glColor3f(1.0, 0.0, 0.0);/* red */
glBegin(GL_LINE_LOOP);
glVertex3f(x0, y0, z0); /* GLfloat x0, y0, z0,..., xn, yn, zn;*/
glVertex3f(x1, y1, z1);
glVertex3f(x2, y2, z2);
...
glVertex3f(xn, yn, zn);
glEnd();
150
But in the following code, the 1st vertex is assigned the blue color, while the
2nd vertex is assigned the red color:
glColor3f(1.0, 0.0, 0.0); /* red */
glPushAttrib(GL_CURRENT_BIT);
glColor3f(0.0, 0.0, 1.0); /* blue */
glVertex3f(x0, y0, z0); /* the 1st vertex */
glPopAttrib();/* we go back to the red */
glVertex3f(x1, y1, z1); /* the 2nd vertex */
glPushMatrix() and glPopMatrix() saves and later restores the transformation
Later, this object can be called at a different location with a different color as
follows:
glColor3f(1.0, 0.0, 0.0);
glPushMatrix();
glTranslatef(...);
glCallList(listid);
glPopMatrix();
OpenGL
151
The above display list changes the current color to white when it is called,
and will remain white after this call. But the display list below will change the
current color to white and then the restore previous color before exit:
glNewList(listid, GL_COMPILE);
glPushAttrib(GL_CURRENT_BIT);
glColor3f(1.0, 1.0, 1.0);
glBegin(primitive_type);
glVertex3f(...);
...
glEnd();
glPopAttrib();
glEndList();
152
glutInitWindowPosition(100, 150);
glutCreateWindow("sample");
init();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
glutMainLoop();
return 0;
}
glutInitWindowSize(250, 200);
glutInitWindowPosition(100, 150);
Sets the main window width and height to 250 and 200 pixel size and locates
the windows upper-left corner at x = 100, y = 150 on the screen.
glutCreateWindow("sample");
Creates a main window with the above attributes (visual, size, and position)
and gives a string "sample" to the window title.
OpenGL
153
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
In this main() subroutine, you dont see the creation of any OpenGL
context. But the GLUT subroutines create one context and make it current
with the newly created window.
9.4.8.2 init()
This is the place where you should initialize the OpenGL context properly.
void init (void)
{
glClearColor(0.0, 0.0, 0.0, 0.0);
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
}
Sets the clear color to black. To make black the default, this line can be
omitted. This command is valid in RGBA mode or for RGB(A) visual. In color
index mode,
glIndexi(n); /* n is one of available color indices */
154
After this call, polygons and lines are flat shaded. If you need Gouraud
shading, pass GL_SMOOTH to this command. GL_FLAT is the default; so
this line can also be omitted.
glEnable(GL_DEPTH_TEST);
Enables the depth test. By default, the test is disabled, so this line is
necessary to make it available.
9.4.8.3 Callback Subroutines
The subroutines shown below are samples of callbacks.
First, this is a sample callback subroutine for the exposure event. This should
be registered by glutDisplayFunc(), and will be called every time the main
window is exposed in other words, when it is initially mapped or when it is
restored from icon.
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
/*******************/
/* drawing a scene */
/*******************/
glFlush();
glutSwapBuffers();
}
Clears the drawable RGBA buffer and Z-buffer at once. To clear the RGBA
buffer, the clear color is used. The Z-buffer is cleared with the maximum
number. GL_COLOR_BUFFER_BIT is valid in both RGBA and color index
modes.
glFlush();
Flushes all of the commands that are not yet executed on the OpenGL server.
It is necessary to call it if you work on a single-buffered visual. For a
double-buffered visual, this also works well; however, sometimes the things
go well without this command because of buffer swapping. This happens
OpenGL
155
because the remaining commands are executed in the back buffer, and you
dont see the result.
glutSwapBuffers();
If the visual is double buffered, this command swaps color buffers. For
instance, it makes the invisible color buffer (back buffer) visible, and vice
versa. If the visual is single-buffered, nothing will happen with this command.
Next, this is a sample callback subroutine for the window reconfiguration
event. This should be registered by glutReshapeFunc() and will be called at the
window creation as well as when the user changes the window sizes. It resets
the viewing information in the OpenGL context:
void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 1.0, 0.0, 1.0 * (GLfloat) h / (GLfloat) w, -1.0, 1.0);
/* or gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 30.0); */
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
/*... some transformations you need */
}
Adjusts the viewport to the reshaped window size and assures you that you
can still use the maximum size of the window for your drawing.
Note
Without this line, the result can be quite surprising. For example, if the size
of a window, which is originally 150" width and 100 in height, changes to
150x100, the bottom 50 rows are not available for drawing because the
viewport is unchanged, and your figures are clipped by viewport boundary.
See Figure 27 on page 157.
And, of course, if you want to keep the original viewport regardless of
window size changes, you dont need to call glViewport() here. Further if
you set both of the projection and modelview matrices properly in init(),
you may not have to call glReshapeFunc() itself.
156
Original
Reshaped
Viewport
100
150
150
100
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 1.0, 0.0, 1.0 * (GLfloat) h / (GLfloat) w, -1.0, 1.0);
First, reset the projection mode matrix to unit matrix; then set the orthogonal
view volume. This glLoadIdentiy() is important. glOrtho() generates a
transformation matrix and applies it to the current projection matrix.
Therefore, the following lines might create unexpected results.
glMatrixMode(GL_PROJECTION);
glOrtho(0.0, 1.0, 0.0, 1.0 * (GLfloat)h / (GLfloat)w, -1.0, 1.0);
instead of glOrtho().
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
Change the matrix mode to GL_MODELVIEW mode, and reset the modelview
matrix to the unit matrix.
Next is a sample callback subroutine for key input event. This should be
registered by glutKeyboardFunc(). It will be called every time a key is hit.
void keyboard(unsigned char key, int x, int y)
{
switch(key) {
case q:
case Q:
exit(0);
OpenGL
157
default:
break;
}
}
9.4.9 A Program with the GLX Library and the OpenGL Widgets
Sample main() subroutine and some callback subroutines are shown here
using the GLX library and GLw widget.
9.4.9.1 main()
The following subroutine is a typical main() function:
#include <X11/Intrinsic.h>
#include <GL/GLwMDrawA.h>
void ginitCB(Widget w, XtPointer client_data, XtPointer call_data);
void exposeCB(Widget w, XtPointer client_data, XtPointer call_data);
void inputCB(Widget w, XtPointer client_data, XtPointer call_data);
int main(int argc, char **argv)
{
...
int glxconfig[] = {
GLX_DOUBLEBUFFER,
GLX_RGBA,
GLX_RED_SIZE, 8,
GLX_GREEN_SIZE, 8,
GLX_BLUE_SIZE, 8,
None
};
XVisualInfo *visualinfo;
GLXContext glxcontext;
Widget glw;
...
toplevel = XtOpenApplication(&app_context, "sample",...);
...
visualinfo = glXChooseVisual(display, screen, glxconfig);
glxcontext = glXCreateContext(display, visualinfo, None, GL_TRUE);
n = 0;
XtSetArg(args[n], GLwNvisualInfo, visualinfo); n++;
XtSetArg(args[n], XmNwidth, 256); n++;
...
glw = GLwCreateMDrawingArea(toplevel, "glw", args, n);
158
XtManageChildren(glw);
XtAddCallback(glw, GLwNginitCallback, (XtCallbackProc)ginitCB,
(XtPointer)option1);
XtAddCallback(glw, GLwNexposeCallback,
(XtCallbackProc)exposeCB, (XtPointer)option2);
XtAddCallback(glw, GLwNresizeCallback,
(XtCallbackProc)resizeCB, NULL);
XtAddCallback(glw, GLwNinputCallback,
(XtCallbackProc)inputCB, NULL);
XSelectInput(display, XtWindow(glw),
XtBuildEventMask(glw) | PointerMotionMask);
XtRealizeWidget(toplevel);
XtAppMainLoop(app_context);
return 0;
}
OpenGL
159
Creates and manages an OpenGL widget specifying visualinfo and the other
attributes.
void ginitCB(Widget w, XtPointer client_data,
GLwDrawingAreaCallbackStruct *call_data);
...
XtAddCallback(glw, GLwNginitCallback,
(XtCallbackProc)ginitCB, (XtPointer)option1);
XtAddCallback(glw, GLwNexposeCallback,
(XtCallbackProc)exposeCB, (XtPointer)option2);
XtAddCallback(glw, GLwNresizeCallback,
(XtCallbackProc)resizeCB, NULL);
XtAddCallback(glw, GLwNinputCallback,
(XtCallbackProc)inputCB, NULL);
160
GLwDrawingAreaMakeCurrent(w, (GLXContext)client_data);
glClearColor(0.0, 0.0, 0.0, 0.0);
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
}
The following is called when the OpenGL widget is exposed, and it is similar
to the display() subroutine in the GLUT example:
void exposeCB(Widget w, XtPointer client_data,
GLwDrawingAreaCallbackStruct *call_data)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
/*******************/
/* drawing a scene */
/*******************/
glFlush();
GLwDrawingAreaSwapBuffers(w);
}
The following function is called when the OpenGL widget is resized, and it is
similar to the reshape() subroutine in the GLUT example:
void resizeCB(Widget w, XtPointer client_data,
GLwDrawingAreaCallbackStruct *call_data)
{
GLsizei w = call_data->width;
GLsizei h = call_data->height;
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 1.0, 0.0, 1.0 * (GLfloat) h / (GLfloat) w, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
/*... some transformations you need */
}
The following function is called when the OpenGL widget gets events from
input devices:
void
inputCB(Widget w, XtPointer client_data,
GLwDrawingAreaCallbackStruct *call_data)
{
switch(call_data->event->type) {
OpenGL
161
case KeyRelease:
...
case ButtonPress:
switch(call_data->event->xbutton.button) {
case Button1:
...
}
break;
case MotionNotify:
...
}
}
<X11/Xlib.h>
<X11/Xutil.h>
<GL/glx.h>
<GL/glu.h>
162
OpenGL
163
The OpenGL context and window for overlay planes are created in the same
manner as color planes.
GLXContext overlay_context =
glXCreateContext(display, overlay_visualinfo, None, GL_TRUE);
Widget glw_overlay;
...
XtSetArg(args[n], GLwNvisualInfo, overlay_visualinfo); n++;
glw_overlay = GLwCreateMDrawingArea(toplevel, "glw_overlay", args, n);
164
XRaiseWindow(display, XtWindow(w));
}
cmap;
pixels[1];
color;
When the overlay planes are used in the application, there are at least two
sets of OpenGL contexts and windows; therefore, glXMakeCurrent() or
GLwDrawingAreaMakeCurrent() should be called when the drawing target
changes.
9.4.12 xglinfo
The command /usr/bin/X11/xglinfo provides you with useful information for
your OpenGL programming. You should again execute the DISPLAY where
you are going to draw.
To get the information for the screen that is in front of you, just type xglinfo or
/usr/bin/X11/xglinfo. To get the information for the screen on the remote
host, if the X server is running on that machine, execute:
xglinfo -display remote_host_name:screen_number
OpenGL
165
The last section is information about visuals available on the screen. In the
above case (with GXT3000P), all visuals are available for OpenGL use, but
sometimes you find the following lines for the other type adapters.
OPENGL NOT SUPPORTED
For example:
TrueColor visual: ID = 0x2c (hex) 44 (decimal) screen = 0
DOUBLE buffered MONO RGB visual with (Alpha Z Stencil)
GL Sizes: RGBA=(8,8,8,8), Z=24, Stencil=8,
Extensions: visualCaveat=None, OPAQUE
Core X:depth=24, colormapSize=256 RGB: masks=(0xff0000,0xff00,0xff)
bits=8
This visual has a double-buffered 32-bit RGBA color buffer, a 24-bit Z buffer
and an 8-bit stencil buffer. MONO means nonstereo visual.
TrueColor visual: ID = 0x2e (hex) 46 (decimal) screen = 0
DOUBLE buffered MONO RGB visual with (Alpha Z Stencil Accum)
GL Sizes: RGBA=(8,8,8,8), Z=24, Stencil=8, Accum=(16,16,16,16)
Extensions: visualCaveat=None, OPAQUE
Core X: depth=24, colormapSize=256 RGB: masks=(0xff0000,0xff00,0xff)
bits=8
166
This visual has a double-buffered 24-bit RGB color buffer but no alpha. It also
has a 24-bit Z-buffer and an 8-bit stencil buffer.
TrueColor visual: ID = 0x25 (hex) 37 (decimal) screen = 0
DOUBLE buffered STEREO RGB visual with (Alpha Z Stencil Accum)
GL Sizes: RGBA=(4,4,4,4), Z=24, Stencil=8, Accum=(16,16,16,16)
Extensions: visualCaveat=None, OPAQUE
Core X: depth=12, colormapSize=16 RGB: masks=(0xf00,0xf0,0xf) bits=4
This visual has a double-buffered stereo RGBA color buffer, but each
component has four bits. Therefore, its color resolution is less than the above
visuals (They all support eight bits per component.)
PseudoColor visual: ID = 0x23 (hex) 35 (decimal) screen = 0
DOUBLE buffered MONO COLOR INDEX visual with (Z Stencil)
GL Sizes: ColorIndex=8, Z=24, Stencil=8
Extensions: visualCaveat=None, OPAQUE
Core X: depth=8, colormapSize=256
This visual has a double-buffered 8-bit indexed color buffer, a 24-bit Z-buffer
and an 8-bit stencil buffer.
PseudoColor visual: ID = 0x22 (hex) 34 (decimal) screen = 0
OVERLAY(1) SINGLE buffered MONO COLOR INDEX visual GL Sizes:
ColorIndex=8,
Extensions: visualCaveat=None, TRANSPARENT INDEX, index value=255
Core X: depth=8, colormapSize=255
This visual has a single-buffered 8-bit indexed color buffer. This is an overlay
visual. Because index 255 is used as the transparent index, the available
color indices are [0,254]. The color map size is 255.
PseudoColor visual: ID = 0x21 (hex) 33 (decimal) screen = 0
OVERLAY(1) SINGLE buffered MONO COLOR INDEX visual GL Sizes:
ColorIndex=8,
Extensions: visualCaveat=None, OPAQUE
Core X: depth=8, colormapSize=256
OpenGL
167
The depth test is disabled by default. And if you select a visual without the
depth buffer on a hardware-accelerated graphics adapter, the depth test
does not work. If you need the depth test, check the supported visuals by
using xglinfo and specify GLX_DEPTH_SIZE in the configuration data for
glXChooseVisual.
If no object is seen in the black screen when the lighting is enabled,
disable the lighting first. Then check if objects are rendered.
Replace glColor*() with a set of glMaterial*() calls, which are needed
for lighting. There is another way using glColorMaterial() and
glEnable(GL_COLOR_MATERIAL), but it is not usually recommended to use
this. That is, glMaterial*() should be used. And, when lighting is
disabled, use glColor*() (or glIndex*() in color index mode).
If, even with glMaterial*(), the picture is not correct, then enable
two-sided lighting as follows:
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
168
OpenGL
169
Avoid glColorMaterials() unless you really need them; that is, disable
GL_COLOR_MATERIAL and use glMaterial*() instead of glColor*() for
lighting.
Use glLoadIdentity(), glRotate*(), glTranslate*(), and glScale*() rather
than calling glLoadMatrix() and glMultMatrix().
Avoid GL_NORMALIZE if possible; that is, provide unit length normals if it
is possible to do so. And avoid using glScale*() when doing lighting
because it almost always requires GL_NORMALIZE to be enabled.
Avoid multiple OpenGL contexts in a scene. It may be convenient to have
multiple contexts in an application, but context changing is expensive. Use
one context for each visual.
If you need to use accumulation buffers for scene antialiasing, try to use
glReadPixels(), glDrawPixels() and your CPU memory in direct rendering
context without accumulation buffers. It might be faster than using
accumulation buffers in indirect context.
Use texture objects to encapsulate texture data. OpenGL 1.1 supports it to
improve performance in texture mapping.
170
Graphic Adapter
GXT255P
1280x1024
1024x768
GXT250P
GXT155L
X
X
GXT150L
GXT150P
Since all the operations are implemented in software, it is important that the
following guidelines are observed in order to maximize system performance.
Avoid rendering to unnecessary buffers. For example, if destination alphas
are not needed, disable alpha writes using:
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE)
OpenGL
171
172
OpenGL
173
released in 1992. IBM is still an active member of the ARB and continues to
contribute to the OpenGL specification.
OpenGL is not backwards compatible with former GL versions; in fact,
OpenGL calls are completely different from previous GL implementations. For
this reason, OpenGL requires ports from older versions of GL, like 3.2, 3.3,
and 4.0, on all vendors platforms.
SGIs and IBMs strategic direction is away from a proprietary windowing
system to an open system. Therefore, GL customers are encouraged to
migrate to OpenGL by separating windowing and input calls (which are better
handled by Xlib) from 3D rendering calls.
9.6.1.2 Advantages of OpenGL Over IBMs GL Offering
IBM encourages GL 3.2 customers to migrate to OpenGL. This is because of
the many advantages of OpenGL over GL 3.2, as described here.
Additional rendering capabilities:
OpenGL offers additional rendering capabilities not present in IBM's
current GL offering, including texture mapping, stencil and accumulation
buffers. See 9.1.4, Technical Content of OpenGL on page 131, for
OpenGL rendering capabilities.
Better integration with window systems:
OpenGL does not provide the support for windowing, input, events,
cursors, and pop-up menus that GL includes. Instead, OpenGL relies on
the libraries for the window system which are better equipped to handle
these functions on each platform and therefore is more integrated with the
window system than GL. For example, such libraries are the X11 library
(Xlib), Xt and OSF/Motif for AIXwindows.
Open licensing:
As described in 9.1.7, OpenGL Licensing on page 134, OpenGL is
licensed by SGI to interested parties under its standard terms and
conditions, whereas, GL remains proprietary.
Technical control over the API under the OpenGL ARB:
As described in 9.1.5, The OpenGL Architecture Review Board (ARB) on
page 134, together they create detailed specifications and conformance
test suite criteria. GL, on the other hand, is a proprietary API developed by
SGI.
Rigorous conformance test suite:
174
Window Management
As described before, OpenGL includes no window system commands. It is
always supported as an extension to a window system. For example, the GLX
includes about 10 commands for this purpose. GL 3.2 provides window
management subroutines, too.
In OpenGL, an application window has static frame buffer configurations, but
GL 3.2 subroutines, such as gconfig and drawmode, can change the
configuration dynamically.
Buffer Swapping:
The GL 3.2 subroutine swapbuffers() requires no argument, but the GLX or
OpenGL widget library requires target drawable. The swapbuffers()
subroutine can be emulated as follows:
void swapbuffers( void )
{
glFlush();
GLwDrawingAreaSwapBuffers( current_drawable );
/* argement is a widget */
/* or glXSwapBuffers(display, current_drawable);
the second argument is a window */
}
current_drawable can be controlled by the application, or can be obtained
by glXGetCurrentDrawable().
Clear
Clear Color:
OpenGL provides subroutines to set clear color, glClearColor() and
glClearIndex(). In the GL 3.2 application, the color set by color(), in color
index mode, is used as the clear color and the vertex color. For example,
OpenGL
175
the clear color for overlay planes might be set to the transparent pixel
value once in the initialization subroutine.
Clear Options:
OpenGL clears buffers without applying the currently specified pixel
operations such as blending and logicop, regardless of their modes. To
clear using such features, you have to render a window-size polygon.
clear() and czclear():
The clear() subroutine of GL 3.2 only clears color buffers. czclear()
clears both color buffers and the depth buffer. In the OpenGL application,
clear target buffer can be specified by glClear() as follows:
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Transformation
Matrix Mode:
All OpenGL matrix operations operate on the current matrix, rather than
on a particular matrix, as do the GL 3.2 ortho, ortho2, perspective, and
window commands. All the OpenGL matrix operations except
glLoadIdentity and glLoadMatrix multiply the current matrix rather than
replacing it (as do ortho, ortho2, perspective, and window in the GL 3.2).
GL 3.2 does not transform geometry by the modelview matrix while in
projection matrix mode. OpenGL always transforms geometry by both the
modelview and the projection matrix, regardless of the matrix mode.
Conversion Samples:
The following code shows samples of conversion from GL 3.2 to OpenGL:
void ortho2( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top )
{
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
gluOrtho2D( left, right, bottom, top );
glMatrixMode( GL_MODELVIEW );
}
void ortho( GLfloat xmin, GLfloat xmax,
GLfloat ymin, GLfloat ymax, GLfloat zmin, GLfloat zmax )
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho( xmin, xmax, ymin, ymax, zmin, zmax );
glMatrixMode( GL_MODELVIEW );
}
176
Color
Lighting Equation:
The OpenGL lighting equation differs from the GL 3.2 equation.
Flat Shade Color:
OpenGL
177
GL 3.2 polygons take the color of the last vertex specified, but OpenGL
polygons take the color of the first vertex specified.
Packed Color:
GL 3.2 accepts packed colors both for geometric and pixel rendering.
OpenGL does not accept them for geometric rendering.
c3s()
The c3s() subroutine of GL 3.2 maps [0, 255] to [0.0, 1.0]; however,
glColor3sv() of OpenGL maps [-32768, 32767] to [-1.0, 1.0], and
glColor3ubv() maps [0, 255] to [0.0, 1.0]. Therefore, c3s() should be
replaced as follows:
void c3s( GLshort v[3] )
{
glColor3ub( (v)[0], (v)[1], (v)[2] );
}
Or, use GLubyte v[3] for GLshort v[3]; then glColor3ubv(v) is available.
Primitive Drawing
Scalar and Vector Arguments:
All OpenGL commands that are accepted between glBegin and glEnd have
entry points that accept scalar and vector arguments, such as,
glColor4f(red,green,blue,alpha) and glColor4fv(v).
Triangle Mesh:
OpenGL provides GL_TRIANGLE_STRIP and GL_TRIANGLE_FAN. GL
3.2 offers the triangle mesh drawing subroutine and the swaptmesh()
subroutine to support triangle strips and triangle fans.
Polygon Mode:
GL 3.2 supports hollow polygons, but OpenGL does not support them. To
render hollow polygons in an OpenGL application, the stencil capability is
useful.
OpenGL polygon modes are specified separately for front- and
back-facing polygons, but GL 3.2 shares a single mode for all polygons.
Polygon Vertex Count:
GL 3.2 polygons are limited to a maximum of 255 vertices, but OpenGL
primitives have no limitation to the number of vertices between glBegin()
and glEnd().
Antialiased Line Stippling:
OpenGL stipples antialiased lines, but GL 3.2 cannot do that.
178
OpenGL
179
Display List
Defs and Binds:
OpenGL does not have the concept of material or light objects, only of
material and light properties. Use display lists to create material or light
objects so that the display lists contain only material properties or light
properties. GL 3.2 does not support texture mapping, but the SGI GL later
version does and has the concept of texture objects. From OpenGL 1.1,
texture objects are supported.
void
setlinestyle( int index )
{
if( index == 0 )
glDisable( GL_LINE_STIPPLE );
else {
glCallList( linestyle_binding_base + 2 );
glEnable( GL_LINE_STIPPLE );
}
}
void
setlinestyle( int index )
{
if( index == 0 )
glDisable( GL_LINE_STIPPLE );
else {
glCallList( linestyle_binding_base + 2 );
glEnable( GL_LINE_STIPPLE );
}
}
180
OpenGL
181
glShadeModel( GL_SMOOTH );
}
Others
Error Checking:
OpenGL checks for errors more carefully than GL 3.2 does. For example,
all OpenGL commands that are not accepted between glBegin and glEnd
are detected as errors, and have no other effect.
When an OpenGL command results in an error, its only side effect is to
update the error flag to the appropriate value. No other state changes are
made. (The exception is the OUT_OF_MEMORY error; whether the
offending command is ignored or not is undefined.) See the glGetError()
manual page.
When an OpenGL command that returns a value detects an error, it
always returns zero. OpenGL commands that return data through pointers
make no change to the array contents if an error is detected.
Invariance:
OpenGL guarantees certain invariances that GL 3.2 doesnt. For example,
OpenGL guarantees that identical code sequences sent to the same
system, differing only in the blending function specified, will generate the
same pixel fragments. (The fragments may be different if blending is
enabled and disabled, however.)
182
Viewing
Number of viewports:
The graPHIGS application can hold a number of views (or viewport) for
each window (graPHIGS workstation) at a time, but OpenGL has only one
viewport for each context. With graPHIGS, each view has its own view
volume and other attributes, such as a drawing priority to the other views,
a border color, a background (shielding) color, an HLHSR mode, an
antialiasing mode, a transparency (blending) mode, and so on.
Background Clear:
There is no clear subroutine in the graPHIGS API. GPUPWS() The update
workstation subroutine implicitly clears the window background, then fills
each view with its shielding color before primitive drawing if view shielding
is enabled.
Direction of Z:
The Z axis of the world coordinates points to the viewer in graPHIGS, but
it points to the opposite direction in OpenGL. In both, X and Y axes point
to the right and top, respectively. The coordinate systems of graPHIGS
and OpenGL are right-hand and left hand, respectively.
Transformation Matrices:
The graPHIGS view matrix corresponds to the OpenGL projection mode
matrix. Combination of global and modeling transformation of graPHIGS
corresponds to the OpenGL modelview mode transformation. OpenGL
glRotate*() or glTranslate*() directly change the transformation matrix in
a mode, where graPHIGS rotation or translation tool subroutines only
produce a matrix from the specified rotation angle around an axis or
translation values. The resulting matrix can be multiplied by another
matrix. To set or update the global or local transformation matrix, the
application passes such a matrix, or application-calculated matrix, to the
corresponding transformation subroutine.
OpenGL
183
Window Resize:
Whenever the graPHIGS API window is resized, the device driver
establishes a new display surface size within that window. This is the
largest subarea of the resized X Window that maintains the aspect ratio
provided by the application or user, or the root window by default. The
current display contents are scaled uniformly to this new mapped display
surface size. The OpenGL application can fit its viewport to the resized
window.
Structure Hierarchy
The graPHIGS structure store can be simulated using OpenGL display lists. A
graPHIGS structure can call other structures using the Execute Structure
subroutine, GPEXST(). This mechanism creates the structure hierarchy.
OpenGL display lists can also call other display lists. graPHIGS Structure
Stores support not only structure hierarchy but also many ways of editing
structures. Display lists cant be edited.
Attributes
Current Color:
OpenGLs current color (or color index) and materials are applied to all
points, polylines and polygons. With the graPHIGS API, colors for
polylines, polygon, polymarkers, edges, and text strings are held
independently.
Colormap Table:
In color index mode with OpenGL, the application uses the X colormap
directly. graPHIGS has its own colormap tables.
Color Setting by RGB or Index:
There are two types of subroutines to set the colors in OpenGL. glColor*()
is used for windows with RGB visual, and glIndex*() is used for windows
with color index visual. graPHIGS also provides two types of subroutines
for color setting, and both are valid any time. For example, the Set
Polyline Color Index subroutine, GPPLCI(), and the Set Polyline Color
Direct subroutine, GPPLCD(), are available to set the color for polylines.
Color Model:
graPHIGS supports four color models: RGB, HSV, CMY, and CIELUV.
OpenGL supports the RGB color model only.
Edge Line Style:
In the graPHIGS API, edges for polylines or polygons are two different
primitives, and line style (line stipple) and edge style are applied to
184
polylines and edges, respectively. In OpenGL, the line loops and polygons
in GL_LINE mode are similar, line stipple pattern, line width, and line
antialiasing mode are applied to both, but polygons have front and back
facets.
Line Style:
The graPHIGS APIs line type representations can be roughly simulated in
OpenGL with line stipple. But some detailed controls, like
SCALED_TO_FIT_RENDERING, should be implemented by the OpenGL
application.
Line End Type:
With wide lines in graPHIGS, three types of line end-shapes are available:
FLAT, ROUND, and SQUARE. In OpenGL, such line representations
cannot be implemented without using the polygon primitive.
Line-on-Line Color:
If you want to implement the line-on-line facility in an OpenGL application,
you will have to use the logical operation with color buffers.
Interior Style:
graPHIGS provides five interior styles for polygon rendering:
HOLLOW
SOLID
PATTERN
HATCH
EMPTY
HOLLOW and SOLID are similar to the OpenGL polygons in GL_LINE and
GL_FILL modes, respectively. As for the pick facility, other than for the
HOLLOW type, the OpenGL application should use GL_FILL mode for
polygon rendering during the pick operation in GL_SELECT mode. (In this
mode, no primitives are drawn in the color buffers.) graPHIGS HATCH
interior style can be simulated in OpenGL using the polygon stipple or a
combination of scissor test and 2D line drawings. For graPHIGS
PATTERN interior style, polygon stipple or texture mapping is available in
OpenGL, and the use of scissor test is convenient.
Primitives
Primitive Drawing Subroutines:
The graPHIGS drawing subroutines, such as Polyline3 or Polygon 3, are
passed vertex data in arrays. OpenGL glBegin() and glEnd() drawing
OpenGL
185
needs many more subroutine calls between them, but it has the advantage
of flexibility; that is, the color or normal vector, for example, can be
changed for any coordinates. With one type of graPHIGS drawing
subroutine, such as the Polygon3, you cannot change the color per vertex.
With another type, such as Polygon3 With Data subroutine, you can do
that, but even if you would like to change only one vertex color, colors
should be supplied for all of the vertices.
Markers:
Only one of the graPHIGS polymarkers, the dot type, has a counterpart
with the OpenGL polypoints. The other types are roughly simulated by a
combination of OpenGL current raster position and bitmap drawings. As
for graPHIGS polymarkers, their positions are transformed, but their
shapes are not affected by the transformations. Their sizes are changed
by their scale factors, but the other factors are invariable.
Text:
There are two types of text primitive in graPHIGS API, annotation text and
geometric text. Annotation text is similar to polymarker, but the character
shape of geometric text is affected by the transformations.
Polygon Edges:
The graPHIGS polygon edges are defined with a line type and a scale
factor (line width) as well as color facilities. OpenGL polygon edge drawing
can be simulated using polygon offset, depth test and polygon mode
functions as well as line stipple and line width, but the effect of the edge
line type may be different from the graPHIGS edge.
Polygon Tessellation:
The concave or multicontour (multisubarea) polygons supported by
graPHIGS can be drawn using GLU polygon tessellation.
OpenGL Unique Primitives:
Among OpenGL primitives, GL_TRIANGLES (individual triangles),
GL_QUADS (individual quadrilaterals) and GL_TRIANGLE_FAN are
OpenGL unique. The vertex array version of these primitive drawings may
be more effective than using graPHIGS drawing subroutines such as
Polygon3 or Triangle Strip3.
186
TGS U.S.
info@tgs.com
TGS Europe
europe@tgs.com
UNIX Sales
diane@tgs.com
Hotline
support@tgs.com
(800) 428-7588
Europe
Support
maint@g5g.fr
OpenGL
187
Passwords
license@tgs.com
(800) 544-4847
OpenGL and GL 3.2 for AIX Version 4.3 do not include Open Inventor
anymore.
The following is a short overview of Open Inventor:
Open Inventor is a 3D object-oriented developers toolkit that assists software
developers in developing high-performance 3D graphics applications;
however, from an industry acceptance perspective, Open Inventor has not
gained wide acceptance to date. One of the reasons is that they have a doubt
about its chances of becoming a major standard in the future. Graphics
application developers do not want to double their effort to learn a new API.
Only a small number of 3D application vendors have selected Open Inventor
for their applications.
Open Inventor for AIX exploits the capabilities of OpenGL. Open Inventors
programming model is based on a 3D hierarchical scene database which
simplifies and accelerates graphics programming. This new approach
replaces the traditional hardware-based drawing model with a more natural,
powerful and flexible object model.
Open Inventor can be a cost-effective tool that saves programmers time and
effort:
Extensive functionality:
The object model introduces numerous concepts that the traditional frame
buffer approach cannot.
For example, Open Inventor offers true geometric picking, 3D locate
highlighting, animation, physical constraints, object names, level-of-detail,
object culling, interactive direct manipulation, bounding box calculations,
selection, automatic render caching, reusable viewers, a standard 3D file
format for data exchange, instancing, and 3D cut and paste.
In addition, its flexible, object-oriented architecture provides an elaborate
group of preprogrammed building blocks the programmer can customize
and extend.
Completeness:
Open Inventor provides the tools a programmer needs to develop
high-performance 3D applications that feature animation and a high level
of user interactivity.
Ease-of-Use:
188
9.7 References
This section introduces references for OpenGL and Open Inventor.
OpenGL
189
This page contains information about products and activities relating to the
OpenGL 3D graphics API, both inside and outside of IBM. It also has
many links to useful Web sites including:
http://www.opengl.org/
http://www.opengl.org/Documentation/Specs.htm
http://www.specbench.org/gpc/opc.static/
190
10.1 Definition
PEX is a protocol (like X11) and designed as a 3D extension to the X server,
the PEX extension. The PEX protocol is generated when an application
program accesses the PEX extension by programming in an API such as
PHIGS or PEXlib.
PEX products provide interoperability for 3D graphics functions in networked
heterogeneous environments. Target market segments include industrial
design and modeling (CAD), engineering analysis, entertainment, and
scientific visualization segments.
However, from an industry perspective, PEX has not gained wide acceptance
to date, but OpenGL has gained lots of momentum in the industry. Only a
small number of 3D application vendors have selected PEX as the basis for
their applications.
191
10.1.2 PEXlib
The API provided with the PEX Sample Implementation, PEX-SI, is called
PEXlib. PEXlib exposes the full power of PEX, including server-side
implementation of lighting, shading, modeling and viewing transformations,
and many of the other features found in PHIGS and PHIGS PLUS.
192
customer upgrades to CGE PEX 5.1, all of their PEX 5.1 applications will still
work without requiring modifications.
CGE is shipped with PEX and PHIGS Version 4.2.1 for AIX. It includes the
CGE libraries, online documentation (a reference manual derived from the
CGE PEX 5.1 specification and a CGE portability guide), and sample
programs.
PEX
193
194
10.3 Configuration
PEX and PHIGS Version 4.2.1 for AIX is offered as a Licensed Program
Product for IBM AIX Version 4.2.
10.3.1 Filesets
There are four filesets included in this product :
PEX_PHIGS.PEX.rte
PEX_PHIGS.PEX.dev
PEX_PHIGS.PEX.adt
PEX_PHIGS.info
PEX
PEX
PEX
PEX
Runtime Environment
Device Dependent Software
Application Development Toolkit
Programming Guide
The first two filesets must be installed to run PEX applications on the system.
To develop PEX programs on the system, it is necessary to install the PEX
Application Development Toolkit fileset.
Be aware that directories and files have changed from previous releases.
10.3.1.1 PEX Runtime Environment
The fileset PEX_PHIGS.PEX.rte contains two modules:
PEX_PHIGS.PEX.rte.base
This provides:
/usr/lpp/X11/README.PEX. See 10.3.3, Other Information in
/usr/lpp/X11/README.PEX on page 200.
Run time code under /usr/lpp/X11/bin/
A library file /usr/lpp/X11/lib/libPEX5.a (/usr/lib/libPEX5.a links to it)
Font files under /usr/lpp/X11/lib/X11/fonts/PEX/
An installation verification program /usr/lpp/X11/Xamples/pex/ivp/cube.
See 10.3.3.2, Other Notes about PEX Server on page 201.
PEX_PHIGS.PEX.rte.soft
PEX
195
GXT250P/GXT255P
GXT500P/GXT550P
GXT800P
GXT500
GT4
GTO
GXT1000
196
10.3.2 Installation
The PEX and PHIGS Version 4.2.1 for AIX is a fully integrated IBM product
and is installed using the usual system administration tools, such as SMIT.
Once this product is installed, you have to add extensions to the server in
order to use it.
10.3.2.1 X Server Extensions
The commands used to start up the PEX Extension to X Window System
automatically are in /usr/lpp/X11/defaults/xserverrc. To start-up automatically
under xinit, edit the file and change the line reading:
EXTENSIONS=""
as follows:
For X11R5: EXTENSIONS="-x pex -x dbe"
For GXT1000: EXTENSIONS="-x pex -x abx -x dbe"
If the OpenGL is installed, -x abx and -x dbe are specified with -x GLX in
another line in this file; so, you will just have to change the line to:
EXTENSIONS="-x pex"
PEX
197
On this command line, pex refers to the PEX Extension to X, abx refers to the
X Windows Ancillary Buffer Extension, and dbe refers to the X Windows
Double Buffer Extension (DBE). DBE is an official X standard and has
replaced the non-standard X Multi-Buffer Extension (MBX).
Note
Starting the X server with -x mbx instead of -x dbe still works on an AIX
Version 4.2.1 system, but not on an AIX Version 4.3.2 system.
If -x pex is not specified, you get the following error message when you run a
PEX application.
Could not access PEX extension.
Message returned from PEXInitialize: Could not initialize the PEX
extension on the specified display
To obtain the list of the extensions currently loaded to the X server, run
xdpyinfo ( /usr/bin/X11/xdpyinfo) on your local system, or run it with the
-display option from a remote system.
198
10.3.2.2 /usr/bin/X11/xstdcmap
Many PEX clients search for a standard colormap on an X server and use it if
one is found. This promotes colormap sharing and avoids executing the
series of steps needed to create and initialize a colormap. If a client program
starts and terminates almost immediately issuing a message involving a
standard colormap that it couldnt find, run:
xstdcmap -all
This command creates all the standard colormaps and makes them available
to the client programs. Run this command early in an X session so that all
clients that seek and use standard colormaps can take advantage of them.
10.3.2.3 /usr/lpp/X11/Xamples/pex/tools/bin/pexstdcmap
The command pexstdcmap performs the same steps as xstdcmap, except that it
can guarantee that the colormaps are usable by the PEX server, in terms of
color approximation. Use the -pex option to force pexstdcmap to create these
standard colormaps.
See /usr/lpp/X11/Xamples/pex/tools/src/pexstdcmap for the source files.
10.3.2.4 Environment Variable IBMPEXSOFT
With AIX Version 4.2.1, the PEX server extension operates on all IBM
graphics adapters except the GrayScale Graphics Adapter and GXT3000P.
The PEX server extension utilizes the graphics accelerator hardware on the
GtO, Gt4, Gt4X, Gt4e, and Gtx1000 graphics adapters. On all other
supported adapters, the server uses IBM SoftGraphics technology to
generate the graphics with software.
Note
PEX
199
If you wish to use the software-based PEX server, even when running on a
hardware-accelerated adapter, you should set an environment variable
before starting the server as follows:
For ksh: export IBMPEXSOFT=1
For csh: setenv IBMPEXSOFT 1
All Adapters:
PEXSearchNetwork Request is not implemented. A BadImplementation error
is returned to the client if the client sends this request to the server.
Hardware Accelerated Adapters:
Back Face Attribute InteriorStyle, InteriorStyleIndex, ReflectionAttrs,
ReflectionModel and SurfaceInterpMethod Output Commands are not
supported. The implementation uses the surface interior (front) attributes
when rendering back-facing surfaces.
The InteriorBundleLookupTable attributes ReflectionAttrs,
ReflectionModel, InterpMethod, BFReflectionAttrs, BFReflectionModel,
BFInterpMethod, BFStyle, BFStyleIndex, and BFColor are not supported
and have no effect.
The AnnotationText Output Commands (OC) support only one substring or
mono encoding per OC on hardware-accelerated adapters. The server
sends the client a PEXOutputCommandError if the client sends an
AnnotationText OC with more than one substring.
All Output Commands over 65532 bytes in length are not supported on
hardware accelerated adapters. The server returns a
PEXOutputCommandError to the client if the client sends an OC with a
length greater than 65532 bytes. The SetOfFillAreaSets (SOFAS) OC is
the only exception, as long as each individual FillAreaSet defined by the
SOFAS is no longer than 65532 bytes.
The server on hardware-accelerated adapters can only accept a subset of
the possible entries in the Color Approximation Table. Invoke the Color
200
Softgraphics Adapters:
The software-based PEX server does not render primitives that contain color
types other than RGBFloat and Indexed. The server renders primitives that
contain color types other than RGBFloat or Indexed with the color stored in
entry 1 of the color lookup table. If entry 1 of the color LUT is not defined, if or
the color LUT does not exist, the server renders the primitive with the color
white.
10.3.3.2 Other Notes about PEX Server
The software-based PEX server performs better on 8-bit adapters when
the PEX client uses a full 322 or best colormap.
The virtual memory requirement for the PEX server is larger due to the
size of the SoftGraphics rendering code. You may need more real memory
or disk paging space to run the PEX server effectively.
The software based PEX server does not normalize direction vectors that
are found in the Light LUT Entries and in primitives that specify vertex or
facet normals. The PEX specification requires that the client normalize
these vectors for correct results. A PEXlib function is available for this
purpose.
The client program should accomplish double buffering by using the X
DBE with the IBM SoftGraphics technology and the POWER GTX1000.
You cannot use DBE for double buffering on the GtO, Gt4, Gt4x, and Gt4e
adapters. In the case of these adapters, use the double buffering escapes
PEX
201
You are not required to install InfoExplorer Version 3.2.5 or later to view the
PEX 4.1.0 InfoExplorer documentation.
The PEX documentation can be used with single-byte languages only.
10.3.3.4 CGE Extensions to PEX 5.1
The CGE extension operates on all IBM graphic adapters except the
GrayScale Graphics Adapter and GXT3000P. IBM servers fully support CGE
PEX 5.1 on all the adapters through the IBM SoftGraphics technology.
PEXlib
CGE PEX 5.1 is integrated into IBM's PEXlib library. To access the CGE
functions, add the preprocessor directives to include the standard PEXlib 5.1
header file and the CGE PEX 5.1 header file:
#include <Xll/PEX5/PEXlib.h>
#include <X11/PEX5/PEXExtlib.h>
202
Utility Extensions
CGE offers utilities to assist you with visual and colormap organization. The
header files defining the constants and data structures needed to use these
utilities are in:
Include files: /usr/lpp/X11/Xamples/pex/pexlib/cge/util/Cmap
Library file: /usr/lpp/X11/Xamples/pex/pexlib/cge/util/libPEXUt.a
Samples: /usr/lpp/X11/Xamples/pex/pexlib/cge/clients/ptorus
10.3.3.5 PHIGS-SI Programming Interface
This is the PHIGS Sample Implementation library from the X11R5 distribution.
It implements a PHIGS/PHIGS PLUS style C binding and does not fully
conform to the ISO PHIGS PLUS C bindings. The library requires the PEX
Workstation Subset in the PEX server, which may not be implemented in
some vendors' PEX servers.
Use the following to set the environment variable for the PHIGS monitor:
(ksh:) export PEXAPIDIR=/usr/lpp/X11/Xamples/pex/si-phigs/lib/X11/PEX
(csh:) setenv PEXAPIDIR /usr/lpp/X11/Xamples/pex/si-phigs/lib/X11/PEX
The man pages replace the hardcopy manuals, use them as users guide and
subroutines reference.
Please see the README file in the main directory for more information. The
Text Formatting filesets are required to read the man command.
10.3.3.6 graPHIGS Programming Interface
If a graPHIGS application uses an XPEX workstation type, it automatically
generates the PEX protocol.
PEX
203
204
11.1 History
In the past, graphics performance was often measured in terms of vectors per
second or polygons per second. Since the terms were ambiguous, it was
difficult to compare one vendors product with anothers. Typical
discrepancies were the length of the vectors and whether they were being
drawn end to end or separately or what size of polygon was being drawn and
how it was shaded or what type of lighting was being utilized.
This was not only frustrating for customers but also for vendors.
In late 1986, the major workstation vendors and users met to discuss this lack
of standardized methods for measuring graphics performance. From this and
subsequent meetings grew the Picture Level Benchmark (PLB) project. This
benchmark, created with the assistance of Digital Equipment Corp. (now
Compaq), Hewlett-Packard, IBM, and Sun Microsystems, is a software
package that provides a practical comparison of graphics display
performance for different hardware platforms.
The OpenGL Performance Characterization project was started in 1993, and
it published the first numbers for the Viewperf benchmark in the fourth quarter
of 1994. The GLperf benchmark was released in August 1997.
These benchmark projects are all part of the Graphics Performance
Characterization (GPC) Group which joined the Standard Performance
Evaluation Corp. (SPEC) in early 1996.
The latest addition to the GPC is the Application Performance
Characterization project group that just announced its first benchmarks in
1998.
205
206
GLperf will also take input from standard input if no input file is given.
You can download the Viewperf code and instructions for running the
benchmark from the ftp.specbench.org site along with any of the five viewsets
you wish to run. There are several precompiled versions of the Viewperf
executable available as well. IBM has supplied one for the PowerPC platform
as well as one for Windows NT on the x86 architecture.
Viewsets are designed by the vendors and not by the OPC project group
although the OPC will assist the vendors. The five standard viewsets are:
1. Parametric Technologys CDRS (to be replaced soon by Parametric
Technology Corporations Pro/DESIGNER)
2. IBMs Data Explorer
3. Intergraphs DesignReview
4. Alias/Wavefronts Advanced Visualizer
5. Lightscape Technologys Lightscape Visualization System
Be aware that the viewsets have had some new versions released and
ensure that you are comparing the same versions of benchmarks across all
platforms under test.
The Viewperf benchmarks are run from shell scripts included with the
individual viewsets, for example, ~/viewperf.5.1/Light-01/Light-01.sh.
Benchmarking
207
208
6. A suite of BIF standard benchmark files that are used for graphics
performance tests.
The best method for running this benchmark is for the users to convert their
applications into BIF files and run them directly on the vendors ports of the
PLB program. However, since few users may have the time or technical
expertise to do this, the PLB project group has developed eight BIF files
based on popular applications.
It is important to note that although the PLB allows buyers to compare
performance, it does not address the issue of display quality. This subjective
issue is left to the eyes of the beholder.
PLBwire93 is a composite of three tests: sys_chassis, race_car, and seafloor.
These benchmarks are representative of entry level 3D wireframe
applications. These benchmarks are rendered without Z buffering, depth
cueing, anti-aliasing, or wide lines.
The file designated as sys_chassis is a 3D wireframe model of a computer
chassis. During the course of the test, the chassis is rotated, panned,
zoomed, and viewed from different perspectives. The chassis is composed of
6,107 3D solid polylines and 158 3-D dashed polylines. The number of
vertices per polyline ranges from two to 11; there is a total of 19,064 vectors.
Five hundred (500) frames are displayed in this test.
Benchmarking
209
210
Benchmarking
211
The head file depicts a 3D human head modeled using data generated by a
laser scanner. This type of file is typical of applications in animation, special
effects, and biomedical areas. The data set consists of nearly 60,000
triangles that are rendered using multiple T-mesh strips. There are four
directional light sources illuminating the object as it rotates three times
around the Y-axis in 240 frames.
212
quadrilateral meshes, triangle strips, and polygons for a total of 3,355 facets.
The planet model consists of quadrilateral meshes totalling 5,632 facets.
Constellation data was derived from the BOSS star catalog and is modeled
using 2,283 3D markers. Three light sources - ambient, directional and point are used to light the scenes.
Benchmarking
213
214
Benchmarking
215
216
Benchmarking
217
:
:
:
:
-vcriteria -vcrit
-vid <id>
-vaccum -vac
-valpha -val
-vdepthbuffer -vz
-vstencil -vst
-indirectrender -ir
-nodither -ndi
-ortho -or
Perspective
-displaylist -dl
-colorper -cp <mode>
:
:
:
:
:
:
:
:
218
-backface -bf
-frontface -ff
-singlebuffer -sb
-fog -fg
-linesmooth -ls
-polysmooth -ps
-facetnormal -fn
-linestipple -lp
-polystipple -pp
-toggle -tg <cap>
Appendix B.2, Viewperf Output from CDRS 03 Test 3 on page 257, shows
the Viewperf output from CDRS-03 Test #3. The last line of the output
provides the number of frames per second for that portion of the test. This
result, along with the rest of the tests results, is printed in the report page
that is submitted to the OPC and is published in the GPC News. A single
composite number is also reported that is derived using a weighted geometric
mean methodology.
Benchmarking
219
There is a very good paper explaining the reasoning for and method of
calculating the weighted geometric mean. It is available for viewing or
download at http://www.spec.org/gpc/opc.static/geometric_mean.html.
220
Benchmarking
221
222
Adapter
System
Clock Rate
Op. Sys.
L2
cache
GPC/XPC
Xmark93
GXT120P
43P-140
233
AIX430
1 MB
12.77
GXT120P
43P-140
3323
AIX430
1 MB
14.13
GXT150M
595
AIX421
NA
GXT150M
3CT
AIX421
NA
GXT250P
43P-133
166
AIX421
512 KB
GXT250P
43P-140
233
AIX421
1 MB
24.27
GXT250P
43P-240(1)
166
AIX421
512 KB
18.93
GXT250P
43P-240(1)
233
AIX421
1 MB
21.07
GXT250P
43P-240(2)
166
AIX421
512 KB
18.16
GXT250P
43P-240(2)
233
AIX421
1 MB
19.80
GXT250P
F40(1)
166
AIX421
512 KB
18.93
GXT250P
F40(1)
166
AIX421
1 MB
21.07
GXT250P
F40(2)
233
AIX421
512 KB
18.16
GXT250P
F40(2)
166
AIX421
1 MB
19.80
GXT255P
43P-140
233
AIX421
1 MB
21.27
GXT255P
43P-140
332
AIX431
1 MB
24.27
GXT255P
43P-150
---
AIX432
1 MB
29.21
GXT255P
43P-240(1)
166
AIX421
512 KB
19.55
GXT255P
43P-240(1)
233
AIX421
1 MB
19.73
GXT255P
43P-240(2)
166
AIX421
512 KB
18.96
GXT255P
43P-240(2)
233
AIX421
1 MB
18.93
GXT255P
43P-260(1)
---
AIX432
4 MB
25.79
Benchmarking
223
224
Adapter
System
Clock Rate
Op. Sys.
L2
cache
GPC/XPC
Xmark93
GXT255P
43P-260(2)
---
AIX432
4 MB
25.56
GXT255P
F40(1)
166
AIX421
512 KB
19.55
GXT255P
F40(1)
233
AIX421
1 MB
19.73
GXT255P
F40(2)
166
AIX421
512 KB
18.96
GXT255P
F40(2)
233
AIX421
1 MB
18.93
GXT255P
F50
166
AIX431
256 KB
24.62
GXT550P
43P-140
233
AIX421
1 MB
15.36
GXT550P
43P-140
332
AIX431
1 MB
16.73
GXT550P
43P-140
332
AIX432
1 MB
---
GXT550P
43P-150
---
AIX432
1 MB
18.10
GXT550P
43P-240(1)
166
AIX421
512 KB
12.17
GXT550P
43P-240(1)
233
AIX421
1 MB
13.41
GXT550P
43P-240(2)
166
AIX421
1 MB
11.96
GXT550P
43P-240(2)
233
AIX421
1 MB
113.00
GXT550P
F40(1)
166
AIX421
512 KB
12.17
GXT550P
F40(1)
233
AIX421
1 MB
13.41
GXT550P
F40(2)
166
AIX421
512 KB
11.96
GXT550P
F40(2)
233
AIX421
1 MB
13.00
GXT800M
397
160
AIX430
NA
---
GXT800P
43P-140
233
AIX421
1 MB
18.80
GXT800P
43P-240(1)
166
AIX421
512 KB
14.20
GXT800P
43P-240(1)
233
AIX421
1 MB
15.71
GXT800P
43P-240(2)
166
AIX421
512 KB
14.03
GXT800P
43P-240(2)
233
AIX421
1 MB
15.31
GXT800P
F40(1)
166
AIX421
512 KB
14.20
GXT800P
F40(1)
233
AIX421
1 MB
15.71
Adapter
System
Clock Rate
Op. Sys.
L2
cache
GPC/XPC
Xmark93
GXT800P
F40(2)
166
AIX421
512 KB
14.03
GXT800P
F40(2)
233
AIX421
1 MB
15.31
GXT800PT
43P-140
233
AIX421
1 MB
18.39
GXT800PT
43P-240(1)
166
AIX421
512 KB
14.59
GXT800PT
43P-240(1)
233
AIX421
1 MB
16.35
GXT800PT
43P-240(2)
166
AIX421
512 KB
14.17
GXT800PT
43P-240(2)
233
AIX421
1 MB
15.49
GXT800PT
F40(1)
166
AIX421
512 KB
14.59
GXT800PT
F40(1)
233
AIX421
1 MB
16.35
GXT800PT
F40(2)
166
AIX421
512 KB
14.17
GXT800PT
F40(2)
233
AIX421
1 MB
15.49
GXT3000P
43P-150
---
AIX421
1 MB
37.17
GXT3000P
43P-260(1)
---
AIX432
4 MB
37.35
GXT3000P
43P-260(2)
---
AIX432
4 MB
37.09
System
Clock
Rate
Op.
Sys.
L2
cache
PLBwire
PLBsurf
GXT250P
43P-140
233
AIX421
1 MB
62.90
38.50
GXT250P
43P-240(1)
166
AIX421
512 KB
41.60
29.50
GXT250P
43P-240(1)
233
AIX421
1 MB
50.80
35.50
GXT250P
43P-240(2)
166
AIX421
512 KB
56.90
41.40
GXT250P
43P-240(2)
233
AIX421
1 MB
62.10
46.90
GXT250P
F40(1)
166
AIX421
512 KB
41.60
29.50
GXT250P
F40(1)
166
AIX421
1 MB
50.80
35.50
GXT250P
F40(2)
233
AIX421
512 KB
56.90
41.40
GXT250P
F40(2)
166
AIX421
1 MB
32.10
46.90
Benchmarking
225
226
Adapter
System
Clock
Rate
Op.
Sys.
L2
cache
PLBwire
PLBsurf
GXT255P
43P-140
233
AIX421
1 MB
127.10
45.90
GXT255P
43P-140
332
AIX431
1 MB
152.70
51.50
GXT255P
43P-150
---
AIX432
1 MB
178.60
75.40
GXT255P
43P-240(1)
166
AIX421
512 KB
83.80
35.60
GXT255P
43P-240(1)
233
AIX421
1 MB
96.20
40.00
GXT255P
43P-240(2)
166
AIX421
512 KB
97.60
49.00
GXT255P
43P-240(2)
233
AIX421
1 MB
100.40
52.20
GXT255P
43P-260(1)
---
AIX432
4 MB
158.60
78.10
GXT255P
43P-260(2)
---
AIX432
4 MB
213.30
106.00
GXT255P
F40(1)
166
AIX421
512 KB
83.80
35.60
GXT255P
F40(1)
233
AIX421
1 MB
96.20
40.00
GXT255P
F40(2)
166
AIX421
512 KB
97.60
49.00
GXT255P
F40(2)
233
AIX421
1 MB
100.40
52.20
GXT255P
F50
166
AIX431
256 KB
121.70
80.60
GXT550P
43P-140
233
AIX421
1 MB
134.30
133.90
GXT550P
43P-140
332
AIX431
1 MB
149.70
144.20
GXT550P
43P-140
332
AIX432
1 MB
149.90
144.00
GXT550P
43P-150
---
AIX432
1 MB
152.80
160.40
GXT550P
43P-240(1)
166
AIX421
512 KB
114.30
108.80
GXT550P
43P-240(1)
233
AIX421
1 MB
135.30
123.70
GXT550P
43P-240(2)
166
AIX421
1 MB
141.30
129.10
GXT550P
43P-240(2)
233
AIX421
1 MB
146.30
153.00
GXT550P
F40(1)
166
AIX421
512 KB
114.30
108.80
GXT550P
F40(1)
233
AIX421
1 MB
135.30
123.70
GXT550P
F40(2)
166
AIX421
512 KB
141.30
139.10
GXT550P
F40(2)
233
AIX421
1 MB
146.30
153.00
Adapter
System
Clock
Rate
Op.
Sys.
L2
cache
PLBwire
PLBsurf
GXT800M
397
160
AIX430
NA
158.70
257.80
GXT800P
43P-140
233
AIX421
1 MB
131.40
202.40
GXT800P
43P-240(1)
166
AIX421
512 KB
113.60
167.30
GXT800P
43P-240(1)
233
AIX421
1 MB
134.00
198.40
GXT800P
43P-240(2)
166
AIX421
512 KB
140.00
223.80
GXT800P
43P-240(2)
233
AIX421
1 MB
148.40
269.40
GXT800P
F40(1)
166
AIX421
512 KB
113.60
167.30
GXT800P
F40(1)
233
AIX421
1 MB
134.00
198.40
GXT800P
F40(2)
166
AIX421
512 KB
140.00
223.80
GXT800P
F40(2)
233
AIX421
1 MB
148.40
269.40
GXT800PT
43P-140
233
AIX421
1 MB
134.00
207.40
GXT800PT
43P-240(1)
166
AIX421
512 KB
114.50
168.70
GXT800PT
43P-240(1)
233
AIX421
1 MB
137.70
202.50
GXT800PT
43P-240(2)
166
AIX421
512 KB
140.80
228.90
GXT800PT
43P-240(2)
233
AIX421
1 MB
154.80
277.20
GXT800PT
F40(1)
166
AIX421
512 KB
114.50
168.70
GXT800PT
F40(1)
233
AIX421
1 MB
137.70
202.50
GXT800PT
F40(2)
166
AIX421
512 KB
140.80
228.90
GXT800PT
F40(2)
233
AIX421
1 MB
154.80
277.20
GXT3000P
43P-150
---
AIX421
1 MB
257.30
468.90
GXT3000P
43P-260(1)
---
AIX432
4 MB
436.90
610.80
GXT3000P
43P-260(2)
---
AIX432
4 MB
627.40
866.20
System
GXT150M
595
Clock
Rate
Op.
Sys.
L2
cache
CDRS-03
DX-03
DRV04
421
NA
7.85
1.54
0.91
Benchmarking
227
228
Adapter
System
GXT150M
3CT
GXT250P
43P-133
GXT250P
Op.
Sys.
L2
cache
CDRS-03
DX-03
DRV04
421
NA
4.26
0.79
0.47
166
421
512 KB
3.26
0.80
0.56
43P-140
233
421
1 MB
4.75
1.16
0.79
GXT250P
43P-240
(1)
166
421
512 KB
3.07
0.81
0.59
GXT250P
43P-240
(1)
233
421
1 MB
4.63
1.11
0.77
GXT250P
F40(1)
166
421
512 KB
3.07
0.81
0.59
GXT250P
F40(1)
166
421
1 MB
4.63
1.11
0.77
GXT255P
43P-133
166
421
512 KB
5.81
2.17
1.12
GXT255P
43P-140
233
421
1 MB
7.90
3.13
1.62
GXT255P
43P-140
332
431
1 MB
9.02
4.06
2.04
GXT255P
43P-150
---
432
1 MB
10.05
5.02
2.52
GXT255P
43P-240
(1)
166
421
512 KB
5.73
2.15
1.09
GXT255P
43P-240
(1)
233
421
1 MB
6.69
2.80
1.41
GXT255P
43P-260
(1)
---
432
4 MB
8.06
4.35
2.08
GXT255P
43P-260
(2)
---
432
4 MB
8.06
4.35
2.08
GXT255P
F40(1)
166
421
512 KB
5.73
2.15
1.09
GXT255P
F40(1)
233
421
1 MB
6.69
2.80
1.41
GXT255P
F50
166
431
256 KB
8.18
4.75
2.18
GXT550P
43P-140
233
421
1 MB
30.53
6.50
2.67
GXT550P
43P-140
332
431
1 MB
32.70
8.21
3.28
GXT550P
43P-140
332
432
1 MB
32.51
8.22
3.27
GXT550P
43P-150
---
432
1 MB
33.77
10.30
3.96
Clock
Rate
Adapter
System
Clock
Rate
Op.
Sys.
L2
cache
CDRS-03
DX-03
DRV04
GXT550P
43P-240
(1)
166
421
512 KB
24.49
4.84
2.02
GXT550P
43P-240
(1)
233
421
1 MB
30.03
6.50
2.68
GXT550P
43P-240
(2)
233
421
1 MB
31.51
8.12
3.00
GXT550P
F40(1)
166
421
512 KB
24.49
4.84
2.02
GXT550P
F40(1)
233
421
1 MB
30.00
6.01
2.65
GXT550P
F40(2)
166
421
512 KB
30.39
6.93
2.44
GXT550P
F40(2)
233
421
1 MB
31.51
8.12
3.00
GXT800M
397
160
430
NA
41.67
7.70
3.79
GXT800P
43P-140
233
421
1 MB
33.47
6.47
2.84
GXT800P
43P-240
(1)
166
421
512 KB
29.03
5.02
2.17
GXT800P
43P-240
(1)
233
421
1 MB
33.92
6.52
2.89
GXT800P
43P-240
(2)
166
421
512 KB
34.09
6.91
2.47
GXT800P
43P-240
(2)
233
421
1 MB
35.75
8.29
3.02
GXT800P
F40(1)
166
421
512 KB
29.03
5.02
2.17
GXT800P
F40(1)
233
421
1 MB
33.92
6.52
2.89
GXT800P
F40(2)
166
421
512 KB
34.09
6.91
14.03
GXT800P
F40(2)
233
421
1 MB
35.75
8.29
3.02
GXT800PT
43P-140
233
421
1 MB
38.51
6.43
3.27
GXT800PT
43P-240
(1)
166
421
512 KB
33.76
4.96
2.56
GXT800PT
43P-240
(1)
233
421
1 MB
39.16
6.49
3.36
GXT800PT
43P-240
(2)
166
421
512 KB
39.47
6.83
3.00
Benchmarking
229
Adapter
System
Clock
Rate
Op.
Sys.
L2
cache
CDRS-03
DX-03
DRV04
GXT800PT
43P-240
(2)
233
421
1 MB
41.54
8.25
3.68
GXT800PT
F40(1)
166
421
512 KB
33.76
4.96
2.56
GXT800PT
F40(1)
233
421
1 MB
39.16
6.49
3.36
GXT800PT
F40(2)
166
421
512 KB
39.47
6.83
3.00
GXT800PT
F40(2)
233
421
1 MB
41.54
8.25
3.68
GXT3000P
43P-150
---
421
1 MB
94.76
11.16
6.17
GXT3000P
43P-260
(1)
---
432
4 MB
218.17
16.37
7.32
GXT3000P
43P-260
(2)
---
432
4 MB
218.17
16.37
7.32
230
Adapter
System
Clock
rate
Op sys
L2cach
e
light-01
Awadvs-01
GXT800M
397
160
430
NA
0.69
7.27
GXT800PT
43P-140
233
421
1 MB
0.66
7.46
GXT800PT
43P-240(1)
166
421
512 KB
0.48
5.40
GXT800PT
43P-240(1)
233
421
1 MB
0.65
7.34
GXT800PT
43P-240(2)
166
421
512 KB
0.63
7.43
GXT800PT
43P-240(2)
233
421
1 MB
0.73
9.69
GXT800PT
F40(1)
166
421
512 KB
0.48
5.40
GXT800PT
F40(1)
233
421
1 MB
0.64
7.34
GXT800PT
F40(2)
166
421
512 KB
0.63
7.43
GXT800PT
F40(2)
233
421
1 MB
0.73
9.69
GXT3000P
43P-150
---
421
1 MB
1.22
13.77
231
{
int i, ix, iy;
prefsize( 200, 100 );
winopen( "HI THERE" );
doublebuffer();
gconfig();
for( i = 1; i < 1800; i++ ) {
color( BLACK );
clear();
color( GREEN );
ix = (int)( 40.0 * cos ( ((double) i) / 20.0 ) );
iy = (int)( 40.0 * sin ( ((double) i) / 20.0 ) );
cmov2( 50 + ix, 50 + iy );
charstr( "Hello, World!" );
swapbuffers();
}
}
Next, the system is told to convert this window into a double-buffered window.
The program does this in two steps:
1. Alerts the system with the doublebuffer() subroutine.
2. Sets double buffering into operation with the gconfig() subroutine.
The process requires two steps because there are, in fact, a number of
configurations into which a window can be placed.
for( i = 1; i < 1800; i++ ) {
color( BLACK );
clear();
color( GREEN );
ix = (int)( 40.0 * cos ( ((double) i) / 20.0 ) );
iy = (int)( 40.0 * sin ( ((double) i) / 20.0 ) );
cmov2( 50 + ix, 50 + iy );
charstr( "Hello, World!" );
swapbuffers();
232
Next, the program goes into a loop that is repeated 1800 times. Inside this
loop, we clear the screen and draw the text as before.
The sin() and cos() subroutines are AIX system calls that return the sine and
cosine of an angle. They are useful for drawing circular primitives.
The program uses the loop counter as an angle and moves the current
character position accordingly.
Finally, when drawing is complete, the swapbuffers() subroutine exchanges
the front and the back buffers.
After looping 1800 times, the program exits, and the window disappears.
Note: Not all adapters support double buffering.
A.1.2 Sample Program 3 - Event Loop
The next program demonstrates how to obtain input and illustrates the
concept of an event loop.
The event loop is critical to writing applications for a windowing system. An
event loop allows a program to respond to events occurring in the system that
are beyond the control of the application program, such as when a user picks
up a window and moves it, has a window obscured and then unobscured by
other windows, or resizes a window.
At this point, return to the first program (Sample Program 1), change the
sleep time to 50 seconds, then recompile and rerun the program. While it is
running, pick up another window (for instance, the xclock), drop it on the HI
THERE window, pick it up again, and remove it. Notice that the original
"Hello, World!" display was destroyed. This occurred because the other
window overwrote the pixel data in the HI THERE window, and the
overwritten data was not saved (GL does not support backing store or
save-under).
When the contents of a window are destroyed that way, the application itself
must redraw the window. GL provides an event that indicates that a window
may have to be redrawn. The application must test for this event and redraw
the window whenever the event is received. The discussion after the
following program explains how the testing and redrawing is done:
#include <gl/gl.h>
#include <gl/device.h>
233
up input devices */
REDRAW ); /* window needs to be redrawn */
WINQUIT ); /* user selected "close" from window menu */
MOUSEX ); /* mouse x position, in pixels */
MOUSEY ); /* mouse y position, in pixels */
ESCKEY ); /* user pressed escape key */
RIGHTMOUSE );/* user pressed right mouse button */
234
When you run this program, you will find that the character string "Hello,
World!" follows the cursor around. You can pick up the window, move it,
obscure it, and uncover it, but it will always appear correctly. The following
discussion examines the operation of this complicated program in detail.
The detail for each line is:
/* This subroutine draws stuff */
drawstuff( int xxx, int yyy )
{
color( BLACK );
clear();
color( GREEN );
cmov2i( xxx, yyy );
charstr( "Hello, World!" );
swapbuffers();
}
To make the program easier to read, the drawing section has been put into its
own subroutine, drawstuff, which contains a set of GL subroutines. When you
want the program to draw, call this subroutine.
235
Next, the program obtains the window origin with the getorigin() subroutine,
which will be needed later.
/* queue
qdevice(
qdevice(
qdevice(
qdevice(
qdevice(
qdevice(
up input devices */
REDRAW ); /* window needs to be redrawn */
WINQUIT ); /* user selected "close" from window menu */
MOUSEX ); /* mouse x position, in pixels */
MOUSEY ); /* mouse y position, in pixels */
ESCKEY ); /* user pressed escape key */
RIGHTMOUSE );/* user pressed right mouse button */
Then, a number of devices are queued up. These devices, the REDRAW
device, the MOUSEX device, and so on, generate events and place them on
a queue. The program reads events from the bottom of the queue and
processes them according to what came in. The qdevice() subroutine itself
does not generate or process events, but only initializes these devices and
readies them for use.
/* enter event loop */
while( TRUE ) {
...
}
Although this looks like an infinite loop, if the user presses either the escape
key or the right mouse button, or else chooses the Close option from the
window menu, the program ends.
236
long dev;
short value;
/* if there arent any events, and data has changed, redraw */
if( !qtest() & update ) {
drawstuff( ix, iy );
update = FALSE;
}
/* get the next event */
dev = qread( &value );
In the loop, the program tests to see if there are any events on the event
queue. If the queue is empty and the picture needs to be redrawn, the
program begins to draw at this time.
If the queue is not empty, then the program reads the next event and
processes it. The qread() subroutine returns the device that generated the
event and a value associated with that event.
/* dispatch the next event */
switch( dev ) {
...
}
Depending on the device, the switch statement branches to the correct code
to handle the event.
case MOUSEX:
ix = value - ox;
update = TRUE;
break;
case MOUSEY:
iy = value - oy;
update = TRUE;
break;
/* update x location */
/* update y location */
If, for instance, the event is a mouse-motion event, the new x or y coordinate
(or both) is recorded.
case ESCKEY: /* if user presses escape key, quit */
case RIGHTMOUSE: /* if user presses right mouse button, quit */
case WINQUIT: /* if "close" selected from window menu */
exit();
237
If the user moves the window, a REDRAW event is generated. In this case,
the window origin is obtained, so that the character string can be drawn in the
right place later.
After a nonterminating event is processed, the program returns to the
beginning of the event loop and processes the next event.
A.1.3 Begin-End Style Drawing
Begin-end style drawing subroutines draw primitive graphical figures. In these
subroutines, all points, lines, and polygons are described in terms of vertices
(sets of coordinates that identify points in space).
A point is described by a single vertex.
A line segment is described by two vertices indicating its end points.
A polygon is described by a set of three or more vertices indicating its
corners.
To draw a graphical figure, use a series of vertex subroutines surrounded by
a pair of begin and end subroutines, which mark the beginning and end of the
figure. For example, the code to draw a set of five points A, B, C, D and E
takes the following form:
<beginning of point vertices>
<vertex A>
<vertex B>
<vertex C>
<vertex D>
<vertex E>
<end of point vertices>
To draw a polygon whose corners are the same five points, the code takes
the form:
<beginning of polygon vertices>
<vertex A>
<vertex B>
<vertex C>
238
<vertex D>
<vertex E>
<end of polygon vertices>
A.1.3.1 Lines
This code draws a pair of lines connecting its opposite corners:
Int32
Int32
Int32
Int32
vert1[2]
vert2[2]
vert3[2]
vert4[2]
bgnline();
v2i( vert1
v2i( vert3
endline();
bgnline();
v2i( vert2
v2i( vert4
endline();
=
=
=
=
{
{
{
{
100,
100,
500,
500,
100
500
500
100
};
};
};
};
/*
/*
/*
/*
lower
upper
upper
lower
left corner */
left corner */
right corner */
right corner */
);
);
);
);
In this example, four long arrays are declared, vert1, vert2, vert3, and vert4.
Values are assigned to all the elements of each array.
The next four lines of code draw a line from (100, 100) to (500, 500) the
lower-left corner to the upper-right corner. The bgnline() subroutine tells the
system to prepare to draw a line using the following vertices. Then the v2i()
subroutine takes an array of coordinates as its parameter and creates a
vertex at those coordinates.
The first v2i() subroutine call after the bgnline() subroutine creates the first
end point of the line segment. The second v2i() subroutine call after the
bgnline() subroutine creates the end point of the line segment, and the
system draws a line. The endline() subroutine call tells the system that it has
all the vertices for the line. The next four lines of code draw a line from (100,
500) to (500, 100), the lower-right corner to the upper-left corner.
A.1.3.2 Polylines
If more than two points are listed between the bgnline() and endline()
subroutines, each point is connected to the next by a line:
bgnline();
v2i( vert1 );
v2i( vert2 );
v2i( vert3 );
239
v2i( vert4 );
v2i( vert1 );
endline();
Note: The first vertex, v2i(vert1), is repeated to close the series of line
segments.
A series of connected line segments is called a polyline. GL cannot draw
polylines with more than 256 vertices. Other than the number of vertices,
there are no restrictions on a polyline. The segments can cross each other,
vertices can be reused, and if the vertices are defined in terms of three
dimensions, you can place them anywhere within 3D space. In a 3D space,
the vertices need not all lie in the same plane.
A.1.3.3 Closed Lines
In the previous subsection, the code draws a closed polyline a line
segment connecting the last point in the polyline to the first point in the
polyline. Because this is a fairly common operation, there is a pair of
subroutines to do it: the bgnclosedline() and endclosedline() subroutines.
This code generates the same figure as the previous code does.
bgnclosedline();
v2i( vert1 );
v2i( vert2 );
v2i( vert3 );
v2i( vert4 );
endclosedline();
240
Elements type
2D vectors
3D vectors
4D vectors
16-bit integer
v2s
v3s
v4s
Elements type
2D vectors
3D vectors
4D vectors
32-bit integer
v2i
v3i
v4i
v2f
v 3f
v4f
v2d
v3d
v4d
All forms of the vertex subroutine begin with the letter v. The second
character is 2, 3, or 4, indicating the number of dimensions, and the final
character is s for short integer, i for long integer, f for single-precision
floating-point, and d for double-precision floating-point. For example, the 2D
syntaxes are as follows:
void
void
void
void
v2s(
v2i(
v2f(
v2d(
Int16 vector[2] )
Int32 vector[2] )
Float32 vector[2] )
Float64 vector[2] )
The following code illustrates the use of some of the different vertex
subroutines. It draws exactly the same picture as the previous code does, but
uses different versions of the vertex subroutine.
Int16 vert1[3] =
Int32 vert2[2] =
Float32 vert3[2]
Float64 vert4[3]
bgnline();
v3s( vert1
v2i( vert2
v2f( vert3
v3d( vert4
v3s( vert1
endline
{
{
=
=
200, 200, 0 };
200, 400 };
{ 400.0, 400.0 };
{ 400.0, 200.0, 0.0 };
);
);
);
);
);
241
A.1.3.5 Points
To draw a set of unconnected points in GL, enter a set of vertices specified
between the bgnpoint() and endpoint() subroutines. The system draws each
vertex as a one-pixel point on the screen.
bgnpoint();
v2i( vert_first ); /* draw first point */
...
v2i( vert_last ); /* draw first point */
endpoint();
As for the line-drawing subroutines, you can have no more than 256 vertices
between calls to the bgnpoint() and endpoint() subroutines.
Polypoints Subroutine
The points that are drawn by the bgnpoint() and endpoint() subroutines are
precisely one pixel in size. This size cannot be changed. Although GL does
not have any explicit bgnpolymarker() or endpolymarker() subroutines, there
are several methods you can use to get polypoints that are larger than one
pixel.
Font Subroutines defrasterfont, font
If you want polypoints in the shape of raster patterns, use the font
subroutines. That is, the set of rasters to use should be associated with
letters of the alphabet with the defrasterfont() subroutine. This font is then
made current with the font subroutine. The raster patterns, which do not have
to look like letters, can be positioned and drawn with the cmov() and charstr()
subroutines, respectively.
Nonraster Polymarker Primitives Using Display Lists
Nonraster polymarker primitives can be created with display lists. For
instance, display list line drawings in the shape of boxes, stars, crosses,
asterisks, and so forth, can be created by using the makeobj() subroutine,
followed by the drawing, followed by a closeobj() subroutine. To draw one of
these items, position with the translate() subroutine and draw it with the
callobj() subroutine.
A.1.3.6 Other Primitives
Other aspects of begin-end style drawing include Points, Polygons,
Point-Sampled Polygons, Polygonal Shading, and Triangular Meshes.
242
Vendor = IBM
243
Version = 1.2
Extensions = GLX_EXT_visual_info GLX_EXT_visual_rating
GLX_EXT_import_context
Useable Extensions = GLX_EXT_visual_info
GLX_EXT_visual_rating GLX_EXT_import_context
GL Extension:
Vendor = IBM
Renderer = GXT3000
Version = 1.2.0
Extensions = GL_EXT_texture_object GL_EXT_vertex_array
GL_EXT_rescale_normal GL_IBM_rasterpos_clip
GL_IBM_cull_vertex GL_EXT_multi_draw_arrays
GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color
GL_EXT_blend_logic_op GL_EXT_polygon_offset
GL_EXT_subtexture GL_EXT_texture3D
GL_EXT_texture_edge_clamp GL_EXT_texture_lod
GL_IBM_texture_mirrored_repeat
=================== 15 Visuals for Screen 0 (default = 0x21) ===================
PseudoColor visual: ID = 0x21 (hex) 33 (decimal) screen = 0
OVERLAY(1) SINGLE buffered MONO COLOR INDEX visual
GL Sizes: ColorIndex=8,
Extensions: visualCaveat=None, OPAQUE
Core X: depth=8, colormapSize=256
PseudoColor visual: ID = 0x22 (hex) 34 (decimal) screen = 0
OVERLAY(1) SINGLE buffered MONO COLOR INDEX visual
GL Sizes: ColorIndex=8,
Extensions: visualCaveat=None, TRANSPARENT INDEX, index value=255
Core X: depth=8, colormapSize=255
PseudoColor visual: ID = 0x23 (hex) 35 (decimal) screen = 0
DOUBLE buffered MONO COLOR INDEX visual with (Z Stencil)
GL Sizes: ColorIndex=8, Z=24, Stencil=8
Extensions: visualCaveat=None, OPAQUE
Core X: depth=8, colormapSize=256
PseudoColor visual: ID = 0x24 (hex) 36 (decimal) screen = 0
DOUBLE buffered MONO COLOR INDEX visual with (Z)
GL Sizes: ColorIndex=8, Z=24,
Extensions: visualCaveat=None, OPAQUE
Core X: depth=8, colormapSize=256
TrueColor visual: ID = 0x25 (hex) 37 (decimal) screen = 0
DOUBLE buffered STEREO RGB visual with (Alpha Z Stencil Accum)
GL Sizes: RGBA=(4,4,4,4), Z=24, Stencil=8, Accum=(16,16,16,16)
Extensions: visualCaveat=None, OPAQUE
Core X: depth=12, colormapSize=16 RGB: masks=(0xf00,0xf0,0xf) bits=4
TrueColor visual: ID = 0x26 (hex) 38 (decimal) screen = 0
DOUBLE buffered MONO RGB visual with (Z)
GL Sizes: RGBA=(8,8,8,0), Z=24,
Extensions: visualCaveat=None, OPAQUE
Core X: depth=24, colormapSize=256 RGB: masks=(0xff0000,0xff00,0xff) bits=8
DirectColor visual: ID = 0x27 (hex) 39 (decimal) screen = 0
DOUBLE buffered MONO RGB visual with (Z)
GL Sizes: RGBA=(8,8,8,0), Z=24,
Extensions: visualCaveat=None, OPAQUE
Core X: depth=24, colormapSize=256 RGB: masks=(0xff0000,0xff00,0xff) bits=8
TrueColor visual: ID = 0x28 (hex) 40 (decimal) screen = 0
DOUBLE buffered MONO RGB visual with (Z Stencil)
GL Sizes: RGBA=(8,8,8,0), Z=24, Stencil=8,
Extensions: visualCaveat=None, OPAQUE
Core X: depth=24, colormapSize=256 RGB: masks=(0xff0000,0xff00,0xff) bits=8
244
245
A.2.2.1 Preparation
No coding changes in the application are needed. Effective with the release
of AIX Version 4.3.2, it is no longer necessary to relink your applications to
use Easy MP, but with the previous release of AIX, your application must be
recompiled using the thread-enabling compiler whose name is cc_r (instead
of cc).
The application automatically selects the uni-processor version of OpenGL if
your system has only one processor, you are running on an adapter that Easy
MP does not support, or a direct context is not available for your application
(for example, if you are using accumulation buffers, you are not permitted to
run direct on current MP-capable adapters).
Note, that the target machine must NOT be down level to the relinking
machine, because AIX does not guarantee backward binary compatibility. As
long as your application is intended for use on AIX Version 4.1.5, 4.2.1, or
4.3.0, you can relink your application for use by Easy MP according to the
following rules:
Table 20. Relinking Rules for Easy MP
Target Machine
Re Linking Machine
Compiler to Use
cc_r
4.2.1
4.1.5
cc_r
4.2.1
4.2.1
cc_r
4.3.2
4.1.5
cc_r
4.3.2
4.2.1
cc_r
4.3.2
4.3.2
cc
246
247
Extension Name
248
OpenGL
Version
Description
GL_EXT_abgr
GL_EXT_bgra
1.2
GL_EXT_blend_color
1.2
GL_EXT_blend_logic_op
1.1
GL_EXT_blend_minmax
1.2
Imaging
GL_EXT_blend_subtract
1.2
Imaging
GL_EXT_compiled_vertex_array
GL_EXT_multi_draw_arrays
GL_EXT_packed_pixels
Extension Name
OpenGL
Version
Description
GL_EXT_polygon_offset
1.1
GL_EXT_rescale_normal
1.2
GL_EXT_subtexture
1.1
GL_EXT_texture3D
1.2
1.2
Imaging
GL_EXT_texture_edge_clamp
249
Extension Name
250
OpenGL
Version
Description
GL_EXT_texture_object
1.1
GL_EXT_vertex_array
1.1
GL_IBM_rasterpos_clip
GL_IBM_static_data
OpenGL
Version
Extension Name
Description
GL_IBM_texture_mirrored_repeat
GL_IBM_vertex_cull
Extension Name
(first implemented)
GL_EXT_abgr (4.1.4)
VFB
250P
255P
500
500D
500P
550P
800P
800M
1000
3000P
GL_EXT_bgra (4.3.2)
GL_EXT_blend_color
(4.3.2)
GL_EXT_blend_logic_op
(4.1.4)
GL_EXT_blend_minmax
(4.1.4)
GL_EXT_blend_subtract
(4.1.4)
GL_EXT_compiled_verte
x_array (4.3.0)
251
Extension Name
(first implemented)
GL_EXT_multi_draw_arr
ays (4.3.2)
VFB
250P
255P
500
500D
500P
550P
800P
800M
Y
(up
only)
Y
(up
only)
1000
GL_EXT_packed_pixels
(4.3.2)
GL_EXT_polygon_offset
(4.1.4)
GL_EXT_rescale_normal
(4.1.4)
GL_EXT_subtexture
(4.1.4)
GL_EXT_texture3D
(4.2.0)
GL_EXT_texture_edge_c
lamp (4.3.2)
GL_EXT_texture_object
(4.1.4)
GL_EXT_vertex_array
(4.1.4)
GL_IBM_rasterpos_clip
(4.2.1)
Y
(mp
only)
Y
(mp
only)
GL_IBM_static_data
(4.2.1 PTF)
GL_IBM_texture_mirrore
d_repeat (4.3.2)
GL_IBM_vertex_cull
(4.3.0)
252
3000P
Y
Y
:
:
Benchmark Information
Benchmark Title
Benchmark Authors
Implementation Information
Implementation
Implementation
Implementation
Implementation
Title
Version
Date
Authors
Graphics Library
:
Graphics Library Version:
YAGL
2.0
System Configuration
System Make and Model :
Hardware Configuration :
:
Operating System
Windowing System
PLB Window Size
Stopwatch Accuracy
Acme OS 2.5
Louver Windows 2.5
900 x 720 pixels (not including borders)
10 ms
:
:
:
:
Invocation Information
plb brftest.vrb
LITERAL TEST
253
1.0 LIGHT_STATE:. . . . .
1.0
2.0 INTERIOR_SHADING: GOURAUD:
1.0
1.0
1.0
POLYGON:. . . . .
POLYGON3: . . . .
FILL_AREA_SET:. .
FILL_AREA_SET3: .
TRIANGLE3:. . . .
QUAD_MESH3: . . .
INDEX_POLYGONS3:.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
14.0
14.0
21.0
22.0
13.0
25.0
6.0
3.0
3.0
2.0
2.0
9.0
13.0
2.0
14.0
14.0
21.0
22.0
13.0
25.0
8.0
3.0
3.0
5.0
5.0
9.0
13.0
2.0
POLYGON3: . . . .
FILL_AREA_SET3: .
TRIANGLE3:. . . .
QUAD_MESH3: . . .
INDEX_POLYGONS3:.
.
.
.
.
.
4.0
13.0
0.0
0.0
6.0
0.0
9.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
254
Average
Edges
Visible
Per Frame
0.0
0.0
0.0
0.0
0.0
2.0 FILL_AREA_SET3: . . .
1.0 INDEX_POLYGONS3:. . .
14.0
6.0
Average
number
Control Points
Per Frame
2.0 NURBS_CURVE:. . . . .
2.0 NURBS_SURFACE:. . . .
2.0 TRIMMING_CURVE: . . .
Average
Average
Rational Non Rational
Splines
Splines
Per Frame Per Frame
11.0
10.0
6.0
1.0
1.0
0.0
1.0
1.0
2.0
Average
Average
Uorder
Vorder
per
per
Primitive Primitive
2.0 NURBS_CURVE:. . . . .
2.0 NURBS_SURFACE:. . . .
2.0 TRIMMING_CURVE: . . .
2.5
2.5
2.0
2.0
Average
TrimCurves
per
Primitive
1.0
MARKER: . . . . .
MARKER3:. . . . .
LINE: . . . . . .
LINE3:. . . . . .
TEXT: . . . . . .
TEXT3:. . . . . .
ANNOTATION_TEXT3:
Average
Individual
Primitives
Per Frame
.
.
.
.
.
.
.
.
.
.
.
.
.
.
11.0
25.0
15.0
22.0
37.0
82.0
37.0
markers
markers
vectors
vectors
characters
characters
characters
Benchmarks Files
255
4.0
9.0
4.0
12.0
2.0
10.0
1.0
3.0
2.0
1.0
3.0
1.0
1.0
11.0
1.0
2.0
8.0
1.0
MARKER_SIZE:
MARKER_COLOR:
LINE_WIDTH:
LINE_COLOR:
INTERIOR_STYLE:
INTERIOR_COLOR:
SURFACE_PROPERTIES:
EDGE_TYPE:
EDGE_COLOR:
TEXT_COLOR:
CHAR_HEIGHT:
CHAR_EXP:
CHAR_SPACE:
LINE_TYPE:
INTERIOR_LIGHTING:
BACKFACE_PROCESSING:
EDGE_FLAG:
TEXT_PREC:
EXECUTE_STRUCTURE:
CALL_STRUCTURE:
INVOKE_AT_FRAME TOTAL:
INVOKE_AT_FRAME CALL:
INVOKE_AT_FRAME EXECUTE:
256
Port Notes
21.61
:
:
:
:
:
:
:
2
4.03 (literal test)
0.02
0.50
2.02
94.47%
21.16%
Benchmarks Files
257
Window System
X Window System V11
Driver Version
NA
OpenGL Vendor
IBM
OpenGL Version
1.0.0
OpenGL Extensions
GL_EXT_texture_object
GL_EXT_vertex_array GL_EXT_rescale_normal GL_EXT_abgr
GL_EXT_blend_logic_op GL_EXT_blend_minmax GL_EXT_blend_subtract
GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture3D
OpenGL Renderer
GXT800 Texture
OpenGL Client Vendor
IBM
OpenGL Client Version
1.1
OpenGL Client Extensions
GLX_EXT_visual_info
GLX_EXT_visual_rating GLX_EXT_import_context
GLU Version
1.2.1 AIX
GLU Extensions
Direct Rendering
False
Double Buffer
True
Stereo
False
RGBA
True
Color Index Size
1
Red Size
8
Green Size
8
Blue Size
8
Alpha Size
8
Accum Red Size
0
Accum Green Size
0
Accum Blue Size
0
Accum Alpha Size
0
Depth Size
24
Stencil Size
4
Auxiliary Buffer Count
0
Frame BufferLevel
0
Visual ID
0X28
Visual Class
TrueColor
Window Width (pixels)
700
Window Height (pixels)
700
Screen Width (pixels)
1280
Screen Height (pixels)
1024
Display
:0.0
OpenGL Server Vendor
IBM
OpenGL Server Version
1.1
OpenGL Server Extensions
GLX_EXT_visual_info
GLX_EXT_visual_rating GLX_EXT_import_context
GLX Server Version
1.1
GLX Server Extensions
GLX_EXT_visual_info
GLX_EXT_visual_rating GLX_EXT_import_context
Screen Number
0
258
True
MINIMUM
1
./mower-ts
-mh
10.000000
0
71
31380
441.971831
NONE
0
TMESH
COLOR_PER_PRIMITIVE
FALSE
TRUE
FALSE
FALSE
FALSE
FALSE
FILL
FILL
FALSE
FALSE
1.000000
FALSE
FALSE
1
0
TRUE
FRONT
AMBIENT_AND_DIFFUSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
NO_TEXTURE_GENERATION
NONE
NEAREST
NEAREST
DECAL
3
TRUE
TRUE
SRC_ALPHA
Benchmarks Files
259
260
//
//
//
//
1.0)
0.0)
0.0)
1.0)
Off)
Off)
Benchmarks Files
261
(Aspect
(AtoAMapSize
(Blend
(BlueBias
(BlueScale
(BtoBMapSize
(CharFont
(CharsPerString
(ClearAccumBuffer
(ClearColor
(ClearColorBuffer
(ClearDepthBuffer
(ClearIndex
(ClearStencilBuffer
(ClipAmount
(ClipMode
(ClipObjs
(ColorData
(ColorDim
(ColorMask
(ColorMaterialMode
(ColorMaterialSide
(CopyPixelsType
(CullFace
(DataAlignment
(DepthBias
(DepthMask
(DepthOrder
(DepthScale
(DepthTest
(DirectRender
(Dither
(DrawBuffer
(DrawOrder
(DrawableType
(DstBlendFunc
(ExecuteMode
(FacingBack
(FacingFront
(Fog
(GreenBias
(GreenScale
(GtoGMapSize
(ImageAlignment
(ImageFormat
(ImageLSBFirst
(ImageSwapBytes
262
1.0)
1)
Off)
0.0)
1.0)
1)
f9x15)
16)
False)
White)
True)
False)
0.0)
False)
.5)
Random)
0.0)
None)
3)
TTTT)
GL_AMBIENT_AND_DIFFUSE)
GL_FRONT)
GL_COLOR)
Off)
0)
0.0)
On)
BackToFront)
1.0)
Off)
True)
On)
GL_FRONT)
Spaced)
WindowDraw)
GL_ONE)
Immediate)
0.0)
1.0)
Off)
0.0)
1.0)
1)
4)
GL_RGBA)
False)
False)
(ImageType
GL_UNSIGNED_BYTE)
(IndexMask
0xfff)
(IndexOffset
0)
(IndexShift
0)
(InfiniteLights
0)
(ItoAMapSize
1)
(ItoBMapSize
1)
(ItoGMapSize
1)
(ItoIMapSize
1)
(ItoRMapSize
1)
(LineStipple
Off)
(LineWidth
1.0)
(LocalLights
0)
(LocalViewer
Off)
(LogicOp
Off)
(LoopFuncPtrs
False)
(LoopUnroll
1)
(MapColor
Off)
(MapStencil
Off)
(MinimumTime
5)
(NormalData
None)
(Objs
1)
(ObjsPerBeginEnd
1)
(Orientation
Random)
(PixelZoomX
1.0)
(PixelZoomY
1.0)
(PointDraw
Off)
(PolygonModeBack
GL_FILL)
(PolygonModeFront
GL_FILL)
(PolygonSides
4)
(PolygonStipple
Off)
(PrintModeDelta
Off)
(PrintModeMicrosec
Off)
(PrintModePixels
On)
(PrintModeStateDelta
Off)
(Projection
Perspective)
(RasterPosDim
2)
(ReadBuffer
GL_FRONT)
(ReadOrder
Spaced)
(RedBias
0.0)
(RedScale
1.0)
(RejectObjs
0.0)
(RenderMode
GL_RENDER)
(Reps
1)
(Rgba
True)
(RtoRMapSize
1)
(Scissor
Off)
Benchmarks Files
263
(ShadeModel
(Shininess
(Size
(SpecularComponent
(SrcBlendFunc
(StencilTest
(StoSMapSize
(TexBorder
(TexComps
(TexData
(TexFunc
(TexGen
(TexHeight
(TexImageBorder
(TexImageComps
(TexImageLevel
(TexImageMipmap
(TexImageSrc
(TexImageTarget
(TexLOD
(TexMagFilter
(TexMinFilter
(TexTarget
(TexWidth
(TexWrapS
(TexWrapT
(TransformType
(TwistsPerStrip
(TwoSided
(VertexDim
(WindowHeight
(WindowWidth
GL_SMOOTH)
10.0)
10.0)
On)
GL_ONE)
Off)
1)
0)
3)
None)
GL_DECAL)
Off)
64)
0)
3)
0)
None)
SystemMemory)
GL_TEXTURE_2D)
0.0)
GL_NEAREST)
GL_NEAREST)
Off)
64)
GL_REPEAT)
GL_REPEAT)
Rotate)
0)
Off)
3)
600)
600)
//
// Pixel Read Tests
//
ReadPixelsTest {
(UserString printf("ReadPixels (Immediate, RGB, ubyte, %dx%d)",
ImageWidth, ImageHeight))
(ImageFormat GL_RGB)
(ImageType GL_UNSIGNED_BYTE)
([ImageWidth ImageHeight] from 16 to 512 step 100%)
}
ReadPixelsTest {
(UserString printf("ReadPixels (Immediate, RGBA, ubyte, %dx%d)",
264
ImageWidth, ImageHeight))
(ImageFormat GL_RGBA)
(ImageType GL_UNSIGNED_BYTE)
([ImageWidth ImageHeight] from 16 to 512 step 100%)
}
Benchmarks Files
265
266
267
AIX
AT
GXT150M
IBM
OS/2
POWER Gt1
POWER Gt3i
POWER Gt4e
POWER Gt4xi
PowerPC 604
SP
268
Special Notices
269
270
CD-ROM Title
System/390 Redbooks Collection
Networking and Systems Management Redbooks Collection
Transaction Processing and Data Management Redbook
Lotus Redbooks Collection
Tivoli Redbooks Collection
AS/400 Redbooks Collection
RS/6000 Redbooks Collection (HTML, BkMgr)
RS/6000 Redbooks Collection (PostScript)
RS/6000 Redbooks Collection (PDF Format)
Application Development Redbooks Collection
Subscription
Number
SBOF-7201
SBOF-7370
SBOF-7240
SBOF-6899
SBOF-6898
SBOF-7270
SBOF-7230
SBOF-7205
SBOF-8700
SBOF-7290
Collection Kit
Number
SK2T-2177
SK2T-6022
SK2T-8038
SK2T-8039
SK2T-8044
SK2T-2849
SK2T-8040
SK2T-8041
SK2T-8043
SK2T-8037
271
272
e-mail address
usib6fpl@ibmmail.com
Contact information is in the How to Order section at this site:
http://www.elink.ibmlink.ibm.com/pbl/pbl/
Telephone Orders
United States (toll free)
Canada (toll free)
Outside North America
1-800-879-2755
1-800-IBM-4YOU
Country coordinator phone number is in the How to Order
section at this site:
http://www.elink.ibmlink.ibm.com/pbl/pbl/
Fax Orders
United States (toll free)
Canada
Outside North America
1-800-445-9269
1-403-267-4455
Fax phone number is in the How to Order section at this site:
http://www.elink.ibmlink.ibm.com/pbl/pbl/
This information was current at the time of publication, but is continually subject to change. The latest
information for customer may be found at http://www.redbooks.ibm.com/ and for IBM employees at
http://w3.itso.ibm.com/.
IBM Intranet for Employees
IBM employees may register for information on workshops, residencies, and redbooks by accessing
the IBM Intranet Web site at http://w3.itso.ibm.com/ and clicking the ITSO Mailing List button.
Look in the Materials repository for workshops, presentations, papers, and Web pages developed
and written by the ITSO technical professionals; click the Additional Materials button. Employees
may also view redbook. residency, and workshop announcements at http://inews.ibm.com/.
273
Order Number
First name
Quantity
Last name
Company
Address
City
Postal code
Country
Telephone number
Telefax number
VAT number
Card issued to
Signature
We accept American Express, Diners, Eurocard, Master Card, and Visa. Payment by credit card not
available in all countries. Signature mandatory for credit card payment.
274
List of Abbreviations
2D
Two Dimensional
3D
Three Dimensional
ABX
Ancillary Buffer
Extension
ACM
Association of
Computing Machinery
AIX
Advanced Interactive
eXecutive
CGE
Common Graphics
Environment
CMY
COSE
Common Open
Software Environment
CPU
CRT
DBE
Double Buffer
Extension
DDC
DDX
Device Dependent X
DMA
ALU
ANSI
American National
Standards Institute
APA
DSO
DirectSoft OpenGL
APAR
Authorized Program
Analysis Report
DSP
Digital Signal
Processor
APC
Application
Performance
Characterization
EDF
ETC
Application
Programming Interface
Explicit Traversal
Control
FIPS
Architectural Review
Board
Federal Information
Processing Standards
GKS
Benchmark
Interchange Format
Graphical Kernel
System
GKX-CO
Graphical Kernel
System Compatibility
Option
API
ARB
BIF
BLAST
BRF
Benchmark Reporting
Format
GL
Graphic Library
GLU
OpenGL Utility
BTM
Benchmark Timing
Methodology
GLUT
GLX
OpenGL Extension to X
CAD
Computer Aided
Design
GPC
Graphics Performance
Characterization
CAM
Computer AIded
Manufacturing
GUI
Graphical User
Interface
CBGA
HLHSR
CDE
Common Desktop
Environment
275
HSB
Hue Saturation
Brightness
ROM
Read-Only Memory
HSV
SGI
Silicon Graphics,
Incorporated
IBM
International Business
Machines Corporation
SIGGRAPH
IOCA
SIMD
Single Instruction,
Multiple Data
ISO
International Standards
Organization
SMP
Symmetric Multi
Processing
ITSO
International Technical
Support Organization
SPEC
Standard Performance
Evaluation Corporation
LPFK
Lighted Program
Function Keyboard
TGS
Template Graphics
Software, Inc.
MBX
Multi-Buffer Extension
UDS
MPI
Message Passing
Interface
User Defined
Specifications
VFB
VOO
NURBS
Non-Uniform Rational B
Splines
X Windows
OPC
OpenGL Performance
Characterization
XPC
X Performance
Characterization
PAC
Peripheral Adapter
Connector
XVFB
PCA
Peripheral Connector
Assembly
Xlib
X Windows Library
PEX-IC
PEX-Interoperability
Center
PEX-SI
PEX Sample
Implementation
PGI
PHIGS
Programmers
Hierarchical Interactive
Graphics System
PLB
Picture Level
Benchmark
RAM
Random Access
Memory
RAMDAC
Random Access
Memory Digital Analog
Converter
RGB
276
Index
Symbols
.Xdefaults 107
/etc/inittab 77
_GL_USE_UNDERLYING_CURSOR 119
_OGL_MIXED_MODE_RENDERING 170
Numerics
3-Button Mouse 41
black 41
3D-RAM Chips 8
64-bit 138
A
abbreviations 275
accumulation 5
accumulation buffer 132
acronyms 275
active shutter glasses 58
alpha Buffer 3
antialiasing 3, 10, 192
aperture grille 37
Application Performance Characterization 205
Architecture Review Board 129, 134
attachment Cable Kit 46
5086 46
6095 46
PC/AT 46
PC/XT PS/2 46
RS/6000 46
Awads-01 230
CATweb 81
CDE 61
ceramic ball grid array 9
CGE 192
charstr 127
chdisp 65
Choice 93
classes of graphics adapters 10
clear 126
cmov2 126
color 126
Color Graphics Display Adapter 12
colormap 11, 203
comp.graphics.opengl 134
compatibility 63
context 83
Core 87
culling 4
cursorpad 43
cyl_head 211
DDC-2B 9
default graphics adapter 65
depth cueing 4, 21, 22
development toolkit 62
device driver 11, 31
devices.mca.8f61 32
devices.mca.8f9a 32
devices.pci.14103c00 32
devices.pci.14105400 32
devices.pci.14105e00 32
devices.pci.14108e00 32
devices.pci.2b101a05 32
devices.pci.33531188 31
devices.pci.3353c088 31
DirectSoft OpenGL 81, 82, 138
DISPLAY 103
display list 151
Display PostScript 11, 12, 20, 22
dithering 91
DMA 7
double buffering 4
CATIA 81, 88
Easy MP 137
277
emitter 58
explicit traversal control 91
EXTENSIONS 77, 105, 118, 143, 197
External Defaults File 106
F
feature code
1511 44
1512 44
2650 25
2657 15
2660 17
2665 18
2711 21
2712 21
2713 21
2760 11
2768 17
2770 12
2776 20
2777 16
2780 19
2781 19
2782 19
2783 19
2790 21
2791 21
2792 21
2794 21
2795 20, 21
2796 20, 21
2803 13
2810 48
2811 48
2825 31
2837 24
2839 15
2850 29
2851 26
2852 26
2853 29
2855 27
2859 29
4000 50
4015 44, 50
4020 50
4030 44
4035 44
278
4060 51
4061 52
4063 52
4064 52
4065 52
4200 53
4207 14
4208 13
4213 38
4217 38
4235 38
4237 38
4238 38
4239 38
4350 22
6041 41
6351 44
8741 41
9525 51
fileset 61, 76, 85, 100, 117, 140, 195
flat shading 4
Fortran 92, 116, 131
four button cursor 45
frame buffer 3, 4, 11
G
G52 39
gamma correction 4, 9, 32
GKS 11, 12, 20, 22, 87
GKS-3D 87
GKS-CO 88, 92
GL 20, 22
GL 3.2 84, 115
GL Widgets 123
GLperf 206, 207, 222
GLU 131, 132
GLUT 133, 146
GLX 131, 132, 146
Gouraud shading 4, 21, 22, 115, 131
GP-MIT-SHM 98, 105
gPPROFILE 106
Graphical Kernel System 92
Graphics Performance Characterization 205
graPHIGS 11, 12, 20, 22, 84, 87, 88
Grayscale Graphics Display Adapter 11
Gt1b 13
Gt4 116
Gt4e 116
Gt4i 116
Gt4x 116
Gt4xi 116
GXT1000 117, 195
GXT120P 23, 32, 33
GXT150 195
GXT150M 24, 32
GXT250 195
GXT250P 25, 32, 33
GXT255P 26, 32, 33
GXT3000P 6, 33, 58, 100, 115
GXT500 116, 195
GXT500D 116
GXT550P 26, 32, 33, 58
GXT800 195
GXT800M 33, 58
GXT800P 33, 58
keyboard
quiet touch 41
quiet touch black 42
Chinese/US 43
Croatian 43
Czech 42
Danish 42
Dutch 42
French 42
French Canadian 43
German/Austrian 42
Greek, 42
Hebrew 42
Hungarian 42
Icelandic 42
Italian 42
Japanese 42
Korean 43
LA Spanish 43
Norwegian 42
Polish 42
Portuguese 42
Romanian 42
Russian 43
Serbian-Cyrillic 43
Slovakian 42
Spanish 42
Swedish/Finnish 42
Swiss, French/German 42
Thailand 43
UK English 42
US English 42
light-01 230
Lighted Program Function Keyboard 49
Attachment 49
Setting Up 49
lighting 3, 10
lmodtest 120
Locator 93
lorenz 120
lsdisp 65
luminance 4
H
hardware acceleration 10
hardware colormap 4
hardware cursors 9
High-Performance 3D Color Graphics Processors
18
HLHS Removal 4
I
IBM E15-type Graphic 14
IBMPEXSOFT 199
image board 95
immediate mode 88, 100, 115, 130, 192
InteriorBundleLookupTable 200
ISO PHIGS 92
language 42
Arabic 43
Belgian/French 42
Belgian/UK-Flemish 42
Brazilian Portuguese 42
Bulgarian 42
Canadian French 42
Magellan 57
MatchRenderingTargets 201
material 7
mice 41
monochrome 11
morphing 91
Motif 61
279
motion blur 5
MVP Power Multi-Monitor 23
N
naming conventions 147
nucleus 89
NURBS 21, 22, 115
O
oceantopo 214
OpenGL 8, 81, 83, 88, 129, 191, 222
OpenGL context 131
OpenGL extensions 77
OpenGL Performance Characterization 206
OpenGL Widget 133
operating mode 93
overlay buffer 5, 8
P
P201 39
P202 37
P70 39
P72 37
P92 37
palette DAC chip 8
PCI 7
performance 169
performance degradation 34
PEX 191
PEXGetEnumTypeInfo 201
PEXlib 12, 20, 192, 193, 202
PEXOutputCommandError 200
PEXSearchNetwork 200
PEX-SI 192
PHIGS 87, 192
PHIGS PLUS 87, 88, 192
Phong 131
Pick 93
Picture Level Benchmark 205, 208
pipeline 7
PLBsurf 225
PLBsurf93 211
PLBwire 225
PLBwire93 209
polygons per second 205
PostScript 98
POWER Gt1 12
280
POWER Gt1x 13
POWER Gt3 15
POWER Gt3i 16
POWER Gt4 20
POWER Gt4e 19
POWER Gt4i 21
POWER Gt4x 20
POWER Gt4xi 21
POWER GTO Accelerator 22
POWER GXT110P 15
POWER GXT150L 17
POWER GXT155L 17
POWER GXT3000P 29
POWER GXT500P 117
POWER GXT550P 117
POWER GXT800M 28, 117
POWER GXT800P 28, 117
power management 62
PowerDisplay 39
prefsize 126
primitives 193
PROFILE 106
programming 109, 124, 143, 203
R
race_car 209
RAMDAC 3, 5
rasterization 3, 10
rasterizer 5, 7
refresh rate 68
removable wrist rest 41
rendering 5
resolution 32, 43, 67
retained mode 88, 89, 192
RGB 5
robotarm 120
runivp 103
S
S15 Graphics Adapter 14
screen dump 123
SDRAM 8
seafloor 209, 210
setup/BLIT unit 5
shuttle 211, 212
SIGGRAPH 87
SIMD 8
six button cursor 45
sleep 127
SMIT 67, 68, 142
Soft OpenGL 135, 171
Softgraphics 10, 84, 97, 135, 194, 201
spaceball 54
Standard Performance Evaluation Corp 205
stencil buffer 5, 8, 132
stereo 5, 8
stereographics 3, 57
String 93
Stroke 93
Structure State 95
Structure Store 95
Structures 92
studio 213
synchronization 7
sys_chassis 209
SYSPRINT 108
System State 94
T
tablet 43
technology 3
texture 3
texture buffer 5
texture mapping 10, 131, 192
transformations 3, 10
transparency 192
Trinitron 37
two button stylus 46
U
underlay buffer 5
utility buffer 8
utility planes 6
V
Valuator 93
vectors per second 205
vertex 7
VESA 9
video scaling 6
Viewperf 217, 219, 222
Visual System Management 64
winopen 126
Workstation State 94
X
X 78
X Consortium 64, 192
X Extensions 62, 69
X Performance Characterization 206
X resource 71
X Server Extension 118
X Virtual Frame Buffer 64, 75, 83
X Window System 115
X_SHM_SIZE 208
X11 61
x11perf 206, 208, 216
x24wd 123
x24wud 123
xclock 78
Xdefaults 71, 72
xdpyinfo 198
xdt 62
xhost 78
xinit 77, 104, 118
Xlib 11, 12, 20
Xmark 217
Xmark.sh 216
Xmark93 206
xprop 78
xserverrc 105, 143
XSOFT 97, 105
Xstation 98
xstdcmap 199
xwd 79, 80, 83
xwdtops 124
xwininfo 80
xwud 79, 80, 83
Z
ZAPdb 138
Z-buffer 6
W
window ID buffer 6
281
282
_ IBM employee
Please rate your overall satisfaction with this book using the scale:
(1 = very good, 2 = good, 3 = average, 4 = poor, 5 = very poor)
Overall Satisfaction
__________
Yes___ No___
Comments/Suggestions:
283
SG24-5130-00
Printed in the U.S.A.
SG24-5130-00