there is a second code-point where the index of the transparent-pixel
for overlays
is needed. this second code-point is independent of the scenemgr because
its a
standalone widget. the widget is the "color- and material-editor" ...
thats why
the determination of the transparent-pixel should be a suitable separate
function
(number of lines is more than a screen).
i will post a set of patches in the future that include karen's fixes.
these patches will fix many different selfcontainted problems (make
system, fonts,
colors, float/double math, name mangling, etc...)
at least is the "color-editor" widget used in the "ivview" application
to set the
background color of the scene.
btw> SGI use constant 0, and SUN use constant 255, in the 8-bit
pseudo-color overlay
plane model as transparent pixel.
(
)imon
Karen Schuchardt wrote:
>
> A while ago the following code was added to SoXtRendrArea.c++ as a fix
> for aix (see
> http://oss.sgi.com/projects/inventor/mail/info-inventor-dev/msg00410.html).
>
> The code follows:
>
> #ifdef GLX_TRANSPARENT_INDEX_VALUE_EXT
>
> if (vis != NULL) {
> int index;
> glXGetConfig(XtDisplay(parent), vis,
> GLX_TRANSPARENT_INDEX_VALUE_EXT, &index);
>
> overlaySceneMgr->setBackgroundIndex(index);
>
> }
> #endif
>
> On Sun's (or at least on the systems we have here) the call returns
> GLX_BAD_ATTRIBUTE and the background index is set to whatever arbitrary
> value it was assigned when declared.
>
> Sun has some example code to get the transparent color (provide to my by
> Simon Ney). There are a couple of ways two do this. One way requires
> the widgets to be realized (to get the X Window) so this method cannot
> be used inside XtSoRendrArea. The other way
> uses the SERVER_OVERLAY_VISUALS. I put this into my version of
> SoXtRendrArea and it works. The code is ifdef'd on __sun__ in two
> places - at the top for some delcaration and in the buildWidget method.
>
> Hopefully this can get added to the code base.
>
> I've made these changes to the 2.1.5-9 code base. If anybody has a
> better way, I'd be interested in it as always.
>
> regards,
> Karen
>
> ------------------------------------------------------------------------
> Name: SoXtRendrArea.c++
> SoXtRendrArea.c++ Type: Plain Text (text/plain)
> Encoding: 7bit
--
---------------------------------------------------------------------
| Simon Ney, Bischofsweg 46 60598 Frankfurt/M Tel: ++49 69 68600055 |
| Email Simon.Ney@xxxxxxxxxxxxxxxxxxxxxxxxxxx Fax: ++49 69 68600052 |
---------------------------------------------------------------------
|