Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info. |
Transparent pixel in overlay colormap
Jump to navigation
Jump to search
Q: I work on various SGI machines, mainly Indigo Impact and Octane. My question is: given a colormap in an overlay visual, how do I know which pixel is the transparent one?
A:
#ifdef GLX_TRANSPARENT_TYPE_EXT int type; /* type of transparency */ int transparent; /* index value for transparent */ glXGetConfig(display, &visuals[i], GLX_TRANSPARENT_TYPE_EXT, &type); if (type == GLX_TRANSPARENT_INDEX_EXT) { glXGetConfig(display, overlay_visual, GLX_TRANSPARENT_INDEX_VALUE_EXT, &transparent); printf("index %d is transparent\n", transparent); } else { printf("visual has no transparent index\n"); } #endif