D3PLOT 22.1

3D Protocol: OpenGL

3D protocol: OpenGL

The OpenGL graphics library has become the de-facto industry standard, and is available on virtually all hardware.

OpenGL itself has no native window support, it runs under the windowing system of its host machine. Therefore on Unix machines OpenGL rendering takes place within an X window, and on PCs within a "windows" window. In environments that support it OpenGL can operate in separate client/server mode, and using "objects" in the server can be efficient in this mode.

OpenGL is similar in most respects to X_Windows except that it is fully three-dimensional and utilises hardware acceleration for most graphics functions. In particular:

The image can be rotated, translated and scaled dynamically using the mouse as under X. But this is now carried out by the hardware so, depending on hardware power and size of model, this can be done far faster.

All calculations involving hidden-surface removal are done by the hardware using Z-buffering, generally far faster than they can be achieved in software.

Likewise all shading and lighting calculations are done in hardware, again far faster than in software. Smooth (gouraud) shading and transparency are implemented in hardware.

"Clipping", the ability to calculate the intersection between the image and arbitrary planes, is provided. This provides facilities such as "Z-clipping" which are not available in software.

OpenGL will give better performance than 2D X under nearly all circumstances. The exceptions to this are:

Large animations:

3D animations require up to4 times the amount of memory as the equivalent under X. If you attempt to create large animations you may run your machine out of memory, or at least cause it to "page" unacceptably. Very large (ie product of #vectors x #frames) animations are best carried out under X for this reason.
Hidden-line plots:

Hidden-line (and line contour) plots produced by Z-buffering are not as good as those generated in software. You can get round this by switching temporarily back to 2-D mode.

The complications of different visuals and numbers of bit-planes do not usually apply to OpenGL. They operate in "RGB" mode (roughly equivalent to Truecolor), and generate intermediate shades by hardware dithering if not enough bit-planes are available to produce the required colour directly.

If your device supports 3D you should use it.