Contained Within
Find More Documentation
Featured Support Resources
| Download this book in PDF
- CHAPTER 1
Introduction to the OpenGL for Solaris Software
- The OpenGL for Solaris software is Sun's native implementation of the OpenGL application programming interface (API). The OpenGL API is an industry-standard, vendor-neutral graphics library. It provides a small set of low-level geometric primitives and many basic and advanced 3D rendering features, such as modeling transformations, shading, lighting, anti-aliasing, texture mapping, fog, and alpha blending.
OpenGL 1.1.1 for Solaris Product Functionality
- The OpenGL 1.1.1 for Solaris software is a functionally conforming implementation based on the OpenGL 1.1, GLX 1.2, and GLU 1.2 standard specifications. The OpenGL 1.1.1 for Solaris software incorporates the new features in OpenGL and includes support for the SERVER_OVERLAY_VISUALS property.
OpenGL 1.1.1 Library
- The OpenGL 1.1.1 library is a superset of OpenGL 1.1, including all OpenGL 1.1 functionality and additional features that were available as extensions to OpenGL 1.0. The added extensions, which are listed in TABLE 1-1 on page 2, have become part of base OpenGL functionality; however, the semantics or syntax may have changed
- in OpenGL 1.1.1 for Solaris. For detailed information on the extensions incorporated into the OpenGL 1.1 specification, see Appendix C in The OpenGL Graphics System: A Specification, Version 1.1.
-
TABLE 1-1
| OpenGL 1.1 Name | Extension Name | Changed Syntax or Semantics |
| Vertex arrays | GL_EXT_vertex_array | Yes |
| Polygon offset | GL_EXT_polygon_offset | Yes |
| RGBA logical operations | GL_EXT_blend_logic_op | No |
| Internal texture image formats | GL_EXT_texture | No |
| Texture replace environment | GL_EXT_texture | No |
| Texture proxies | GL_EXT_texture | Yes |
| Copy texture and subtexture | GL_EXT_copy_texture
GL_EXT_subtexture | No |
| Texture objects | GL_EXT_texture_object | Yes |
-
Note - Because the OpenGL 1.1.1 for Solaris software is based on a more current version of the OpenGL specifications (OpenGL 1.1, GLX 1.2, GLU 1.2) than the OpenGL 1.0 version, customers currently using the OpenGL 1.0 extensions syntax should be alert for software changes required to support the updated OpenGL specifications.
Supported OpenGL 1.1.1 Extensions
- The OpenGL 1.1.1 for Solaris software supports the following OpenGL extensions:
-
- 3D texture mapping extension - GL_EXT_texture3D
- ABGR reverse-order color format extension - GL_EXT_abgr
- Texture color table extension - GL_SGI_texture_color_table
- SGI color table extension - GL_SGI_color_table
- Sun geometry compression extension - GL_SUNX_geometry_compression
- Rescale normal extension - GL_EXT_rescale_normal
- Histogram extension - GL_EXT_histogram
-
- Postconvolution color table extension - GL_SGI_postconvolution_color_table
- Convolution extension - GL_EXT_convolution
- Blend color extension - GL_EXT_blend_color
- Blend minmax extension - GL_EXT_blend_minmax
- Blend suptract extension - GL_EXT_blend_subtract
- Pixel transform extension - GL_EXT_pixel_transform
- Multidrawarrays extension - GL_SUN_multi_draw_arrays
- Convolution border mode extension - GL_HP_convolution_border_modes
- Convolution border mode extension - GL_SUN_convoution_border_modes
- Pixel transformation extension - GL_EXT_pixel_transform
-
Note - glBlendEquationEXT(GL_LOGIC_OP) is not supported. Instead of using the code sequence:
-
-
glLogicOpEXT(GL_XOR)
glBlendEquationEXT(GL_LOGIC_OP)
glEnable(GL_BLEND)
use the following code sequence:
glLogicOp(GL_XOR)
/* GL_LOGIC_OP not supported
in glBlendEquationEXT with
OpenGL for Solaris */
#ifdef GL_VERSION_1_1
glEnable(GL_COLOR_LOGIC_OP)
#endif
- The OpenGL 1.1.1 for Solaris software also supports the following GLX extensions:
-
- Return the transparent pixel index for an overlay/underlay window pair - GLX_SUN_get_transparent_index. See the glXGetTransparentIndexSUN(3gl) man page.
- fbconfig extension - GLX_SGIX_fbconfig
- pbuffer extension - GLX_SGIX_pbuffer
- make current read extension - GLX_SGI_make_current_read
- Multithread support extension - GLX_SUN_init_threads
-
Note - To determine what extensions, if any, your application uses, search for command-name patterns such as glProcedureEXT(3gl). If your application uses extensions, you will need to ensure that it also handles the functionality in an OpenGL 1.1-compliant manner. To determine what extensions an OpenGL implementation supports, use glXQueryExtensionString(3gl). Because the OpenGL 1.1.1 for Solaris software is based on a more current version of the OpenGL specifications (OpenGL 1.1, GLX 1.2, GLU 1.2) than the OpenGL 1.0 version, customers currently using the OpenGL 1.0 extensions syntax should be alert for software changes required to support the updated OpenGL specifications.
Compatibility Issues
- Applications compiled with the previous OpenGL for Solaris libraries will run unchanged with the Solaris OpenGL 1.1.1 implementation. However, note the following backward compatibility issues:
-
- To reduce function call overhead and improve performance for vertex calls in immediate mode, vertex commands such as glVertex, glColor, glNormal, glTexCoord and glIndex have been redefined as macros in the OpenGL 1.1.1 for Solaris software. Therefore, by default, applications compiled with the OpenGL 1.1.1 for Solaris library will not run on the 1.0 library. To compile an application with the OpenGL 1.1.1 for Solaris library and maintain compatibility with 1.0, use the flag -DSUN_OGL_NO_VERTEX_MACROS when compiling the application. See the glVertex (3gl) man page for further information.
- If your application uses the features in the OpenGL 1.1.1 for Solaris library, these are not available in the previous release for OpenGL It will not be backward compatible with the previous OpenGL libraries.
MT-Safe
- The OpenGL for Solaris library is multithread safe (MT-safe). Multiple rendering threads are allowed in a single process. See man page glXInitThreadsSUN(3gl).
- If an application needs only one rendering thread, MT-safe mode is not recommended. MT-safe mode incurs some performance overhead which can be avoided for single threaded rendering. Some multithread cases may contain computation or GUI threads. For these cases an application can create one OpenGL rendering thread and separate GUI or computational threads.
- Multithread safe allows OpenGL parallelism. This parallelism supports single to multiple processors as well as single to multiple screens.
- Multithread safe does not allow:
-
- More than one thread using the same context
- More than one current context per thread
- The maximum number of OpenGL rendering threads supported is 64.
- The following MT-Safe patches are required:
-
- Solaris 2.5.1 +patch 103566-27
- Solaris 2.6 +patch 105633-02 (if using Creator patch 105360-04 also needed)
-
Caution - When the OpenGL renderer (see glGetString(GL_RENDERER)) is a graphics accelerator (not a software renderer), multiple rendering threads to the same screen might perform slower than single threaded rendering. If possible, avoid multithreaded rendering to a single graphics accelerated screen.
Supported Platforms
- The OpenGL 1.1.1 for Solaris software supports the following devices:
-
- Creator Graphics and Creator3D Graphics - OpenGL functionality is accelerated in hardware.
- SX, ZX, GX, GX+, TGX, TGX+, S24 - OpenGL functionality is performed in software.
- All SMCC SPARCTM systems equipped with the following frame buffers are supported on the OpenGL 1.1.1 for Solaris software: the TCX, SX, GX, ZX and Creator families of frame buffers. This includes UltraTM desktop, Ultra EnterpriseTM and all the legacy SPARCstationTM family.
-
Note - The PGX frame buffer family is not supported by the OpenGL 1.1.1 for Solaris software.
Where to Look for Information on OpenGL Programming
- For information on how to write an OpenGL application, see the following books:
-
-
OpenGL Programming Guide by Neider, Davis, and Woo
-
OpenGL Reference Manual by the OpenGL Architecture Review Board
-
OpenGL Programming for X Windows System by Mark Kilgard
- These books are published by Addison-Wesley and are available through your local bookstore.
- For more information on OpenGL, you may want to refer to "The Design of the OpenGL Interface" written by Mark Segal and Kurt Akeley. A PostScript copy of this document is included in the SUNWgldoc package or the OpenGL 1.1.1 for Solaris CD-ROM. For the complete specification of what constitutes OpenGL, see The OpenGL Graphics System: A Specification, Version 1.1, also written by Mark Segal and Kurt Akeley. An online version of this specification is located at http://
-
-
www.sgi.com/Technology/OpenGL/glspec1.1/glspec.html).
- Finally, for a good source of answers to questions you may have about OpenGL, see the OpenGL information center at http://www.sgi.com/Technology/OpenGL/ opengl.html.
|
|