On 7/29/11 11:07 AM, Robert Osfield wrote:
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?
Because a RGB888 EGL config (or RGB444 in the second try) on a BGR565 visual doesn't make sense? Having control is good, but forcing something that just will not work doesn't make a lot of sense to me.
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.
I've seen that. The OSG GLX implementations is basically emulating what eglChooseConfig would do if used with a selecting from the returned configs because it returns with something or not. Maybe it would be a better choise to let eglChooseConfig do the work in ::createVisualInfo()?

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.
Well, it was for prototyping purposes (and btw. works with SGX level 1.2.1 and the PowerVR X11 EGL implementation) and for me it was the most obvious way to go about it. What would be a good option to utilize this info? If not overriding the traits, selecting the EGL config in createVisualInfo() or just exchanging the attribute vector.


/Hartmut

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


--
Hartmut Seichter, PhD (HKU), Dipl.-Ing. (BUW)

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

Reply via email to