Hi Hartmut,

On Fri, Jul 29, 2011 at 9:45 AM, Hartmut Seichter
<[email protected]> wrote:
> just tested it. I think it looks cleaner. Now we only need to get it
> working. Traits seems to be preset with RGB888 - what would be a consistent
> way to do another preset?

Why would we need another present?

The standard GLX implementation takes the traits values and tries
them, if it this fails it divides the number of request bits by 2 and
tries again until it succeeds or or it's found that it just isn't
supported then it fails.

> One idea (again not working with OMAP3 broken drivers) was to extract the
> values from ::createVisualInfo() doing something along the lines of
>
>        std::bitset<sizeof(long)<<3> rbits(_visualInfo->red_mask);
>        std::bitset<sizeof(long)<<3> gbits(_visualInfo->green_mask);
>        std::bitset<sizeof(long)<<3> bbits(_visualInfo->blue_mask);
>
>        _traits->red = rbits.count();
>        _traits->green = gbits.count();
>        _traits->blue = bbits.count();

Capping the request number of bits by the visualInfo values might make
sense, but not actually overriding the Traits completely - the
intention with Traits is for end user application to be able to
request what they need, not to have their request ignored.  BTW, your
code is rather cryptic, I'd have to sit down with a stl and X11
books/online resources to work out how it functions. I would suspect
others might also find the code obvious how it functions.

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to