Here are two extensions from sun:
int glXInitThreadsSUN (void)
Status glXGetTransparentIndexSUN( Display *dpy,
Window overlay,
Window underlay,
unsigned long *pTransparentIndex )
Jose
---------------------------------------- man
pages --------------------------------
Misc. Reference Manual Pages GLXINITTHREADSSUN(3gl)
NAME
glXInitThreadsSUN - multi-threading support
C SPECIFICATION
int glXInitThreadsSUN( void )
DESCRIPTION
The glXInitThreadsSUN function initializes GL support for
concurrent rendering threads. This function must first be
called before glXCreateContext in a multi-threaded GL pro-
gram, and it must complete before any other GL call is made.
This function returns a nonzero status if initialization was
successful; otherwise, it returns zero. On systems that do
not support threads, this function always returns zero.
It is only necessary to call this function if multiple
rendering threads might use GL concurrently. If all calls
to GL functions are protected by some other access mechanism
(for example, a mutual exclusion lock in a toolkit or
through explicit client programming), GL thread initializa-
tion is not required. It is recommended that single-
threaded rendering programs not call this function.
This function is only client side so the extension string
can be retrieved using glXGetClientString. Typical usage:
#ifdef GLX_SUN_init_threads
if ( strstr ( glXGetClientString (dpy, GLX_EXTENSIONS ),
"GLX_SUN_init_threads" ) ) {
if ( ! glXInitThreadsSUN ( ) ) {
printf ("Unable to init GL ");
printf ("for multithreaded rendering\n");
}
}
#endif
NOTES
XInitThreads must be called before glXInitThreadsSUN.
glXQueryExtensionsString does not show a string for this
function since this function is client side only.
glXInitThreadsSUN is part of the GLX_SUN_init_threads exten-
sion, not part of the core GL command set. If
GLX_SUN_init_threads is included in the string returned by
glXGetClientString, when called with argument
GLX_EXTENSIONS, extension glXInitThreadsSUN is supported by
the connection.
SEE ALSO
glXGetClientString, glXQueryExtensionsString,
SunOS 5.7 Last change: 3 Dec 97 1
Misc. Reference Manual Pages GLXINITTHREADSSUN(3gl)
glXMakeCurrent, XInitThreads
SunOS 5.7 Last change: 3 Dec 97 2
----------------------
Misc. Reference Manual Pages GLXGETTRANSPARENTINDEXSUN(3glx)
NAME
glXGetTransparentIndexSUN - get the transparent pixel index
for an overlay/underlay Window pair.
C SPECIFICATION
Status glXGetTransparentIndexSUN( Display *dpy,
Window overlay,
Window underlay,
unsigned long *pTransparentIndex )
PARAMETERS
dpy Specifies the connection to the X server
overlay
Specifies the overlay Window of an overlay/underlay
pair.
underlay
Specifies the underlay Window.
pTransparentIndex
Specifies a pointer to the index to be returned.
RETURN
If underlay is a Window that has previously been made the
current GLXDrawable by the client, and a transparent index
is available for the overlay Window,
glXGetTransparentIndexSUN returns 1 and sets *pTransparen-
tIndex to the value of the index. Otherwise, it returns 0.
If underlay is equal to None, and if a transparent index is
available for overlay that is independent of the underlying
Windows, glXGetTransparentIndexSUN returns 1 and sets
*pTransparentIndex to the index. Otherwise, it returns 0.
DESCRIPTION
For some overlay Windows (windows created with a visual with
GLX_LEVEL > 0), there is a particular color index that when
drawn to the framebuffer causes pixels in the Window to be
transparent. That is, pixels in the overlay drawn with the
transparent index are invisible and the pixels of window(s)
beneath the overlay are displayed.
On some systems, the transparent pixel index is a constant.
On other hardware, the transparent index is a function of
the underlying Window (GLX_LEVEL <= 0).
Applications may use glXGetTransparentIndexSUN to determine
whether a transparent index is available for a particular
pair of windows and to determine the value of the tran-
sparent index.
SunOS 5.7 Last change: 1
Misc. Reference Manual Pages GLXGETTRANSPARENTINDEXSUN(3glx)
If glXGetTransparentIndexSUN returns 1 after being called
with underlay equal to a valid window, then the transparent
index is valid only for underlay. The underlay Window must
have been previously made the current GLXDrawable of the
thread.
If a Window other than underlay is directly beneath overlay
the results of drawing with the transparentIndex are unde-
fined.
If glXGetTransparentIndexSUN returns 1 when the underlay
argument is set to None, the transparentIndex is valid for
all underlay windows.
ERRORS
A BadDrawable error is returned if overlay is not a valid
Window or if underlay is not a valid Window (except None).
NOTES
When the transparent index is valid only for a particular
underlay window, applications should follow the following
guidelines to insure proper operation: 1) It is the
application's responsibility to ensure that the only window
ever underneath overlay is underlay. 2) Ideally, overlay
should be created as a child of underlay with the same size
and shape. The application should reshape the overlay window
whenever the underlay window is reshaped. This ensures that
the transparent index makes the overlay transparent.
SunOS 5.7 Last change: 2